Esempio n. 1
0
		public static Enzyme[] ToEnzymes(string[] enz){
			Enzyme[] result = new Enzyme[enz.Length];
			for (int i = 0; i < result.Length; i++){
				result[i] = ToEnzyme(enz[i]);
			}
			return result;
		}
Esempio n. 2
0
		public static List<Enzyme> ReadProteaseList(){
			List<Enzyme> proteases = new List<Enzyme>();
			string filename = Path.Combine(FileUtils.GetConfigPath(), "enzymes.xml");
			if (!File.Exists(filename)){
				return proteases;
			}
			EnzymeList prot = (EnzymeList) XmlSerialization.DeserializeObject(filename, typeof (EnzymeList));
			if (prot != null){
				for (int i = 0; i < prot.Enzymes.Length; i++){
					Enzyme enzyme = prot.Enzymes[i];
					enzyme.Index = (ushort) i;
					proteases.Add(enzyme);
				}
			}
			return proteases;
		}