Question: Bed to BedGraph
2
gravatar for abc
3.0 years ago by
abc30
abc30 wrote:

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.

 

 

ADD COMMENTlink modified 3.0 years ago by dally170 • written 3.0 years ago by abc30
1

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 REPLYlink written 3.0 years ago by Alex Reynolds27k

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

ADD REPLYlink written 3.0 years ago by abc30
1

You can use wig2bed:

$ wig2bed < foo.wig | cut -f1-3,5 > foo.bedgraph
ADD REPLYlink modified 3.0 years ago • written 3.0 years ago by Alex Reynolds27k

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

ADD REPLYlink written 3.0 years ago by abc30

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

ADD REPLYlink written 3.0 years ago by Alex Reynolds27k

Of course I did it but I still face this error

 

ADD REPLYlink written 3.0 years ago by abc30
2
gravatar for dally
3.0 years ago by
dally170
United States
dally170 wrote:

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 converage in your bed file and then output the format as a bedGraph using the -bg parameter.

ADD COMMENTlink modified 3.0 years ago • written 3.0 years ago by dally170
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: 835 users visited in the last hour