Question: How To Pile Up Multiple Bed Files Into 1 File
0
gravatar for Hanfei Sun
7.0 years ago by
Hanfei Sun60
Boston
Hanfei Sun60 wrote:

I want to pileup a set of BED files (all from H3K4me3) to see some generic site of this Histone Modification.

However, I haven't found a suitable tool to do that..

I'm using a awkward way to do that, like this:

  1. cat all BED files into 1 BED file
  2. use bedtools to convert the BED file to BAM file
  3. use samtools' mpileup command to pileup the BAM file

At last, the result is a large BAM file and very time-consuming.

Does anybody know a easier way to do that?

bed intersect sam bam pileup • 2.7k views
ADD COMMENTlink modified 3.6 years ago by Biostar ♦♦ 20 • written 7.0 years ago by Hanfei Sun60
1
gravatar for Madelaine Gogol
7.0 years ago by
Madelaine Gogol5.1k
Kansas City
Madelaine Gogol5.1k wrote:

You could use pipes to help with streamlining the steps, if you're not already. You could try bedtools genomeCoverageBed to do the pileup instead of samtools.

ADD COMMENTlink written 7.0 years ago by Madelaine Gogol5.1k
0
gravatar for Mary
7.0 years ago by
Mary11k
Boston MA area
Mary11k wrote:

Do you want to do a display like they have for the histone modifications on the UCSC browser now? Those are called "multi wig". See if this info helps: http://biowhat.ucsd.edu/homer/ngs/ucsc.html

ADD COMMENTlink written 7.0 years ago by Mary11k

No, it's not multiple wiggle file. It's multiple BED file. I just want to find some peaks appears in most of the H3K4me3 samples

ADD REPLYlink written 7.0 years ago by Hanfei Sun60
0
gravatar for Alex Reynolds
6.9 years ago by
Alex Reynolds28k
Seattle, WA USA
Alex Reynolds28k wrote:

The BEDOPS tool called bedops will merge your BED data for you:

$ bedops --everything *.bed > merged.bed

You could convert data faster by piping output to bed2bam, which supports standard input:

$ bedops --everything *.bed | bed2bam -a stdin -g chrlist.txt > merged.bam
ADD COMMENTlink modified 6.5 years ago • written 6.9 years ago by Alex Reynolds28k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1274 users visited in the last hour