Ejemplo n.º 1
0
        /// <summary>
        /// Reads information returned from query and stores it as a protein level SNP
        /// </summary>
        /// <param name="curRow"></param>
        /// <param name="function"></param>
        /// <param name="snplist"></param>
        public void ProcessSequenceChangeResult(DataRow curRow, string function, List <Snp> snplist)
        {
            Snp result = new Snp();

            result.LoadData(curRow);

            if (function == "41")
            {
                result.ModifiedPeptideString = "Stop-Gain";
            }
            else if (function == "43")
            {
                result.ModifiedPeptideString = "Stop-Loss";
            }
            else if (function == "44")
            {
                result.ModifiedPeptideString = "Frameshift";
            }
            else if (function == "45")
            {
                result.ModifiedPeptideString = "CDS-Indel";
            }
            else
            {
                result.ModifiedPeptideString = "Unknown";
            }

            if (result.MinorAlleleFrequency != -1)
            {
                snplist.Add(result);
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Reads information returned from query and stores it in the peptide it corresponds to
        /// </summary>
        /// <param name="curRow"></param>
        /// <param name="plist"></param>
        public void ProcessMissenseResult(DataRow curRow, List <Peptide> plist)
        {
            //Find the SNP's position...
            int pos = DbCInt(curRow["aa_pos"]);

            foreach (Peptide pep in plist)
            {
                //...see if it lies within a peptide in our list...
                if (pos > pep.IndexStart && pos < pep.IndexStop)
                {
                    //...then make a Snp object for it...
                    Snp result = new Snp();
                    result.LoadData(curRow);

                    //...and add that object to the Snp List for that peptide
                    pep.Snps.Add(result);
                    pep.FoundVariantInQuery = true;
                }
            }
        }