Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kalidaemon
    Member
    • Sep 2010
    • 14

    #1

    .bam to .wig conversion

    I'm trying do some sanity checks by putting my TopHat output on the UCSC browser. In order to do this, I need to convert my accepted_hits.bam files to .wig files. Has anyone tried to do this? I know you can do this with SAMtools for .sam files and I was wondering if you can do the same for .bam. If not, what other tools do people use? Also, older TopHat output generated .wig files. Is there any way to get newer builds to do this? Thanks!
  • natstreet
    Member
    • Nov 2009
    • 83

    #2
    I've resorted to converting the .bam file to -sam and using the wiggles program that comes with tophat to create the .wig files but this is hugely inefficient. I really wish they had kept the creation of wig files as standard or that wiggles could be updated to also accept .bam files as input. Then again, I also wish they hadn't dropped support for GFF3 in favour of GFF2!

    Comment

    • dawe
      Senior Member
      • Apr 2009
      • 258

      #3
      Originally posted by kalidaemon View Post
      I'm trying do some sanity checks by putting my TopHat output on the UCSC browser. In order to do this, I need to convert my accepted_hits.bam files to .wig files. Has anyone tried to do this? I know you can do this with SAMtools for .sam files and I was wondering if you can do the same for .bam. If not, what other tools do people use? Also, older TopHat output generated .wig files. Is there any way to get newer builds to do this? Thanks!
      You can try genomeCoverageBed from bedtools suite, it's able to read bam and generate bedgraph files.

      d

      Comment

      • RockChalkJayhawk
        Senior Member
        • Mar 2009
        • 192

        #4
        Originally posted by natstreet View Post
        I've resorted to converting the .bam file to -sam and using the wiggles program that comes with tophat to create the .wig files but this is hugely inefficient. I really wish they had kept the creation of wig files as standard or that wiggles could be updated to also accept .bam files as input. Then again, I also wish they hadn't dropped support for GFF3 in favour of GFF2!
        I think the reason for dropping wiggle tracks is because they are massive and the server gets bogged down with trying to import all that data. Besides, BAM files can be visualized directly on UCSC - if you can put them on a web-accessible server.

        Comment

        • mgogol
          Senior Member
          • Mar 2008
          • 197

          #5
          If anyone's using bedtools genomeCoverageBed for this, don't forget to use the -split parameter if you're using it with tophat bam files, otherwise the junction reads get stretched across the introns weirdly.



          The commands I ended up using were

          Code:
          genomeCoverageBed -split -bg -ibam accepted_hits.sorted.bam -g dm3.chrom.sizes > accepted_hits.bedgraph
          wigToBigWig accepted_hits.bedgraph dm3.chrom.sizes myfile.bw

          Comment

          • anagari
            Member
            • Jun 2011
            • 18

            #6
            Prob with visualization even after using split

            Hi,

            I used the command as you have suggested to split the reads over the splice junctions:
            ./genomeCoverageBed -split -bg -ibam ip_sorted.bam -g genome_hg19.txt > accepted_hits.bedgraph

            #genome_hg19.txt has the chromosome sizes for hg19.

            But, when I upload the bedgraph onto Genomebrowser, it still shows stretch of reads between peaks.

            Could you suggest where the problem might be?

            Thanks in advance!

            Comment

            • shenr
              Junior Member
              • Apr 2008
              • 1

              #7
              This issue bothered me for a while too when I used bedtools v2.13, in which -split didn't work.

              The fix is actually simple: just download the new version bedtools (v2.16.2) and re-run it.

              Originally posted by anagari View Post
              Hi,

              I used the command as you have suggested to split the reads over the splice junctions:
              ./genomeCoverageBed -split -bg -ibam ip_sorted.bam -g genome_hg19.txt > accepted_hits.bedgraph

              #genome_hg19.txt has the chromosome sizes for hg19.

              But, when I upload the bedgraph onto Genomebrowser, it still shows stretch of reads between peaks.

              Could you suggest where the problem might be?

              Thanks in advance!

              Comment

              • anagari
                Member
                • Jun 2011
                • 18

                #8
                @Shenr: Thanks a lot!! Updating bedtools to 2.16 did work!!

                Comment

                Latest Articles

                Collapse

                • SEQadmin2
                  Multiomic Liquid Biopsy: What DNA/RNA Panels Reveal That DNA Alone Can’t
                  by SEQadmin2



                  Tumors contain complex mixtures of cell populations that evolve in response to treatment and host-specific factors. Tissue biopsies provide only static snapshots of a tumor’s state. But what if we could follow that evolution over time using a minimally invasive technique?

                  Liquid biopsies can detect tumor-derived material circulating in the bloodstream, providing a way to study treatment response, detect emerging resistance, and discover new biomarkers. Circulating
                  ...
                  10-14-2026, 09:55 AM
                • SEQadmin2
                  New Genomics Technologies Take Aim at Long-Standing Limits
                  by SEQadmin2


                  Researchers using sequencing and genomics tools often have to make trade-offs. They can choose between speed or scale, short reads or long-range information, or targeted panels or a view of the whole transcriptome. New technologies that have been released this year are built to address those tough choices.

                  We asked six companies the same four questions to learn about their latest products. The new technologies bring a lot to the table, including rethinking sequencing
                  ...
                  09-28-2026, 10:25 AM

                ad_right_rmr

                Collapse

                News

                Collapse

                Topics Statistics Last Post
                Started by SEQadmin2, 10-15-2026, 10:52 AM
                0 responses
                23 views
                0 reactions
                Last Post SEQadmin2  
                Started by SEQadmin2, 10-14-2026, 05:39 AM
                0 responses
                27 views
                0 reactions
                Last Post SEQadmin2  
                Started by SEQadmin2, 10-13-2026, 09:56 AM
                0 responses
                23 views
                0 reactions
                Last Post SEQadmin2  
                Started by SEQadmin2, 10-09-2026, 11:14 AM
                0 responses
                28 views
                0 reactions
                Last Post SEQadmin2  
                Working...