Unconfigured Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • kjaja
    Member
    • Aug 2011
    • 58

    coverage calculation for exome data

    Hi,

    I am looking to calculate what percentage of all target positions achieved a coverage of at least 50x? can this be done?


    Appreciate your help
  • swbarnes2
    Senior Member
    • May 2008
    • 910

    #2
    Sure. Use BEDTools.

    You'll also want a .bed file of target regions.

    Comment

    • kjaja
      Member
      • Aug 2011
      • 58

      #3
      Hi

      Below is a sample output for the coverage file from bedtools, the coverage ranges from 0 to 8 for the same region (column 5), so I want to see what percentage of the exome was covered by at least 10x. it seems that for each region, I have to find the max number of bases covered by at least 10 x. is there an easy way to do this?


      chr1 176160618 176161057 Spna1-41 0 8 439 0.0182232
      chr1 176160618 176161057 Spna1-41 1 59 439 0.1343964
      chr1 176160618 176161057 Spna1-41 2 92 439 0.2095672
      chr1 176160618 176161057 Spna1-41 3 103 439 0.2346241
      chr1 176160618 176161057 Spna1-41 4 55 439 0.1252847
      chr1 176160618 176161057 Spna1-41 5 21 439 0.0478360
      chr1 176160618 176161057 Spna1-41 6 49 439 0.1116173
      chr1 176160618 176161057 Spna1-41 7 27 439 0.0615034
      chr1 176160618 176161057 Spna1-41 8 25 439 0.0569476

      Comment

      • nexgengirl
        Member
        • Apr 2010
        • 31

        #4
        Picard's hybridization statistics tool could be used. Description at the link below:

        Comment

        • rbagnall
          Member
          • Jun 2010
          • 34

          #5
          I also use Bedtools. You need coverageBed with the -d option to show the coverage per base...

          Code:
          samtools view -b bamfile.bam | coverageBed -abam stdin -b intervals.bed -d > per_base_coverage.txt
          The file can be large as it has one row per base of the exome, but you can firstly use it to count the total number of bases in your exome if you are unsure..

          Code:
          wc -l per_base_coverage.txt
          Then count the number of lines (i.e. bases) having at least 50 fold coverage..

          Code:
          awk '{FS="\t"}{if($5 > "49") print $0}' per_base_coverage.txt | wc -l
          It works for me, but there are could be quicker ways.
          Last edited by rbagnall; 02-21-2013, 02:55 PM.

          Comment

          • kjaja
            Member
            • Aug 2011
            • 58

            #6
            THANKS! but there seem to be syntax error in the last code awk command? I am not sure how to fix it?

            Comment

            • rbagnall
              Member
              • Jun 2010
              • 34

              #7
              Hi kjaja,

              Sorry, there was an extra close parenthesis ) in the awk command. I have corrected it.

              Comment

              • cuiya
                Junior Member
                • Mar 2013
                • 1

                #8
                right?

                Hi,rbagnall
                your answer is useful. but the last code may be "awk '{FS="\t"}{if($5 > 49) print $0}' per_base_coverage.txt | wc -l". right?

                Comment

                • woodydon
                  Member
                  • Jan 2010
                  • 52

                  #9
                  Sorry I was wrong...

                  Woody
                  Last edited by woodydon; 03-19-2014, 11:49 PM.

                  Comment

                  Latest Articles

                  Collapse

                  • GATTACAT
                    Reply to Nine Things a Sample Prep Scientist Thinks About Before Sequencing
                    by GATTACAT
                    Love this - good data definitely starts from good input, and poor input can only give relatively poor data. I particularly like the mention of Nanodrop/absorbance based methods for quantification. It's such a toss up if you'll get an accurate reading or what amounts to a randomly generated number, and a lot of library/sequencing related issues can be traced back to poor quant.
                    07-01-2026, 11:43 AM
                  • SEQadmin2
                    Nine Things a Sample Prep Scientist Thinks About Before Sequencing
                    by SEQadmin2


                    I’m not a sequencing expert. I’m a purification scientist who uses NGS to evaluate workflows my group develops. With this perspective, we think about the sample first and the NGS workflow second. The sequencer is an exceptionally honest reporter, but it can only report on what you give it, so whether you get clean, interpretable data from an NGS workflow is largely determined before you begin.

                    Here are nine questions we think about, in roughly the order they matter, before...
                    06-18-2026, 07:11 AM

                  ad_right_rmr

                  Collapse

                  News

                  Collapse

                  Topics Statistics Last Post
                  Started by SEQadmin2, Yesterday, 11:08 AM
                  0 responses
                  6 views
                  0 reactions
                  Last Post SEQadmin2  
                  Started by SEQadmin2, 06-30-2026, 05:37 AM
                  0 responses
                  11 views
                  0 reactions
                  Last Post SEQadmin2  
                  Started by SEQadmin2, 06-26-2026, 11:10 AM
                  0 responses
                  19 views
                  0 reactions
                  Last Post SEQadmin2  
                  Started by SEQadmin2, 06-17-2026, 06:09 AM
                  0 responses
                  53 views
                  0 reactions
                  Last Post SEQadmin2  
                  Working...