Bed to BedGraph
1
2
Entering edit mode
8.9 years ago
Ati ▴ 50

I am a bit confused.

Would you please guide me. I want to use DaPars. It need a BedGraph file as input.

I have searched and understand it is possible to covert bed to bedgraph! But how the coverage could be defined then? In DaPars the coverage in needed to find if there is any alternative polyadenylation.

RNA-Seq DaPars bedgraph bed • 23k views
ADD COMMENT
3
Entering edit mode

Two easy ways to make Bedgraph from BED input with common Unix tools are with cut

$ cut -f1-3,5 foo.bed > foo.bedgraph

And with awk:

$ awk '{ print $1"\t"$2"\t"$3"\t"$5 }' foo.bed > foo.bedgraph
ADD REPLY
0
Entering edit mode

Thanks a lot, would you please let me know how to convert wig to BedGraph?

ADD REPLY
1
Entering edit mode

You can use wig2bed:

$ wig2bed < foo.wig | cut -f1-3,5 > foo.bedgraph
ADD REPLY
0
Entering edit mode

Thanks, I got this error wig2bed: line 156: convert2bed: command not found

ADD REPLY
0
Entering edit mode

Install all the binaries into one place available from your path, like /usr/local/bin etc.

ADD REPLY
0
Entering edit mode

Of course I did it but I still face this error

ADD REPLY
3
Entering edit mode
8.9 years ago
dally ▴ 210

How to generate BedGraph from BedTools Coverage? might be a good place to start looking.

Essentially you can use bedtools genome coverage tool to find coverage in your bed file and then output the format as a bedGraph using the -bg parameter.

ADD COMMENT

Login before adding your answer.

Traffic: 1848 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6