Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • roll
    Member
    • Aug 2009
    • 38

    #1

    How to convert sam/bam or bed file into wig file

    Hi,

    How what tools can I use to convert sam/bam or bed file into a wig file?
  • id0
    Senior Member
    • Sep 2012
    • 130

    #2
    There are several options. I use bedtools genomeCoverageBed to convert from BAM to BedGraph. Then bedGraphToBigWig to convert BedGraph to BigWig.

    Maybe someone else knows of a single step option.

    Comment

    • lindenb
      Senior Member
      • Apr 2010
      • 143

      #3
      I wrote a Bam2wig : https://github.com/lindenb/jvarkit/wiki/Bam2Wig
      It use the cigar elements to get the depth.

      ( however, I did not often used it)

      Comment

      • Wallysb01
        Senior Member
        • Feb 2011
        • 286

        #4
        if this is RNA-seq data, be sure to use the -splice option for genomeCoverageBed

        Comment

        • roll
          Member
          • Aug 2009
          • 38

          #5
          Originally posted by id0 View Post
          There are several options. I use bedtools genomeCoverageBed to convert from BAM to BedGraph. Then bedGraphToBigWig to convert BedGraph to BigWig.

          Maybe someone else knows of a single step option.
          This is chip-seq data and i used the following commands

          1. bedtools genomecov -bg -ibam Mysorted.bam > Mysorted.bedGraph

          2. bedgraphToBigWig in.bedGraph chrom.sizes out.bw

          At step 2, I am not sure if I understand what is the chrom.sizes file is. Shall i just create one myself simply subtracting end position from the start position to create the chrom.sizes?
          I guess 'in.bedGraph' is my Mysorted.bedGraph.

          Am i missing something?

          Comment

          • roll
            Member
            • Aug 2009
            • 38

            #6
            When i do the above, i tried to upload it to UCSC genome browser as custom track but it says it cant read my bigwig file.
            I converted my bigwig to wig, this time it gives memory error.

            Any ideas why this might be happening? or how to fix it?

            Comment

            Latest Articles

            Collapse

            • SEQadmin2
              16S/ITS Profiling vs. Shotgun Metagenomics: What Changes in Your Workflow?
              by SEQadmin2




              NGS has revolutionized clinical microbiology by offering new ways to identify and surveil pathogens without prior knowledge of the target. One popular approach is 16S rRNA and ITS amplicon sequencing, which targets specific microbial markers. But studies are increasingly incorporating shotgun metagenomics, a technique that sequences all DNA from a sample without targeting specific microbial markers. This approach allows more detailed taxonomic classification, detection...
              Today, 06:46 AM
            • 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

            ad_right_rmr

            Collapse

            News

            Collapse

            Topics Statistics Last Post
            Started by SEQadmin2, 10-28-2026, 09:57 AM
            0 responses
            23 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, 10-28-2026, 09:51 AM
            0 responses
            15 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, 10-22-2026, 11:13 AM
            0 responses
            68 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, 10-22-2026, 10:48 AM
            0 responses
            48 views
            0 reactions
            Last Post SEQadmin2  
            Working...