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
                    Best Practices for Single-Cell Sequencing Analysis
                    by seqadmin



                    While isolating and preparing single cells for sequencing was historically the bottleneck, recent technological advancements have shifted the challenge to data analysis. This highlights the rapidly evolving nature of single-cell sequencing. The inherent complexity of single-cell analysis has intensified with the surge in data volume and the incorporation of diverse and more complex datasets. This article explores the challenges in analysis, examines common pitfalls, offers...
                    Yesterday, 07:15 AM
                  • seqadmin
                    Latest Developments in Precision Medicine
                    by seqadmin



                    Technological advances have led to drastic improvements in the field of precision medicine, enabling more personalized approaches to treatment. This article explores four leading groups that are overcoming many of the challenges of genomic profiling and precision medicine through their innovative platforms and technologies.

                    Somatic Genomics
                    “We have such a tremendous amount of genetic diversity that exists within each of us, and not just between us as individuals,”...
                    05-24-2024, 01:16 PM

                  ad_right_rmr

                  Collapse

                  News

                  Collapse

                  Topics Statistics Last Post
                  Started by seqadmin, Today, 06:58 AM
                  0 responses
                  13 views
                  0 likes
                  Last Post seqadmin  
                  Started by seqadmin, Yesterday, 08:18 AM
                  0 responses
                  19 views
                  0 likes
                  Last Post seqadmin  
                  Started by seqadmin, Yesterday, 08:04 AM
                  0 responses
                  18 views
                  0 likes
                  Last Post seqadmin  
                  Started by seqadmin, 06-03-2024, 06:55 AM
                  0 responses
                  13 views
                  0 likes
                  Last Post seqadmin  
                  Working...
                  X