Skip to content

Commit

Permalink
Added interface API documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
cjbaker committed May 31, 2011
1 parent b50307f commit dc9d19a
Show file tree
Hide file tree
Showing 5 changed files with 107 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public string Name

public string Description
{
get { return "Provides data access for .mzxml and .mzml files."; }
get { return "This module provides access to .mzxml, .mzml, Thermo RAW, Waters RAW, Bruker Analysis, Mascot Generic, Agilent MassHunter and Bruker Data Exchange file formats via the ProteoWizard library."; }
}

public string[] FileTypes
Expand Down
60 changes: 60 additions & 0 deletions source/MassSpecStudio/Core/IDataProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,88 @@ namespace MassSpecStudio.Core
{
public interface IDataProvider
{
/// <summary>
/// Gets the unique GUID for this data provider. This property should be given a hard coded GUID that will uniquely identify it.
/// </summary>
Guid TypeId { get; }

/// <summary>
/// Gets the friendly name of this data provider. This name can be used within the UI.
/// </summary>
string Name { get; }

/// <summary>
/// Gets the description of this data provider. This description can be made visible within the UI.
/// </summary>
string Description { get; }

/// <summary>
/// Gets the supported file types this data provider supports. This property can be used within the UI for filtering the types of files that are displayed when selecting data files for inclusion in an experiment.
/// </summary>
string[] FileTypes { get; }

/// <summary>
/// Opens a single sample specified by the sample index from the data file specified in the file name.
/// </summary>
/// <param name="fileName">The full path file name of the data file.</param>
/// <param name="sampleIndex">The index of the sample inside the data file to open.</param>
void Open(string fileName, int sampleIndex);

/// <summary>
/// Closes the currently opened data file.
/// </summary>
void Close();

/// <summary>
/// Gets a list of sample names that are available within the currently opened data file.
/// </summary>
/// <returns>Returns a list of sample names available in the currently opened data file.</returns>
IList<string> GetSampleNames();

/// <summary>
/// Gets a mass spectrum from the currently opened sample within the specified parameters. This method will return either a single spectrum or an averaged spectrum depending on the start RT and end RT.
/// </summary>
/// <param name="startRt">The start retention time.</param>
/// <param name="stopRt">The end retention time.</param>
/// <param name="mzLower">The lower M/Z used to filter the spectral data.</param>
/// <param name="mzUpper">The upper M/z used to filter the spectral data.</param>
/// <param name="threshold">The intensity threshold.</param>
/// <returns>Returns a spectrum from the currently opened data file within the parameters specified.</returns>
IXYData GetSpectrum(double startRt, double stopRt, double mzLower, double mzUpper, double threshold);

/// <summary>
/// Gets an MSMS spectrum from the currently opened sample within the specficied parameters.
/// </summary>
/// <param name="targetRetentionTime">The target retention time.</param>
/// <param name="retentionTimeWidth">The width window around the target retention time.</param>
/// <param name="mz">The MZ (mass over charge)</param>
/// <param name="mzTolerance">The MZ tolernance.</param>
/// <returns>Returns the MSMS spectrum that is within the specified parameters.</returns>
IXYData GetMsMsSpectrum(double targetRetentionTime, double retentionTimeWidth, double mz, double mzTolerance);

/// <summary>
/// Gets the XIC from the currently opened sample within the specified parameters.
/// </summary>
/// <param name="mass1">The first mass.</param>
/// <param name="mass2">The second mass.</param>
/// <param name="mzTolerance">The MZ tolerance.</param>
/// <param name="timeUnits">The time units for the XIC.</param>
/// <returns>Returns the XIC for the specified parameters.</returns>
IXYData GetExtractedIonChromatogram(double mass1, double mass2, double mzTolerance, MassSpecStudio.Core.TimeUnit timeUnits);

/// <summary>
/// Gets the TIC from the currently opened sample with the specified time units.
/// </summary>
/// <param name="timeUnits">The time units for the TIC.</param>
/// <returns>Returns the TIC for the specified parameter.</returns>
IXYData GetTotalIonChromatogram(TimeUnit timeUnits);

/// <summary>
/// Checks whether the specified file matches the expected file type. This method is used to filter the list of available data files when the user is adding data to an experiment.
/// </summary>
/// <param name="filePath">The full file path to the data file.</param>
/// <param name="expectedFileType">The expected file type. This must be one of the strings from the FileTypes property.</param>
/// <returns>Returns whether the specified file is of the expected file type.</returns>
bool IsCorrectFileType(string filePath, string expectedFileType);
}
}
24 changes: 24 additions & 0 deletions source/MassSpecStudio/Core/IExperimentType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,40 @@ namespace MassSpecStudio.Core
{
public interface IExperimentType
{
/// <summary>
/// Gets a Uri pointing to a XAML user control that represents the icon for this experiment type. This icon will be visible in the New Project dialog.
/// </summary>
string Icon { get; }

/// <summary>
/// Gets or sets the friendly name of this experiment type. This name will be visible within the New Project dialog.
/// </summary>
string Name { get; set; }

/// <summary>
/// Gets or sets the description of the experiment type. This description will be visible within the New Project dialog.
/// </summary>
string Description { get; set; }

/// <summary>
/// Gets the unique GUID for this experiment type. This property should be given a hard coded GUID that will uniquely identify it.
/// </summary>
Guid ExperimentType { get; }

/// <summary>
/// Creates a new experiment of this type and returns a reference to the ExperimentBase object that represents this new experiment.
/// </summary>
/// <param name="project">The project this experiment is associated with.</param>
/// <param name="experimentName">The name of the experiment.</param>
/// <returns>Returns an ExperimentBase object representing the newly created experiment.</returns>
MassSpecStudio.Core.Domain.ExperimentBase CreateExperiment(ProjectBase project, string experimentName);

/// <summary>
/// Opens the experiment for the specified file path and project.
/// </summary>
/// <param name="path">The path to the experiment.</param>
/// <param name="project">The project this experiment belongs to.</param>
/// <returns>Returns the ExperimentBase object representing the opened experiment.</returns>
ExperimentBase Open(string path, ProjectBase project);
}
}
18 changes: 18 additions & 0 deletions source/MassSpecStudio/Core/Processing/IAlgorithm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,32 @@ namespace MassSpecStudio.Core.Processing
{
public interface IAlgorithm
{
/// <summary>
/// Gets the friendly name of the algorithm for use in user interfaces.
/// </summary>
string Name { get; }

/// <summary>
/// Gets a value indicating whether this algorithm can be used to process the currently opened project's data.
/// </summary>
bool IsEnabled { get; }

/// <summary>
/// Gets the list of processing steps that are used within this processing algorithm.
/// </summary>
IList<IProcessingStep> ProcessingSteps { get; }

/// <summary>
/// Executes the processing algorithm for the specified experiment. The background worker thread allows processing to occur in the background while the UI can report progress.
/// </summary>
/// <param name="worker">The backgrouond worker thread.</param>
/// <param name="experiment">The experiment to process.</param>
void Execute(BackgroundWorker worker, ExperimentBase experiment);

/// <summary>
/// This method is used to set the parameters of the algorithm to the parameter values included within the algorithm parameters obejct.
/// </summary>
/// <param name="algorithmParameters">The algorithm parameters to set the algorithm to.</param>
void SetParameters(Algorithm algorithmParameters);
}
}
4 changes: 4 additions & 0 deletions source/MassSpecStudio/Core/Processing/IProcessingStep.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
{
public interface IProcessingStep
{
/// <summary>
/// Builds a list of ProcessingStep objects that contain all the ProcessStep's parameter values. This list is used for persistence of processing parameters.
/// </summary>
/// <returns>Returns a list of processing steps with their assoicated parameters values.</returns>
Domain.ProcessingStep BuildParameterList();
}
}

0 comments on commit dc9d19a

Please sign in to comment.