Skip to content

Commit a874306

Browse files
committed
improving quantprot exception throw.
1 parent 5b7c5c0 commit a874306

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

mzLib/MzLibUtil/PositionFrequencyAnalysis/QuantifiedProtein.cs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,14 @@ public QuantifiedProtein(string accession, string sequence = null, Dictionary<st
2222

2323
public void SetProteinModsFromPeptides()
2424
{
25-
if (!Sequence.IsNotNullOrEmpty() || !Peptides.IsNotNullOrEmpty())
25+
if (Sequence.IsNullOrEmpty())
2626
{
27-
throw new Exception("The protein sequence is unknown, or there're no peptides.");
27+
throw new Exception("The protein sequence is unknown.");
28+
}
29+
30+
if (Peptides.IsNullOrEmpty())
31+
{
32+
return;
2833
}
2934

3035
ModifiedAminoAcidPositionsInProtein = new Dictionary<int, Dictionary<string, QuantifiedModification>>();

0 commit comments

Comments
 (0)