//Method that use the basic details of the mutation and generate all extra details. public void extractExtraData() { try { //get gene details from lodal db, if not exit create new gene and add it to locel db _gene = MainBL.getGene(_geneName, _chrom); if (_gene == null) { _gene = MainBL.addGene(_geneName, _chrom); } _strand = _gene.Strand; if (_strand.Equals('+')) { _cosmicDetails = MainBL.getCosmicDetails(_chromNum, _position, _ref, _var); } else if (_strand.Equals('-')) { _cosmicDetails = MainBL.getCosmicDetails(_chromNum, _position, OppositeNuc(_ref), OppositeNuc(_var)); } setVarRefCodons(_gene.getOffsetInCodon(_position)); } catch (Exception) { throw; } //sets the rest of the mutation details. if (!_refCodon.Equals("No Coding")) { _varAA = GeneralMethods.getAminoAcid(_varCodon); _refAA = GeneralMethods.getAminoAcid(_refCodon); } else { _varAA = "-----"; _refAA = "-----"; } if (_cosmicDetails != null) { _cosmicName = _cosmicDetails.ElementAt(0); _pMutationName = _cosmicDetails.ElementAt(1); _cMutationName = _cosmicDetails.ElementAt(2); } else { _cosmicName = "-----"; _pMutationName = "-----"; _cMutationName = "-----"; } }
public static Gene getGene(string geneName, string chrom) { Gene g = null; List <String> geneStrings = null; try { geneStrings = LocalDbDAL.getGene(geneName, chrom); if (geneStrings != null) { char strand = Convert.ToChar(geneStrings[2]); int[] exonStarts = exonStringToIntArray(geneStrings[3]); int[] exonEnds = exonStringToIntArray(geneStrings[4]); g = new Gene(geneName, chrom, strand, exonStarts, exonEnds); } return(g); } catch (Exception) { throw; } }
//Method that use the basic details of the mutation and generate all extra details. public void extractExtraData() { try { //get gene details from lodal db, if not exit create new gene and add it to locel db _gene = MainBL.getGene(_geneName, _chrom); if (_gene == null) _gene = MainBL.addGene(_geneName, _chrom); _strand = _gene.Strand; if (_strand.Equals('+')) _cosmicDetails = MainBL.getCosmicDetails(_chromNum, _position, _ref, _var); else if (_strand.Equals('-')) _cosmicDetails = MainBL.getCosmicDetails(_chromNum, _position, OppositeNuc(_ref), OppositeNuc(_var)); setVarRefCodons(_gene.getOffsetInCodon(_position)); } catch (Exception) { throw; } //sets the rest of the mutation details. if (!_refCodon.Equals("No Coding")) { _varAA = GeneralMethods.getAminoAcid(_varCodon); _refAA = GeneralMethods.getAminoAcid(_refCodon); } else { _varAA = "-----"; _refAA = "-----"; } if (_cosmicDetails != null) { _cosmicName = _cosmicDetails.ElementAt(0); _pMutationName = _cosmicDetails.ElementAt(1); _cMutationName = _cosmicDetails.ElementAt(2); } else { _cosmicName = "-----"; _pMutationName = "-----"; _cMutationName = "-----"; } }
public static Gene getGene(string geneName, string chrom) { Gene g = null; List<String> geneStrings = null; try { geneStrings = LocalDbDAL.getGene(geneName, chrom); if (geneStrings != null) { char strand = Convert.ToChar(geneStrings[2]); int[] exonStarts = exonStringToIntArray(geneStrings[3]); int[] exonEnds = exonStringToIntArray(geneStrings[4]); g = new Gene(geneName, chrom, strand, exonStarts, exonEnds); } return g; } catch (Exception) { throw; } }
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; } }