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
                    Current Approaches to Protein Sequencing
                    by seqadmin


                    Proteins are often described as the workhorses of the cell, and identifying their sequences is key to understanding their role in biological processes and disease. Currently, the most common technique used to determine protein sequences is mass spectrometry. While still a valuable tool, mass spectrometry faces several limitations and requires a highly experienced scientist familiar with the equipment to operate it. Additionally, other proteomic methods, like affinity assays, are constrained...
                    04-04-2024, 04:25 PM
                  • seqadmin
                    Strategies for Sequencing Challenging Samples
                    by seqadmin


                    Despite advancements in sequencing platforms and related sample preparation technologies, certain sample types continue to present significant challenges that can compromise sequencing results. Pedro Echave, Senior Manager of the Global Business Segment at Revvity, explained that the success of a sequencing experiment ultimately depends on the amount and integrity of the nucleic acid template (RNA or DNA) obtained from a sample. “The better the quality of the nucleic acid isolated...
                    03-22-2024, 06:39 AM

                  ad_right_rmr

                  Collapse

                  News

                  Collapse

                  Topics Statistics Last Post
                  Started by seqadmin, 04-11-2024, 12:08 PM
                  0 responses
                  25 views
                  0 likes
                  Last Post seqadmin  
                  Started by seqadmin, 04-10-2024, 10:19 PM
                  0 responses
                  29 views
                  0 likes
                  Last Post seqadmin  
                  Started by seqadmin, 04-10-2024, 09:21 AM
                  0 responses
                  24 views
                  0 likes
                  Last Post seqadmin  
                  Started by seqadmin, 04-04-2024, 09:00 AM
                  0 responses
                  52 views
                  0 likes
                  Last Post seqadmin  
                  Working...
                  X