void generateFileInThread() { List <int[]> hbonds = RNAView.findHbonds(); PlotManager.Instance.PlotAdd("NHBonds", hbonds.Count); int sequenceLength = MoleculeModel.sequence.Count(); string structure = VARNA.generateStructureString(sequenceLength, hbonds); varnaProcess = VARNA.generateImage(MoleculeModel.sequence, structure, outputDirectory, "test.png"); varnaProcess.Exited += new EventHandler(varnaProcess_Exited); varnaProcess.Start(); }
static void BuildHireRnaHydrogenBondsStructures() { foreach (KeyValuePair <int, ArrayList> entry in MoleculeModel.residues) { int nbOfAtoms = entry.Value.Count; int i = 0; while (i != nbOfAtoms) { int atomIndex = (int)entry.Value[i]; string atomName = MoleculeModel.atomsNamelist[atomIndex]; if (atomName == "C1" || atomName == "G2" || atomName == "U1" || atomName == "A2") { MoleculeModel.baseIdx.Add(atomIndex); i = nbOfAtoms; } else { i++; } } } StreamReader sr = new StreamReader(GUIDisplay.directorypath + "/scale_RNA.dat"); string s; // Debug.Log ("------------"); float num; int t = 0; string substr; while ((s = sr.ReadLine()) != null) { substr = s.Substring(7, 10); // Debug.Log(substr); num = float.Parse(substr); // Debug.Log ("Scale RNA " + t + " " + num); MoleculeModel.scale_RNA.Add(num); t++; } Debug.Log(MoleculeModel.scale_RNA.Count); RNAView.RNAView_init(); // Debug.Log ("------------"); }