Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • empyrean
    Member
    • Sep 2010
    • 52

    #1

    Extracting the base/nucleotide across all reads at particular position/s

    Hello everyone. I will try to explain with an example of what i need.

    We have vcf file to get some positions of snps.
    Code:
    #CHROM POS     ID        REF ALT    QUAL FILTER INFO                              FORMAT      NA00001        NA00002        NA00003
    20     14370   rs6054257 G      A       29   PASS   NS=3;DP=14;AF=0.5;DB;H2           GT:GQ:DP:HQ 
    20     17330   .         T      A       3    q10    NS=3;DP=11;AF=0.017               GT:GQ:DP:HQ 
    20     1110696 rs6040355 A      G,T     67   PASS   NS=2;DP=10;AF=0.333,0.667;AA=T;DB GT:GQ:DP:HQ 
    20     1230237 .         T      .       47   PASS   NS=3;DP=13;AA=T                   GT:GQ:DP:HQ
    and a bam file with the alignments to reference. the approximate depth is 20x and all are 454 reads. Now from this information, i wanted to extract all the bases at the particular positions.. I need output of something like this.

    Read Name Position1 Position2 Position3 Position4
    14370 17330 1110696 1230237
    Read1 G T A T
    Read2 A A G .
    Read3 A A G .
    Read4 G A A T
    Read5 A T T .
    Read6 A T T .
    Read7 G A A T
    I would like to build such table using all reads at specific position. Can this be possible by samtools mpileup/vcf tools or does anyone has any script written to solve such problem. From this information i will be extracting the haplotype information for specific genotypes.
    Last edited by empyrean; 05-21-2012, 09:46 AM.
  • empyrean
    Member
    • Sep 2010
    • 52

    #2
    Any suggestions / comments?

    Comment

    • Heisman
      Senior Member
      • Dec 2010
      • 534

      #3
      You can generate the consensus at each of those positions with mpileup and then look at the DP4 values to see how many bases match the reference and how many bases match a variant allele. Is that sufficient?

      Comment

      • empyrean
        Member
        • Sep 2010
        • 52

        #4
        Thank you for the reply. Actually No because, i need to get the exact base for the read to build such haplotype graph.

        Comment

        • Heisman
          Senior Member
          • Dec 2010
          • 534

          #5
          Oh, I see; in your example your bases are so far apart that wouldn't be possible and hence I didn't think that was what you actually wanted to do. I'm not sure how to do this so maybe somebody else will chime in.

          Comment

          • empyrean
            Member
            • Sep 2010
            • 52

            #6
            Thanks again.. hoping for some help here !!

            Comment

            • mbayer
              Member
              • Mar 2009
              • 31

              #7
              Hi empyrean,

              the GATK toolkit has a powerful Java API for extracting information from BAM files at all sorts of levels, including individual bases from individual reads - there may be some mileage in there for you:

              http://www.broadinstitute.org/gsa/wi....php/Main_Page

              cheers

              Micha

              Comment

              • vdauwera
                Member
                • Apr 2012
                • 43

                #8
                Originally posted by mbayer View Post
                Hi empyrean,

                the GATK toolkit has a powerful Java API for extracting information from BAM files at all sorts of levels, including individual bases from individual reads - there may be some mileage in there for you:

                http://www.broadinstitute.org/gsa/wi....php/Main_Page

                cheers

                Micha
                I agree with Micha -- you can get the GATK to do that for you. You would need to modify a walker to walk the reference, get the pileup at each position you want (which you can specify in an input file) and return the results formatted as a table.

                Comment

                • jasongallant
                  Junior Member
                  • Feb 2012
                  • 1

                  #9
                  Any progress on this

                  I'm actually trying to do something similar. Did you have any progress with GATK on this, or did you find another method? Many thanks!

                  Comment

                  Latest Articles

                  Collapse

                  • SEQadmin2
                    Multiomic Liquid Biopsy: What DNA/RNA Panels Reveal That DNA Alone Can’t
                    by SEQadmin2



                    Tumors contain complex mixtures of cell populations that evolve in response to treatment and host-specific factors. Tissue biopsies provide only static snapshots of a tumor’s state. But what if we could follow that evolution over time using a minimally invasive technique?

                    Liquid biopsies can detect tumor-derived material circulating in the bloodstream, providing a way to study treatment response, detect emerging resistance, and discover new biomarkers. Circulating
                    ...
                    10-14-2026, 09:55 AM
                  • SEQadmin2
                    New Genomics Technologies Take Aim at Long-Standing Limits
                    by SEQadmin2


                    Researchers using sequencing and genomics tools often have to make trade-offs. They can choose between speed or scale, short reads or long-range information, or targeted panels or a view of the whole transcriptome. New technologies that have been released this year are built to address those tough choices.

                    We asked six companies the same four questions to learn about their latest products. The new technologies bring a lot to the table, including rethinking sequencing
                    ...
                    09-28-2026, 10:25 AM

                  ad_right_rmr

                  Collapse

                  News

                  Collapse

                  Topics Statistics Last Post
                  Started by SEQadmin2, 10-22-2026, 11:13 AM
                  0 responses
                  62 views
                  0 reactions
                  Last Post SEQadmin2  
                  Started by SEQadmin2, 10-22-2026, 10:48 AM
                  0 responses
                  44 views
                  0 reactions
                  Last Post SEQadmin2  
                  Started by SEQadmin2, 10-15-2026, 10:52 AM
                  0 responses
                  77 views
                  0 reactions
                  Last Post SEQadmin2  
                  Started by SEQadmin2, 10-14-2026, 05:39 AM
                  0 responses
                  76 views
                  0 reactions
                  Last Post SEQadmin2  
                  Working...