Пример #1
0
        public static void GetGeneOrtologSequences()
        {
            //lysC = K00928 (ortholog list)
            //http://rest.kegg.jp/link/genes/K00928

            List <string> Species = new List <string>();

            Species.Add("eco");
            Species.Add("ppf"); // pseudomonada putida f1
            Species.Add("noc"); // Nitrosococcus oceani
            Species.Add("vco"); // Vibrio cholerae O395
            Species.Add("ype"); // Yersinia pestis CO92
            Species.Add("asu"); // Actinobacillus succinogenes
            Species.Add("son"); // Shewanella oneidensis
            Species.Add("acd"); // Acinetobacter oleivorans
            Species.Add("rma"); // Candidatus Ruthia magnifica

            string        OrthologList = KEGG_Mgt.GetOrthologList("K00928");
            List <string> GeneNames    = KEGG_Mgt.GetGeneNamesFromOrthologList(Species, OrthologList);

            List <GeneInfo> GeneInfoList = KEGG_Mgt.GetGeneInfoByKEGGGenes(Species, GeneNames);
            List <Operon>   Operons      = Operon_Mgt.GetOperons(GeneInfoList);
            List <string>   DNASequences = KEGG_Mgt.GetFastaDNASequencesByOperons(Operons, GeneInfoList);

            foreach (string Fasta in DNASequences)
            {
                Console.WriteLine(Fasta);
            }

            Console.ReadKey();
        }
Пример #2
0
        public static List <string> GetFastaDNASequencesByOperons(List <Operon> Operons, List <GeneInfo> GeneInfoList)
        {
            List <string> DNASequences = new List <string>();

            for (int I = 0; I < GeneInfoList.Count; I++)
            {
                if (Operons[I].Strand == 1)
                {
                    DNASequences.Add(
                        KEGG_Mgt.AddFastaDescription(
                            KEGG_Mgt.GetCutSequence(
                                Operons[I].PosLeft - 200, Operons[I].PosLeft, 1, GeneInfoList[I].Chr, GeneInfoList[I].OrganizmAlias),
                            GeneInfoList[I]));
                }
                else
                {
                    DNASequences.Add(
                        KEGG_Mgt.AddFastaDescription(
                            KEGG_Mgt.GetCutSequence(
                                Operons[I].PosRight, Operons[I].PosRight + 200, 2, GeneInfoList[I].Chr, GeneInfoList[I].OrganizmAlias),
                            GeneInfoList[I]));
                }
            }

            SerializeFasta(@"C:\deleteme\Fasta.txt", DNASequences);

            //DNASequences = DeserializeFasta(@"C:\deleteme\Fasta.txt");

            return(DNASequences);
        }
Пример #3
0
        public static void GetPathwaySequences()
        {
            // genes:
            // http://rest.kegg.jp/link/genes/enzyme:2.7.2.4/
            // ortologs:
            // http://www.kegg.jp/kegg-bin/show_pathway?ko00270

            // Enzymes EC No
            List <string> ECList = new List <string>();

            ECList.Add("4.4.1.1");
            ECList.Add("2.5.1.48");
            ECList.Add("2.3.1.46");
            ECList.Add("2.7.2.4");
            ECList.Add("1.2.1.11");
            ECList.Add("1.1.1.3");
            ECList.Add("2.3.1.31");
            ECList.Add("4.2.1.22");
            ECList.Add("4.4.1.8");
            ECList.Add("2.5.1.49");
            ECList.Add("2.1.1.5");
            ECList.Add("2.1.1.10");
            ECList.Add("2.1.1.13");
            ECList.Add("2.1.1.14");
            string Organizm = "eco"; // ece = ecoli / hum = hsa

            List <string>   KEGGGenes    = KEGG_Mgt.GetKEGGGenesIDs(Organizm, ECList);
            List <GeneInfo> GeneInfoList = KEGG_Mgt.GetGeneInfoByKEGGGenes(Organizm, KEGGGenes);

            List <Operon> Operons = Operon_Mgt.GetOperons(GeneInfoList);

            List <string> DNASequences = KEGG_Mgt.GetFastaDNASequencesByOperons(Operons, GeneInfoList);

            foreach (string Fasta in DNASequences)
            {
                Console.WriteLine(Fasta);
            }

            Console.ReadKey();
        }