Seqanswers Leaderboard Ad

Collapse

Announcement

Collapse
No announcement yet.
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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

  • #2
    Sure. Use BEDTools.

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

    Comment


    • #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


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

        Comment


        • #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


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

            Comment


            • #7
              Hi kjaja,

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

              Comment


              • #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


                • #9
                  Sorry I was wrong...

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

                  Comment

                  Latest Articles

                  Collapse

                  • seqadmin
                    Recent Advances in Sequencing Analysis Tools
                    by seqadmin


                    The sequencing world is rapidly changing due to declining costs, enhanced accuracies, and the advent of newer, cutting-edge instruments. Equally important to these developments are improvements in sequencing analysis, a process that converts vast amounts of raw data into a comprehensible and meaningful form. This complex task requires expertise and the right analysis tools. In this article, we highlight the progress and innovation in sequencing analysis by reviewing several of the...
                    05-06-2024, 07:48 AM
                  • seqadmin
                    Essential Discoveries and Tools in Epitranscriptomics
                    by seqadmin




                    The field of epigenetics has traditionally concentrated more on DNA and how changes like methylation and phosphorylation of histones impact gene expression and regulation. However, our increased understanding of RNA modifications and their importance in cellular processes has led to a rise in epitranscriptomics research. “Epitranscriptomics brings together the concepts of epigenetics and gene expression,” explained Adrien Leger, PhD, Principal Research Scientist...
                    04-22-2024, 07:01 AM

                  ad_right_rmr

                  Collapse

                  News

                  Collapse

                  Topics Statistics Last Post
                  Started by seqadmin, 05-10-2024, 06:35 AM
                  0 responses
                  20 views
                  0 likes
                  Last Post seqadmin  
                  Started by seqadmin, 05-09-2024, 02:46 PM
                  0 responses
                  26 views
                  0 likes
                  Last Post seqadmin  
                  Started by seqadmin, 05-07-2024, 06:57 AM
                  0 responses
                  21 views
                  0 likes
                  Last Post seqadmin  
                  Started by seqadmin, 05-06-2024, 07:17 AM
                  0 responses
                  21 views
                  0 likes
                  Last Post seqadmin  
                  Working...
                  X