forked from smith-chem-wisc/mzLib
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master'
- Loading branch information
Showing
26 changed files
with
1,510 additions
and
322 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
277 changes: 136 additions & 141 deletions
277
mzLib/MassSpectrometry/MzSpectra/SpectralSimilarity.cs
Large diffs are not rendered by default.
Oops, something went wrong.
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
95 changes: 95 additions & 0 deletions
95
mzLib/Readers/ExternalResults/IndividualResultRecords/MsFraggerPeptide.cs
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,95 @@ | ||
using CsvHelper.Configuration.Attributes; | ||
using CsvHelper.Configuration; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Globalization; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using Easy.Common.Extensions; | ||
|
||
namespace Readers | ||
{ | ||
public class MsFraggerPeptide | ||
{ | ||
public static CsvConfiguration CsvConfiguration = new CsvConfiguration(CultureInfo.InvariantCulture) | ||
{ | ||
Delimiter = "\t", | ||
HasHeaderRecord = true, | ||
IgnoreBlankLines = true, | ||
TrimOptions = TrimOptions.Trim, | ||
BadDataFound = null, | ||
MissingFieldFound = null, | ||
HeaderValidated = null, | ||
}; | ||
|
||
[Name("Peptide", "Sequence")] public string BaseSequence { get; set; } | ||
|
||
[Name("Prev AA")] [Optional] public char PreviousAminoAcid { get; set; } | ||
|
||
[Name("Next AA")] [Optional] public char NextAminoAcid { get; set; } | ||
|
||
[Ignore] private int _peptideLength; | ||
|
||
[Name("Peptide Length")] | ||
[Optional] | ||
public int PeptideLength | ||
{ | ||
get => _peptideLength.IsDefault() ? BaseSequence.Length : _peptideLength; | ||
set => _peptideLength = value; | ||
} | ||
|
||
[Name("Protein Start")] [Optional] public int OneBasedStartResidueInProtein { get; set; } | ||
|
||
[Name("Protein End")] [Optional] public int OneBasedEndResidueInProtein { get; set; } | ||
|
||
[Name("Charges", "Charge States")] | ||
[TypeConverter(typeof(CommaDelimitedToIntegerArrayTypeConverter))] | ||
public int[] Charge { get; set; } | ||
|
||
[Name("Probability")] public double Probability { get; set; } | ||
|
||
[Name("Spectral Count")] [Optional] public int SpectralCount { get; set; } | ||
|
||
[Name("Intensity")] [Optional] public double Intensity { get; set; } | ||
|
||
[Name("Assigned Modifications")] | ||
[TypeConverter(typeof(CommaDelimitedToStringArrayTypeConverter))] | ||
public string[] AssignedModifications { get; set; } | ||
|
||
[Name("Observed Modifications")] | ||
[Optional] | ||
[TypeConverter(typeof(CommaDelimitedToStringArrayTypeConverter))] | ||
public string[] ObservedModifications { get; set; } | ||
|
||
[Name("Protein")] public string Protein { get; set; } | ||
|
||
[Name("Protein ID")] [Optional] public string ProteinAccession { get; set; } | ||
|
||
[Ignore] private string _proteinName; | ||
|
||
[Name("Entry Name")] | ||
[Optional] | ||
public string ProteinName | ||
{ | ||
get => _proteinName.IsDefault() ? Protein.Split('|').Last().Trim() : _proteinName; | ||
set => _proteinName = value; | ||
} | ||
|
||
[Name("Gene")] | ||
public string Gene { get; set; } | ||
|
||
[Name("Protein Description")] | ||
public string ProteinDescription { get; set; } | ||
|
||
[Name("Mapped Genes")] | ||
[Optional] | ||
[TypeConverter(typeof(CommaDelimitedToStringArrayTypeConverter))] | ||
public string[] MappedGenes { get; set; } | ||
|
||
[Name("Mapped Proteins")] | ||
[Optional] | ||
[TypeConverter(typeof(CommaDelimitedToStringArrayTypeConverter))] | ||
public string[] MappedProteins { get; set; } | ||
} | ||
} |
111 changes: 111 additions & 0 deletions
111
mzLib/Readers/ExternalResults/IndividualResultRecords/MsFraggerProtein.cs
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,111 @@ | ||
using CsvHelper.Configuration.Attributes; | ||
using CsvHelper.Configuration; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace Readers | ||
{ | ||
public class MsFraggerProtein | ||
{ | ||
public static CsvConfiguration CsvConfiguration => new CsvConfiguration(System.Globalization.CultureInfo.InvariantCulture) | ||
{ | ||
Delimiter = "\t", | ||
HasHeaderRecord = true, | ||
IgnoreBlankLines = true, | ||
TrimOptions = TrimOptions.Trim, | ||
BadDataFound = null, | ||
MissingFieldFound = null, | ||
}; | ||
|
||
[Name("Protein")] | ||
public string Protein { get; set; } | ||
|
||
[Name("Protein ID")] | ||
public string Accession { get; set; } | ||
|
||
[Name("Entry Name")] | ||
public string AccessionOrganism { get; set; } | ||
|
||
[Name("Gene")] | ||
public string Gene { get; set; } | ||
|
||
[Name("Length", "Protein Length")] | ||
public int Length { get; set; } | ||
|
||
[Name("Organism")] | ||
public string Organism { get; set; } | ||
|
||
[Name("Protein Description", "Description")] | ||
public string Description { get; set; } | ||
|
||
[Name("Protein Existence")] | ||
public string ProteinExistence { get; set; } | ||
|
||
[Name("Coverage")] | ||
[Optional] | ||
public double Coverage { get; set; } | ||
|
||
[Name("Protein Probability")] | ||
public double ProteinProbability { get; set; } | ||
|
||
[Name("Top Peptide Probability")] | ||
public double TopPeptideProbability { get; set; } | ||
|
||
[Name("Total Peptides", "Combined Total Peptides")] | ||
public int TotalPeptides { get; set; } | ||
|
||
[Name("Unique Peptides")] | ||
[Optional] | ||
public int UniquePeptides { get; set; } | ||
|
||
[Name("Razor Peptides")] | ||
[Optional] | ||
public int RazorPeptides { get; set; } | ||
|
||
[Name("Total Spectral Count", "Combined Total Spectral Count")] | ||
public int TotalSpectralCount { get; set; } | ||
|
||
[Name("Unique Spectral Count", "Combined Unique Spectral Count")] | ||
public int UniqueSpectralCount { get; set; } | ||
|
||
[Name("Razor Spectral Count")] | ||
[Optional] | ||
public int RazorSpectralCount { get; set; } | ||
|
||
[Name("Total Intensity")] | ||
[Optional] | ||
public double TotalIntensity { get; set; } | ||
|
||
[Name("Unique Intensity")] | ||
[Optional] | ||
public double UniqueIntensity { get; set; } | ||
|
||
[Name("Razor Intensity")] | ||
[Optional] | ||
public double RazorIntensity { get; set; } | ||
|
||
[Name("Razor Assigned Modifications")] | ||
[TypeConverter(typeof(CommaDelimitedToStringArrayTypeConverter))] | ||
[Optional] | ||
public string[] RazorAssignedModifications { get; set; } | ||
|
||
[Name("Razor Observed Modifications")] | ||
[Optional] | ||
[TypeConverter(typeof(CommaDelimitedToStringArrayTypeConverter))] | ||
public string[] RazorObservedModifications { get; set; } | ||
|
||
[Name("Indistinguishable Proteins")] | ||
[TypeConverter(typeof(CommaDelimitedToStringArrayTypeConverter))] | ||
public string[] IndistinguishableProteins { get; set; } | ||
|
||
public MsFraggerProtein() | ||
{ | ||
RazorAssignedModifications = new string[0]; | ||
RazorObservedModifications = new string[0]; | ||
IndistinguishableProteins = new string[0]; | ||
} | ||
} | ||
} |
Oops, something went wrong.