public void BestPractice_iii() { // Tweaking for v2 const string proFormaString = "MTLFQLREHWFVYKDDEKLTAFRNK[p-adenosine|R:N6-(phospho-5'-adenosine)-L-lysine| RESID:AA0227| MOD:00232| N6AMPLys]SMLFQRELRPNEEVTWK"; var term = _parser.ParseString(proFormaString); Assert.AreEqual("MTLFQLREHWFVYKDDEKLTAFRNKSMLFQRELRPNEEVTWK", term.Sequence); Assert.IsNotNull(term.Tags); Assert.AreEqual(1, term.Tags.Count); Assert.IsNull(term.NTerminalDescriptors); Assert.IsNull(term.CTerminalDescriptors); ProFormaTag tag25 = term.Tags[0]; Assert.AreEqual(24, tag25.ZeroBasedStartIndex); Assert.AreEqual(5, tag25.Descriptors.Count); Assert.AreEqual(ProFormaKey.Name, tag25.Descriptors[0].Key); Assert.AreEqual("p-adenosine", tag25.Descriptors[0].Value); Assert.AreEqual(ProFormaKey.Name, tag25.Descriptors[1].Key); Assert.AreEqual(ProFormaEvidenceType.Resid, tag25.Descriptors[1].EvidenceType); Assert.AreEqual("N6-(phospho-5'-adenosine)-L-lysine", tag25.Descriptors[1].Value); Assert.AreEqual(ProFormaKey.Identifier, tag25.Descriptors[2].Key); Assert.AreEqual(ProFormaEvidenceType.Resid, tag25.Descriptors[2].EvidenceType); Assert.AreEqual("AA0227", tag25.Descriptors[2].Value); Assert.AreEqual(ProFormaKey.Identifier, tag25.Descriptors[3].Key); Assert.AreEqual(ProFormaEvidenceType.PsiMod, tag25.Descriptors[3].EvidenceType); Assert.AreEqual("MOD:00232", tag25.Descriptors[3].Value); Assert.AreEqual(ProFormaKey.Name, tag25.Descriptors[4].Key); Assert.AreEqual("N6AMPLys", tag25.Descriptors[4].Value); }
public void Rule6_WithModificationNames() { const string proFormaString = "[mass]+S[Methyl]EQVE[14]NCE"; var term = _parser.ParseString(proFormaString); ProFormaTag tagMethyl = term.Tags[0]; Assert.AreEqual(ProFormaKey.Mass, tagMethyl.Descriptors.Single().Key); Assert.AreEqual("Methyl", tagMethyl.Descriptors.Single().Value); ProFormaTag tag14 = term.Tags[1]; Assert.AreEqual(ProFormaKey.Mass, tag14.Descriptors.Single().Key); Assert.AreEqual("14", tag14.Descriptors.Single().Value); }
public void BestPractice_i() { // Tweaking for v2 const string proFormaString = "[Acetyl]-S[Phospho|+79.966331]GRGK[Acetyl|UNIMOD:1|+42.010565]QGGKARAKAKTRSSRAGLQFPVGRVHRLLRKGNYAERVGAGAPVYLAAVLEYLTAEILELAGNAARDNKKTRIIPRHLQLAIRNDEELNKLLGKVTIAQGGVLPNIQAVLLPKKT[UNIMOD:21]ESHHKAKGK"; var term = _parser.ParseString(proFormaString); Assert.AreEqual("SGRGKQGGKARAKAKTRSSRAGLQFPVGRVHRLLRKGNYAERVGAGAPVYLAAVLEYLTAEILELAGNAARDNKKTRIIPRHLQLAIRNDEELNKLLGKVTIAQGGVLPNIQAVLLPKKTESHHKAKGK", term.Sequence); Assert.IsNotNull(term.Tags); Assert.AreEqual(3, term.Tags.Count); Assert.IsNotNull(term.NTerminalDescriptors); Assert.AreEqual(1, term.NTerminalDescriptors.Count); Assert.IsNull(term.CTerminalDescriptors); var nTerm = term.NTerminalDescriptors[0]; Assert.AreEqual(ProFormaKey.Name, nTerm.Key); Assert.AreEqual("Acetyl", nTerm.Value); ProFormaTag tag1 = term.Tags[0]; Assert.AreEqual(0, tag1.ZeroBasedStartIndex); Assert.AreEqual(2, tag1.Descriptors.Count); Assert.AreEqual(ProFormaKey.Name, tag1.Descriptors.First().Key); Assert.AreEqual("Phospho", tag1.Descriptors.First().Value); Assert.AreEqual(ProFormaKey.Mass, tag1.Descriptors.Last().Key); Assert.AreEqual("+79.966331", tag1.Descriptors.Last().Value); ProFormaTag tag5 = term.Tags[1]; Assert.AreEqual(4, tag5.ZeroBasedStartIndex); Assert.AreEqual(3, tag5.Descriptors.Count); Assert.AreEqual(ProFormaKey.Name, tag5.Descriptors[0].Key); Assert.AreEqual("Acetyl", tag5.Descriptors[0].Value); Assert.AreEqual(ProFormaKey.Identifier, tag5.Descriptors[1].Key); Assert.AreEqual(ProFormaEvidenceType.Unimod, tag5.Descriptors[1].EvidenceType); Assert.AreEqual("UNIMOD:1", tag5.Descriptors[1].Value); Assert.AreEqual(ProFormaKey.Mass, tag5.Descriptors[2].Key); Assert.AreEqual("+42.010565", tag5.Descriptors[2].Value); ProFormaTag tag120 = term.Tags[2]; Assert.AreEqual(119, tag120.ZeroBasedStartIndex); Assert.AreEqual(1, tag120.Descriptors.Count); Assert.AreEqual(ProFormaKey.Identifier, tag120.Descriptors.Single().Key); Assert.AreEqual(ProFormaEvidenceType.Unimod, tag120.Descriptors.Single().EvidenceType); Assert.AreEqual("UNIMOD:21", tag120.Descriptors.Single().Value); }
public void BestPractice_ii() { const string proFormaString = "[Unimod]+[1]-S[21]GRGK[1]QGGKARAKAKTRSSRAGKVTIAQGGVLPNIQAVLLPKKT[21]ESHHKAKGK"; var term = _parser.ParseString(proFormaString); Assert.AreEqual("SGRGKQGGKARAKAKTRSSRAGKVTIAQGGVLPNIQAVLLPKKTESHHKAKGK", term.Sequence); Assert.IsNotNull(term.Tags); Assert.AreEqual(3, term.Tags.Count); Assert.IsNotNull(term.NTerminalDescriptors); Assert.AreEqual(1, term.NTerminalDescriptors.Count); Assert.IsNull(term.CTerminalDescriptors); var nTerm = term.NTerminalDescriptors[0]; Assert.AreEqual(ProFormaKey.Identifier, nTerm.Key); Assert.AreEqual(ProFormaEvidenceType.Unimod, nTerm.EvidenceType); Assert.AreEqual("1", nTerm.Value); ProFormaTag tag1 = term.Tags[0]; Assert.AreEqual(0, tag1.ZeroBasedStartIndex); Assert.AreEqual(1, tag1.Descriptors.Count); Assert.AreEqual(ProFormaKey.Identifier, tag1.Descriptors.Single().Key); Assert.AreEqual(ProFormaEvidenceType.Unimod, tag1.Descriptors.Single().EvidenceType); Assert.AreEqual("21", tag1.Descriptors.Single().Value); ProFormaTag tag5 = term.Tags[1]; Assert.AreEqual(4, tag5.ZeroBasedStartIndex); Assert.AreEqual(1, tag5.Descriptors.Count); Assert.AreEqual(ProFormaKey.Identifier, tag5.Descriptors.Single().Key); Assert.AreEqual(ProFormaEvidenceType.Unimod, tag5.Descriptors.Single().EvidenceType); Assert.AreEqual("1", tag5.Descriptors.Single().Value); ProFormaTag tag44 = term.Tags[2]; Assert.AreEqual(43, tag44.ZeroBasedStartIndex); Assert.AreEqual(1, tag44.Descriptors.Count); Assert.AreEqual(ProFormaKey.Identifier, tag44.Descriptors.Single().Key); Assert.AreEqual(ProFormaEvidenceType.Unimod, tag44.Descriptors.Single().EvidenceType); Assert.AreEqual("21", tag44.Descriptors.Single().Value); }
public void MultipleDescriptorTag() { // Tweaking for v2 const string proFormaString = "SEQUEN[Methyl|+14.02]CE"; var term = _parser.ParseString(proFormaString); Assert.AreEqual("SEQUENCE", term.Sequence); Assert.IsNotNull(term.Tags); Assert.AreEqual(1, term.Tags.Count); ProFormaTag tag = term.Tags.Single(); Assert.AreEqual(5, tag.ZeroBasedStartIndex); Assert.AreEqual(2, tag.Descriptors.Count); Assert.AreEqual(ProFormaKey.Name, tag.Descriptors[0].Key); Assert.AreEqual("Methyl", tag.Descriptors[0].Value); Assert.AreEqual(ProFormaKey.Mass, tag.Descriptors[1].Key); Assert.AreEqual("+14.02", tag.Descriptors[1].Value); }
public void BestPractice_iv() { // Tweaking for v2 const string proFormaString = "MTLFQLDEKLTA[-37.995001|info:unknown modification]FRNKSMLFQRELRPNEEVTWK"; var term = _parser.ParseString(proFormaString); Assert.AreEqual("MTLFQLDEKLTAFRNKSMLFQRELRPNEEVTWK", term.Sequence); Assert.IsNotNull(term.Tags); Assert.AreEqual(1, term.Tags.Count); Assert.IsNull(term.NTerminalDescriptors); Assert.IsNull(term.CTerminalDescriptors); ProFormaTag tag12 = term.Tags[0]; Assert.AreEqual(11, tag12.ZeroBasedStartIndex); Assert.AreEqual(2, tag12.Descriptors.Count); Assert.AreEqual(ProFormaKey.Mass, tag12.Descriptors[0].Key); // Unimod Assert.AreEqual("-37.995001", tag12.Descriptors[0].Value); Assert.AreEqual(ProFormaKey.Info, tag12.Descriptors[1].Key); // RESID Assert.AreEqual("unknown modification", tag12.Descriptors[1].Value); }
public void Rule6() { const string proFormaString = "[mass]+S[80]EQVE[14]NCE"; var term = _parser.ParseString(proFormaString); Assert.AreEqual("SEQVENCE", term.Sequence); Assert.IsNotNull(term.Tags); Assert.AreEqual(2, term.Tags.Count); ProFormaTag tag80 = term.Tags[0]; Assert.AreEqual(0, tag80.ZeroBasedStartIndex); Assert.AreEqual(1, tag80.Descriptors.Count); Assert.AreEqual(ProFormaKey.Mass, tag80.Descriptors.Single().Key); Assert.AreEqual("80", tag80.Descriptors.Single().Value); ProFormaTag tag14 = term.Tags[1]; Assert.AreEqual(4, tag14.ZeroBasedStartIndex); Assert.AreEqual(1, tag14.Descriptors.Count); Assert.AreEqual(ProFormaKey.Mass, tag14.Descriptors.Single().Key); Assert.AreEqual("14", tag14.Descriptors.Single().Value); }
public void Rule7andRule6() { const string proFormaString = "[mass]+[-17.027]-SEQ[14.05]VENCE"; var term = _parser.ParseString(proFormaString); Assert.AreEqual("SEQVENCE", term.Sequence); Assert.IsNotNull(term.Tags); Assert.AreEqual(1, term.Tags.Count); Assert.IsNotNull(term.NTerminalDescriptors); Assert.AreEqual(1, term.NTerminalDescriptors.Count); Assert.IsNull(term.CTerminalDescriptors); var nTerm = term.NTerminalDescriptors[0]; Assert.AreEqual(ProFormaKey.Mass, nTerm.Key); Assert.AreEqual("-17.027", nTerm.Value); ProFormaTag tag1 = term.Tags[0]; Assert.AreEqual(2, tag1.ZeroBasedStartIndex); Assert.AreEqual(1, tag1.Descriptors.Count); Assert.AreEqual(ProFormaKey.Mass, tag1.Descriptors.Single().Key); Assert.AreEqual("14.05", tag1.Descriptors.Single().Value); }