public void ProteinAnnTransferExactSequenceMatchMods() { List <Modification> mods = ProteinAnnotation.GetUniProtMods(TestContext.CurrentContext.TestDirectory); List <Protein> ok = ProteinDbLoader.LoadProteinXML(Path.Combine(TestContext.CurrentContext.TestDirectory, "TestData", "xml2.xml"), true, DecoyType.None, mods, false, null, out Dictionary <string, Modification> un); List <Protein> destination = new List <Protein> { new Protein("MKTCYYELLGVETHASDLELKKAYRKKALQYHPDKNPDNVEEATQKFAVIRAAYEVLSDPQERAWYDSHKEQILNDTPPSTDDYYDYEVDATVTGVTTDELLLFFNSALYTKIDNSAAGIYQIAGKIFAKLAKDEILSGKRLGKFSEYQDDVFEQDINSIGYLKACDNFINKTDKLLYPLFGYSPTDYEYLKHFYKTWSAFNTLKSFSWKDEYMYSKNYDRRTKREVNRRNEKARQQARNEYNKTVKRFVVFIKKLDKRMKEGAKIAEEQRKLKEQQRKNELNNRRKFGNDNNDEEKFHLQSWQTVKEENWDELEKVYDNFGEFENSKNDKEGEVLIYECFICNKTFKSEKQLKNHINTKLHKKNMEEIRKEMEEENITLGLDNLSDLEKFDSADESVKEKEDIDLQALQAELAEIERKLAESSSEDESEDDNLNIEMDIEVEDVSSDENVHVNTKNKKKRKKKKKAKVDTETEESESFDDTKDKRSNELDDLLASLGDKGLQTDDDEDWSTKAKKKKGKQPKKNSKSTKSTPSLSTLPSSMSPTSAIEVCTTCGESFDSRNKLFNHVKIAGHAAVKNVVKRKKVKTKRI", "") }; Assert.AreEqual(ok[0].BaseSequence, destination[0].BaseSequence); List <Protein> newProteins = ProteinAnnotation.CombineAndAnnotateProteins(ok, destination); Assert.AreEqual(1, newProteins.Count); Assert.AreEqual(ok[0].BaseSequence, newProteins[0].BaseSequence); Assert.AreEqual(ok[0].OneBasedPossibleLocalizedModifications, newProteins[0].OneBasedPossibleLocalizedModifications); Assert.IsTrue(newProteins[0].OneBasedPossibleLocalizedModifications.Keys.Count == 2); Assert.IsTrue(ok[0].DatabaseReferences.All(x => newProteins[0].DatabaseReferences.Contains(x))); Assert.IsTrue(ok[0].ProteolysisProducts.All(x => newProteins[0].ProteolysisProducts.Contains(x))); }
public void Test1() { var mods = ProteinAnnotation.GetUniProtMods(Environment.CurrentDirectory); Assert.Greater(mods.Count, 0); }