상속: IProtease
예제 #1
0
        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);
        }
예제 #2
0
        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;
        }
예제 #3
0
        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();
        }
예제 #4
0
        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
        }
예제 #5
0
 public static bool RemoveProtease(Protease protease)
 {
     return(RemoveProtease(protease.Name));
 }
예제 #6
0
 public static bool TryGetProtease(string name, out Protease protease)
 {
     return(Proteases.TryGetValue(name, out protease));
 }
예제 #7
0
 public static bool TryGetProtease(string name, out Protease protease)
 {
     return Proteases.TryGetValue(name, out protease);
 }
예제 #8
0
 public static bool RemoveProtease(Protease protease)
 {
     return RemoveProtease(protease.Name);
 }
예제 #9
0
        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;
        }
예제 #10
0
파일: Protease.cs 프로젝트: B-Rich/CSMSL
 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;
 }