public void Load(System.Xml.Linq.XElement parentNode) { ITraqFileName = parentNode.Element("ITraqFileName").Value; RatioPeptideToProteinBuilder = RatioPeptideToProteinBuilderFactory.FindBuilder(parentNode.Element("RatioPeptideToProteinBuilderName").Value); References = (from refname in parentNode.Element("References").Elements("Index") let index = int.Parse(refname.Value) select new IsobaricIndex(index)).ToList(); MinimumProbability = MyConvert.ToDouble(parentNode.Element("MinProbability").Value); NormalizeByMedianRatio = bool.Parse(parentNode.Element("NormalizeByMedianRatio").Value); if (parentNode.Element("QuantifyModifiedPeptideOnly") != null) { QuantifyModifiedPeptideOnly = bool.Parse(parentNode.Element("QuantifyModifiedPeptideOnly").Value); } else { QuantifyModifiedPeptideOnly = false; } if (parentNode.Element("ModificationChars") != null) { ModificationChars = parentNode.Element("ModificationChars").Value; } else { ModificationChars = "!#"; } DatasetMap = new Dictionary <string, List <string> >(); foreach (var ds in parentNode.Element("DatasetMap").Elements("Dataset")) { var name = ds.Element("Name").Value; var value = (from v in ds.Element("Values").Elements("Value") select v.Value).ToList(); DatasetMap[name] = value; } }
public AbstractITraqProteinStatisticBuilderUI() { InitializeComponent(); base.SetFileArgument("ProteinsFile", new OpenFileArgument("Proteins", "noredundant")); this.iTraqFile = new RcpaFileField(btnRLocation, txtRLocation, "ITraqFile", new OpenFileArgument("iTRAQ", "itraq.xml"), true); this.AddComponent(this.iTraqFile); minProbability = new RcpaDoubleField(txtValidProbability, "MinValidProbability", "Minimum valid probability", 0.01, true); AddComponent(minProbability); normalize = new RcpaCheckBox(cbNormalize, "Normalize", false); AddComponent(normalize); builders = new RcpaComboBox <IRatioPeptideToProteinBuilder>(cbRatioCalculator, "RatioBuilder", RatioPeptideToProteinBuilderFactory.GetBuilders(), 0); AddComponent(builders); filterPeptide = new RcpaCheckBox(cbFilterPeptide, "FilterPeptide", true); AddComponent(filterPeptide); modifiedPeptideOnly = new RcpaCheckBox(cbModifiedOnly, "ModifiedOnly", false); AddComponent(modifiedPeptideOnly); modifiedChar = new RcpaTextField(txtModifiedCharacter, "ModifiedChar", "Input modified characters which indicates isobaric labelling(such as @#)", "@#", false); modifiedChar.PreCondition = cbModifiedOnly; AddComponent(modifiedChar); AddComponent(itraqIons); AddComponent(pnlClassification); }