Skip to content

Commit

Permalink
Merge pull request #11 from rmmiller22/master
Browse files Browse the repository at this point in the history
Include Proteins with No peptides
  • Loading branch information
rmmiller22 authored Nov 17, 2020
2 parents 58b67b5 + 97a1e5b commit dd4188d
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Engine/GlobalVariables.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ static GlobalVariables()
#if DEBUG
ProteaseGuruVersion = "Not a release version. DEBUG.";
#else
ProteaseGuruVersion = "0.0.14";
ProteaseGuruVersion = "0.0.15";
#endif
}
else
Expand Down
6 changes: 5 additions & 1 deletion Tasks/DigestionTask.cs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ protected Dictionary<Protein, List<PeptideWithSetModifications>> DigestDatabase(
Dictionary<Protein, List<PeptideWithSetModifications>> peptidesForProtein = new Dictionary<Protein, List<PeptideWithSetModifications>>(proteinsFromDatabase.Count);
foreach (var protein in proteinsFromDatabase)
{
List<PeptideWithSetModifications> peptides = protein.Digest(dp, new List<Modification> { }, new List<Modification> { }).ToList();
List<PeptideWithSetModifications> peptides = protein.Digest(dp, new List<Modification> { }, new List<Modification> { }).ToList();
peptidesForProtein.Add(protein, peptides);
}
return peptidesForProtein;
Expand Down Expand Up @@ -228,6 +228,10 @@ Dictionary<Protein, List<InSilicoPep>> DeterminePeptideStatus(string databaseNam
}
}
}
foreach (var protein in databasePeptides.Keys.Where(p => inSilicoPeptides.ContainsKey(p) == false))
{
inSilicoPeptides.Add(protein, new List<InSilicoPep>());
}
databasePeptides = null;
return inSilicoPeptides;
}
Expand Down
2 changes: 1 addition & 1 deletion Tasks/MyTaskResults.cs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ private List<string> writeSummary(Dictionary<string, Dictionary<string, Dictiona
{
string prot = protease.Key;
summary.Add(" "+prot + " Results:");
var allPeptides = protease.Value.SelectMany(p => p.Value);
var allPeptides = protease.Value.SelectMany(p => p.Value);
if (parameters.TreatModifiedPeptidesAsDifferent)
{
summary.Add(" Number of Peptides: " + allPeptides.Count());
Expand Down
6 changes: 6 additions & 0 deletions global.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"sdk": {
"version": "3.1.102",
"rollForward": "latestFeature"
}
}

0 comments on commit dd4188d

Please sign in to comment.