public override void AddInternalProfiles() { profileNode node = new profileNode(); node.profName = "SA CA"; node.internalName = "SA CA"; for (int i = 0; i < 10; i++) { node.AddStateItem(i.ToString(), i.ToString()); } InternalProfilesManager.AddNodeToList(node, typeof(CAProfiles).FullName); node = new profileNode(); node.profName = "SS CA"; node.internalName = "SS CA"; node.AddStateItem("H", "H"); node.AddStateItem("J", "J"); node.AddStateItem("K", "K"); node.AddStateItem("L", "L"); node.AddStateItem("E", "E"); node.AddStateItem("R", "R"); node.AddStateItem("T", "T"); node.AddStateItem("Y", "Y"); node.AddStateItem("U", "U"); node.AddStateItem("N", "N"); InternalProfilesManager.AddNodeToList(node, typeof(CAProfiles).FullName); }
public override void AddInternalProfiles() { profileNode node = new profileNode(); node.profName = profileName; node.internalName = profileName; node.AddStateItem("0", "0"); node.AddStateItem("1", "1"); node.AddStateItem("2", "2"); node.AddStateItem("3", "3"); InternalProfilesManager.AddNodeToList(node, typeof(ContactMapProfileRNA).FullName); }
public override void AddInternalProfiles() { profileNode node = new profileNode(); node.profName = profileName; node.internalName = profileName; node.AddStateItem("0", "0"); node.AddStateItem("1", "1"); node.AddStateItem("2", "2"); node.AddStateItem("3", "3"); InternalProfilesManager.AddNodeToList(node, typeof(ContactMapProfileRNA).FullName); }
public override void AddInternalProfiles() { profileNode node = new profileNode(); node.profName = profileName; node.internalName = profileName; for (int i = 0; i < 255; i++) { node.AddStateItem(i.ToString(), i.ToString(), true); } InternalProfilesManager.AddNodeToList(node, typeof(FragBagProfile).FullName); }
private void button2_Click(object sender, EventArgs e) { localNode.profName = textBox1.Text; for (int i = 0; i < dataGridView1.Rows.Count; i++) { if (dataGridView1.Rows[i].Cells[0].Value != null && dataGridView1.Rows[i].Cells[1].Value != null) { localNode.AddStateItem((string)dataGridView1.Rows[i].Cells[0].Value, (string)dataGridView1.Rows[i].Cells[1].Value); } } localNode.profWeights.Clear(); for (int i = 0; i < dataGridView2.Rows.Count; i++) { if (dataGridView2.Rows[i].Cells[0].Value != null && dataGridView2.Rows[i].Cells[1].Value != null) { string item1 = (string)dataGridView2.Rows[i].Cells[0].Value; string item2 = (string)dataGridView2.Rows[i].Cells[1].Value; if (localNode.profWeights.ContainsKey(item1)) { if (localNode.profWeights[item1].ContainsKey(item2)) { localNode.profWeights[item1].Remove(item2); } localNode.profWeights[item1].Add(item2, Convert.ToDouble(dataGridView2.Rows[i].Cells[2].Value.ToString())); } else { SerializableDictionary <string, double> ww = new SerializableDictionary <string, double>(); ww.Add(item2, Convert.ToDouble(dataGridView2.Rows[i].Cells[2].Value.ToString())); localNode.profWeights.Add(item1, ww); } } } this.DialogResult = DialogResult.OK; this.Close(); }
public override void AddInternalProfiles() { profileNode node = new profileNode(); node.profName = "RNA_SS"; node.internalName = "RNA_SS"; foreach (var item in SSList) { node.AddStateItem(item, item); } InternalProfilesManager.AddNodeToList(node, typeof(RNASSProfile).FullName); node = new profileNode(); node.profName = "RNA_LW"; node.internalName = "RNA_LW"; foreach (var item in LWList) { node.AddStateItem(item, item); } InternalProfilesManager.AddNodeToList(node, typeof(RNASSProfile).FullName); }
public override void AddInternalProfiles() { profileNode node = new profileNode(); node.profName = "SS"; node.internalName = "SS"; foreach (var item in SSList) { node.AddStateItem(item, item); } InternalProfilesManager.AddNodeToList(node, typeof(DsspInternalProfile).FullName); node = new profileNode(); node.profName = "SA"; node.internalName = "SA"; for (int i = 0; i < 10; i++) { node.AddStateItem(i.ToString(), i.ToString()); } InternalProfilesManager.AddNodeToList(node, typeof(DsspInternalProfile).FullName); }
public override void AddInternalProfiles() { profileNode node = new profileNode(); node.profName = "Contact"; node.internalName = "Contact"; for (int i = 0; i < 10; i++) { node.AddStateItem(i.ToString(), i.ToString()); } //manager.AddNodeToList(node, "P"); node.AddStateItem("T", "T"); node.AddStateItem("C", "C"); node.AddStateItem("P", "P"); node.AddStateItem("H", "H"); node.AddStateItem("E", "E"); InternalProfilesManager.AddNodeToList(node, typeof(ContactProfile).FullName); }
public override void AddInternalProfiles() { profileNode node = new profileNode(); node.profName = "Contact CA"; node.internalName = "Contact CA"; for (int i = 0; i < 10; i++) node.AddStateItem(i.ToString(), i.ToString()); InternalProfilesManager.AddNodeToList(node, typeof(CAProfiles).FullName); node = new profileNode(); node.profName = "SS CA"; node.internalName = "SS CA"; node.AddStateItem("H", "H"); node.AddStateItem("J", "J"); node.AddStateItem("K", "K"); node.AddStateItem("L", "L"); node.AddStateItem("E", "E"); node.AddStateItem("R", "R"); node.AddStateItem("T", "T"); node.AddStateItem("Y", "Y"); node.AddStateItem("U", "U"); node.AddStateItem("N", "N"); InternalProfilesManager.AddNodeToList(node, typeof(CAProfiles).FullName); }
public static ProfileTree AnalyseProfileFile(string fileName, SIMDIST similarityFlag) { ProfileTree t = new ProfileTree(); StreamReader wr; if (fileName == null || !File.Exists(fileName)) throw new Exception("File:" + fileName + " not exists"); wr = new StreamReader(fileName); string line = wr.ReadLine(); Dictionary<string, Dictionary<string, int>> dic = new Dictionary<string, Dictionary<string, int>>(); while (line != null) { if (line.Contains(">")) { line = wr.ReadLine(); while (line != null && line[0] != '>') { if (line.Contains("profile") && !line.Contains("SEQ")) { string[] tmp = line.Split(new string[] { " profile " }, StringSplitOptions.None); if (!dic.ContainsKey(tmp[0])) dic.Add(tmp[0], new Dictionary<string, int>()); string[] aux; if (tmp[1].Contains(" ")) aux = tmp[1].Split(' '); else { aux = new string[tmp[1].Length]; for (int i = 0; i < tmp[1].Length; i++) aux[i] = tmp[1][i].ToString(); } foreach (var item in aux) if (item != "-" && item!="") if (!dic[tmp[0]].ContainsKey(item)) dic[tmp[0]].Add(item, 0); } line = wr.ReadLine(); } } else line = wr.ReadLine(); } wr.Close(); if (dic.Keys.Count == 0) throw new Exception("File " + fileName + " is not valid Profile file!"); foreach (var item in dic) { profileNode node = new profileNode(); node.active = true; node.internalName = "User defined profile"; node.profName = item.Key; foreach (var itemK in item.Value) node.AddStateItem(itemK.Key, itemK.Key); node.profWeights = GenerateWeights(new List<string>(item.Value.Keys), similarityFlag); t.AdddNode("/", node); } // t.pr return t; }
public static ProfileTree AnalyseProfileFile(string fileName, SIMDIST similarityFlag, string internalName = null) { ProfileTree t = new ProfileTree(); StreamReader wr; if (fileName == null || !File.Exists(fileName)) { throw new Exception("File:" + fileName + " not exists"); } wr = new StreamReader(fileName); string line = wr.ReadLine(); Dictionary <string, Dictionary <string, int> > dic = new Dictionary <string, Dictionary <string, int> >(); while (line != null) { if (line.Contains(">")) { line = wr.ReadLine(); while (line != null && line[0] != '>') { if (line.Contains("profile") && !line.Contains("SEQ")) { string[] tmp = line.Split(new string[] { " profile " }, StringSplitOptions.None); if (!dic.ContainsKey(tmp[0])) { dic.Add(tmp[0], new Dictionary <string, int>()); } string[] aux; if (tmp[1].Contains(" ")) { aux = tmp[1].Split(' '); } else { aux = new string[tmp[1].Length]; for (int i = 0; i < tmp[1].Length; i++) { aux[i] = tmp[1][i].ToString(); } } foreach (var item in aux) { if (item != "-" && item != "") { if (!dic[tmp[0]].ContainsKey(item)) { dic[tmp[0]].Add(item, 0); } } } } line = wr.ReadLine(); } } else { line = wr.ReadLine(); } } wr.Close(); if (dic.Keys.Count == 0) { throw new Exception("File " + fileName + " is not valid Profile file!"); } foreach (var item in dic) { profileNode node = new profileNode(); node.active = true; if (internalName != null) { node.internalName = internalName; } else { node.internalName = "User defined profile"; } node.profName = item.Key; foreach (var itemK in item.Value) { node.AddStateItem(itemK.Key, itemK.Key); } node.profWeights = GenerateWeights(new List <string>(item.Value.Keys), similarityFlag); t.AdddNode("/", node); } // t.pr return(t); }
public override void AddInternalProfiles() { profileNode node = new profileNode(); node.profName = "Contact"; node.internalName = "Contact"; for (int i = 0; i < 10; i++) node.AddStateItem(i.ToString(), i.ToString()); //manager.AddNodeToList(node, "P"); node.AddStateItem("T", "T"); node.AddStateItem("C", "C"); node.AddStateItem("P", "P"); node.AddStateItem("H", "H"); node.AddStateItem("E", "E"); InternalProfilesManager.AddNodeToList(node, typeof(ContactProfile).FullName); }