示例#1
0
        public static Gene addGene(string geneName, string chrom)
        {
            List <String> geneStrings = null;
            Gene          toReturn    = null;

            try
            {
                geneStrings = UcscDAL.getGene(geneName, chrom);
                if (geneStrings != null)
                {
                    char  strand    = Convert.ToChar(geneStrings[0]);
                    int   cdsStart  = int.Parse(geneStrings[1]);
                    int   cdsEnd    = int.Parse(geneStrings[2]);
                    int[] exonStars = exonStringToIntArray(geneStrings[4]);
                    int[] exonEnds  = exonStringToIntArray(geneStrings[5]);
                    toReturn = new Gene(geneName, chrom, strand, cdsStart, cdsEnd, exonStars, exonEnds);
                    string tempExonStarts = exonIntArrayToString(toReturn.ExonStarts);
                    string tempExonEnds   = exonIntArrayToString(toReturn.ExonEnds);

                    LocalDbDAL.addGene(geneName, chrom, strand, tempExonStarts, tempExonEnds);
                }
                return(toReturn);
            }
            catch (Exception)
            {
                throw;
            }
        }
示例#2
0
 public static List <String> getCosmicDetails(string chromNum, int position, char refNuc, char varNuc)
 {
     try
     {
         return(UcscDAL.getCosmicDetails(chromNum, position, refNuc, varNuc));
     }
     catch (Exception)
     {
         throw;
     }
 }