public static Protease AddProtease(string name, Terminus terminus, string cut, string noCut = "") { Protease protease = new Protease(name, terminus, cut, noCut); Proteases[name] = protease; OnProteasesChanged(); return(protease); }
public Protease GetSampleProtease() { var node = _root.SelectSingleNode("//pepxml:sample_enzyme", _nsmgr); var name = node.Attributes["name"].Value; Protease protease; var specificityNode = node.FirstChild; string sense = specificityNode.Attributes["sense"].Value; string cut = specificityNode.Attributes["cut"].Value; string nocut = specificityNode.Attributes["no_cut"].Value; protease = new Protease(name, (sense.Equals("C")) ? Terminus.C : Terminus.N, cut, nocut); //Protease protease = new Protease(name, (sense.Equals("C")) ? Terminus.C : Terminus.N, cut, nocut); return protease; }
public void WriteSearchProtease(Protease protease, int maxMissedClevages, bool semiDigested = false) { if (CurrentStage != Stage.SearchSummary) throw new ArgumentException("You must be in the Search Summary stage to write modifications"); _writer.WriteStartElement("enzymatic_search_constraint"); _writer.WriteAttributeString("enzyme", protease.Name); _writer.WriteAttributeString("max_num_internal_clevages", maxMissedClevages.ToString()); _writer.WriteAttributeString("min_number_termini", (semiDigested) ? "1" : "2"); _writer.WriteEndElement(); }
public void WriteSampleProtease(Protease protease) { if (CurrentStage != Stage.RunSummary) throw new ArgumentException("You must be in the Run Summary stage to write proteases"); _writer.WriteStartElement("sample_enzyme"); _writer.WriteAttributeString("name", protease.Name); _writer.WriteStartElement("specificity"); _writer.WriteAttributeString("sense", Enum.GetName(typeof(Terminus), protease.Terminal)); //_writer.WriteAttributeString("pattern", protease.CleavagePattern); // not part of the schema _writer.WriteAttributeString("cut", protease.Cut); _writer.WriteAttributeString("no_cut", protease.NoCut); _writer.WriteEndElement(); // specificity _writer.WriteEndElement(); // sample_enzyme }
public static bool RemoveProtease(Protease protease) { return(RemoveProtease(protease.Name)); }
public static bool TryGetProtease(string name, out Protease protease) { return(Proteases.TryGetValue(name, out protease)); }
public static bool TryGetProtease(string name, out Protease protease) { return Proteases.TryGetValue(name, out protease); }
public static bool RemoveProtease(Protease protease) { return RemoveProtease(protease.Name); }
public static Protease AddProtease(string name, Terminus terminus, string cut, string noCut = "") { Protease protease = new Protease(name, terminus, cut, noCut); Proteases[name] = protease; OnProteasesChanged(); return protease; }
public static Protease AddProtease(string name, Terminus terminus, string cut, string noCut = "") { Protease protease = new Protease(name, terminus, cut, noCut); Proteases.Add(protease.Name, protease); return protease; }