public void TestGetCarbonRange() { string peptide = "MAAHRRWLLMSFLFLEVILLEAAK"; Aminoacids aas = new Aminoacids(); double residueMass = aas.MonoResiduesMass(peptide); int expect = aas.AtomCount(peptide, Atom.C); CarbonRange carbonRange = new ProteinCarbonRangePredictor().GetCarbonRange(residueMass); Assert.Greater(expect, carbonRange.Min); Assert.Less(expect, carbonRange.Max); }
public void TestGetCarbonPercentAminoacid() { Aminoacids aas = new Aminoacids(); Aminoacid maxAA = aas.GetMaxCarbonPercentAminoacid(); Assert.AreEqual("Phe", maxAA.ThreeName); Aminoacid minAA = aas.GetMinCarbonPercentAminoacid(); Assert.AreEqual("Cys", minAA.ThreeName); }
//(STY* +79.96633) (M# +15.99492) (ST@ -18.00000) C=160.16523 Enzyme:Trypsin(KR) (1) public static Aminoacids ParseModificationFromOutFileLine(string line) { Dictionary <char, double> map = ModificationUtils.ParseFromOutFileLine(line); var result = new Aminoacids(); foreach (char c in map.Keys) { result[c].ResetMass(map[c], map[c]); } return(result); }
public void TestBuildInfo() { var aas = new Aminoacids(); var addedMass1 = 20.3847; var addedMass2 = 40.3847; aas['*'].ResetMass(addedMass1, addedMass1); aas['#'].ResetMass(addedMass2, addedMass2); var s1 = aas.BuildInfo("R.A#D*K.L"); Assert.AreEqual(3, s1.Count); Assert.AreEqual('A', s1[0].Aminoacid); Assert.AreEqual(aas['A'].MonoMass + addedMass2, s1[0].Mass, 0.0001); Assert.AreEqual(aas['D'].MonoMass + addedMass1, s1[1].Mass, 0.0001); Assert.AreEqual(aas['K'].MonoMass, s1[2].Mass, 0.0001); }
public void TestPeptideAtomCompositionCalculator() { AtomComposition nterm = new AtomComposition("H"); AtomComposition cterm = new AtomComposition("OH"); Aminoacids aas = new Aminoacids(); PeptideAtomCompositionCalculator calc = new PeptideAtomCompositionCalculator(nterm, cterm, aas); //Terminal only IPeptideInfo terminalInfo = new IdentifiedPeptideInfo("", 0.0, 0); AtomComposition terminalActual = calc.GetAtomComposition(terminalInfo); Assert.AreEqual(2, terminalActual[Atom.H]); Assert.AreEqual(1, terminalActual[Atom.O]); //A:C3H5NO IPeptideInfo peptideInfo = new IdentifiedPeptideInfo("A", 0.0, 0); AtomComposition peptideActual = calc.GetAtomComposition(peptideInfo); Assert.AreEqual(3, peptideActual[Atom.C]); Assert.AreEqual(7, peptideActual[Atom.H]); Assert.AreEqual(1, peptideActual[Atom.N]); Assert.AreEqual(2, peptideActual[Atom.O]); }
public Aminoacids(Aminoacids source) { this.mAminoacids = source.mAminoacids; }
public PeptideWeightFilter(Aminoacids aminoacids, double minWeight, double maxWeight) { this.aminoacids = aminoacids; this.minWeight = minWeight; this.maxWeight = maxWeight; }
public AveragePeptideMassCalculator(Aminoacids aas) : base(NTERM, CTERM) { this.aas = aas; }
public AveragePeptideMassCalculator(Aminoacids aas, double nterm, double cterm) : base(nterm, cterm) { this.aas = aas; }
public MonoisotopicPeptideMassCalculator(Aminoacids aas) : base(NTERM, CTERM) { this.aas = aas; }
public MonoisotopicPeptideMassCalculator(Aminoacids aas, double nterm, double cterm) : base(nterm, cterm) { this.aas = aas; }