-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into speedierGptmd
- Loading branch information
Showing
49 changed files
with
6,868 additions
and
203 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
using System.Collections.Generic; | ||
|
||
namespace EngineLayer | ||
{ | ||
public enum AnalyteType | ||
{ | ||
Peptide, | ||
Proteoform, | ||
Oligo | ||
} | ||
|
||
/// <summary> | ||
/// Accessor methods for specific information about certain analyte types | ||
/// </summary> | ||
public static class AnalyteTypeExtensions | ||
{ | ||
private static readonly Dictionary<AnalyteType, AnalyteTypeData> AnalyteTypes = new() | ||
{ | ||
{ AnalyteType.Peptide, new AnalyteTypeData("PSM", "Peptide", "Protein", "psmtsv") }, | ||
{ AnalyteType.Proteoform, new AnalyteTypeData("PSM", "Proteoform", "Protein", "psmtsv") }, | ||
{ AnalyteType.Oligo, new AnalyteTypeData("OSM", "Oligo", "Transcript", "osmtsv") }, | ||
}; | ||
|
||
public static string GetSpectralMatchLabel(this AnalyteType analyteType) => AnalyteTypes[analyteType].SpectralMatchLabel; | ||
public static string GetSpectralMatchExtension(this AnalyteType analyteType) => AnalyteTypes[analyteType].SpectralMatchExtension; | ||
public static string GetUniqueFormLabel(this AnalyteType analyteType) => AnalyteTypes[analyteType].UniqueFormLabel; | ||
public static string GetBioPolymerLabel(this AnalyteType analyteType) => AnalyteTypes[analyteType].BioPolymerLabel; | ||
} | ||
|
||
/// <summary> | ||
/// Represents an analyte type and is used to determine the output format of the analyte type. | ||
/// </summary> | ||
internal class AnalyteTypeData(string spectralMatchLabel, string uniqueFormLabel, string bioPolymerLabel, string spectralMatchExtension) | ||
{ | ||
/// <summary> | ||
/// Gets or sets the label for spectral matches (e.g. PSM). | ||
/// </summary> | ||
internal string SpectralMatchLabel { get; init; } = spectralMatchLabel; | ||
|
||
/// <summary> | ||
/// Extension for spectral matches (e.g. psmtsv). | ||
/// </summary> | ||
internal string SpectralMatchExtension { get; init; } = spectralMatchExtension; | ||
|
||
/// <summary> | ||
/// Gets or sets the label for unique forms (e.g. Peptide). | ||
/// </summary> | ||
internal string UniqueFormLabel { get; init; } = uniqueFormLabel; | ||
|
||
/// <summary> | ||
/// Gets or sets the label for grouped forms (e.g. Protein). | ||
/// </summary> | ||
internal string BioPolymerLabel { get; init; } = bioPolymerLabel; | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.