Пример #1
0
        public Ontology_association_line_class Deep_copy()
        {
            Ontology_association_line_class copy = (Ontology_association_line_class)this.MemberwiseClone();

            copy.ProcessName = (string)this.ProcessName.Clone();
            copy.GeneSymbol  = (string)this.GeneSymbol.Clone();
            return(copy);
        }
Пример #2
0
        private void Read_file()
        {
            string       complete_fileName = Global_directory_class.Ontology_directory + this.Ontology.ToString() + ".txt";
            StreamReader reader            = new StreamReader(complete_fileName);
            string       inputLine;

            string[] columnEntries;
            string   columnEntry;
            int      columnEntries_length;
            string   processName;
            string   geneSymbol;

            Ontology_association_line_class        onto_association_line;
            List <Ontology_association_line_class> onto_associations = new List <Ontology_association_line_class>();

            while ((inputLine = reader.ReadLine()) != null)
            {
                columnEntries        = inputLine.Split(Global_class.Tab);
                columnEntries_length = columnEntries.Length;
                processName          = columnEntries[0].Split('(')[0];
                while (processName.Substring(processName.Length - 1, 1) == " ")
                {
                    processName = processName.Substring(0, processName.Length - 1);
                }
                for (int indexC = 1; indexC < columnEntries_length; indexC++)
                {
                    columnEntry = columnEntries[indexC];
                    if (!String.IsNullOrEmpty(columnEntry))
                    {
                        geneSymbol                        = columnEntry.Split(',')[0];
                        onto_association_line             = new Ontology_association_line_class();
                        onto_association_line.GeneSymbol  = (string)geneSymbol.Clone();
                        onto_association_line.ProcessName = (string)processName.Clone();
                        onto_associations.Add(onto_association_line);
                    }
                }
            }
            this.Process_gene_associations = onto_associations.ToArray();
        }