Seqanswers Leaderboard Ad

Collapse

Announcement

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

  • getting rid of 0 entries in bedTools genomeCoverageBed tool

    I am trying to use genomeCoverageBed in the bedTools suite to find coverage of each base in the human genome from an RNA seq bam file that has been generated with TopHat. The output file gets enormous because all of the positions with 0 hits are included. Is there a way I can get the output file to include only chromosome-coordinate pairs that have non-zero hits? This is the command that I use to generate the output file:


    genomeCoverageBed -ibam bamfile.bam -g human.hg19.genome -d -split > genome_coverage_split_071711_1.txt

    Thanks.

    Eric

  • #2
    So this is basically making a .wig file? Is it a fixedStep (one column) or variableStep (two column) file? If you have a lot of 0's it is probably better to use variableStep. I haven't used bedTools so I don't know if that is an option within that program.
    Last edited by biznatch; 07-17-2011, 08:34 PM.

    Comment


    • #3
      Originally posted by efoss View Post
      I am trying to use genomeCoverageBed in the bedTools suite to find coverage of each base in the human genome from an RNA seq bam file that has been generated with TopHat. The output file gets enormous because all of the positions with 0 hits are included. Is there a way I can get the output file to include only chromosome-coordinate pairs that have non-zero hits? This is the command that I use to generate the output file:


      genomeCoverageBed -ibam bamfile.bam -g human.hg19.genome -d -split > genome_coverage_split_071711_1.txt

      Thanks.

      Eric
      Hi,
      Assuming the BED output looks something like this (where line2 is to be filtered out):
      Code:
      chr1	1	10	line1	1	+
      chr2	100	1000	line2	0	-
      chr3	200	210	line3	10	-
      You could parse the output of genomeCoverageBed with grep:
      Code:
      genomeCoverageBed -ibam bamfile.bam -g human.hg19.genome -d -split | grep -P -v .+?[[:blank:]].+?[[:blank:]].+?[[:blank:]]0[[:blank:]].+? > genome_coverage_split_071711_1.txt
      (Untested... Make sure it does what you want!)

      Dario

      Comment


      • #4
        Were you using the -d flag (reports coverage for every single base)? I once used:

        awk '$3>0' < in.file > out.file

        This ensures the bedTools output only has coverage greater then 0.

        Comment


        • #5
          Thanks very much, all. I'll look in to these solutions.

          Comment

          Latest Articles

          Collapse

          • 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...
            Yesterday, 07:01 AM
          • 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

          ad_right_rmr

          Collapse

          News

          Collapse

          Topics Statistics Last Post
          Started by seqadmin, 04-11-2024, 12:08 PM
          0 responses
          58 views
          0 likes
          Last Post seqadmin  
          Started by seqadmin, 04-10-2024, 10:19 PM
          0 responses
          54 views
          0 likes
          Last Post seqadmin  
          Started by seqadmin, 04-10-2024, 09:21 AM
          0 responses
          46 views
          0 likes
          Last Post seqadmin  
          Started by seqadmin, 04-04-2024, 09:00 AM
          0 responses
          55 views
          0 likes
          Last Post seqadmin  
          Working...
          X