Question: convert *.bdg file to *.bw file
0
gravatar for yueli7
6 weeks ago by
yueli740
China
yueli740 wrote:

Hello,

I tried to convert *.bdg file to *.bw file.

I have bedClip software in the folder.

Thanks in advance for any help!

Best,

Yue

administrator@ACB:~/bedtools2-2.26.0$ sh bdg2bw.sh flag1_FE.bdg hg38.len
bdg2bw.sh: 19: bdg2bw.sh: bedClip: not found
/usr/bin/bedtools
sort: cannot read: flag1_FE.bdg.clip: No such file or directory
bdg2bw.sh: 23: bdg2bw.sh: Bad substitution
chip-seq • 181 views
ADD COMMENTlink modified 6 weeks ago • written 6 weeks ago by yueli740
0
gravatar for RamRS
6 weeks ago by
RamRS23k
Houston, TX
RamRS23k wrote:

You need to have software on $PATH, not in the current working folder. You seem to be running into this error a lot. Follow the same procedure I gave you earlier, but with the path to bedClip and bedtools

ADD COMMENTlink written 6 weeks ago by RamRS23k

Hello, RamRs

Thank you so much for your great help!

I have all the file in my folder.

Thank you again!

Best,

Yue Li

administrator@ACB-HuangLab-Ubuntu:~/bedtools2-2.26.0/bin$ ./bedClip
bedClip - Remove lines from bed file that refer to off-chromosome locations.
usage:
bedClip [options] input.bed chrom.sizes output.bed
chrom.sizes is a two-column file/URL: <chromosome name=""> <size in="" bases="">
If the assembly <db> is hosted by UCSC, chrom.sizes can be a URL like
http://hgdownload.soe.ucsc.edu/goldenPath/<db>/bigZips/<db>.chrom.sizes
or you may use the script fetchChromSizes to download the chrom.sizes file.
If not hosted by UCSC, a chrom.sizes file can be generated by running
twoBitInfo on the assembly .2bit file.
options:
-truncate  - truncate items that span ends of chrom instead of the
            default of dropping the items
-verbose=2 - set to get list of lines clipped and why
administrator@ACB-HuangLab-Ubuntu:~/bedtools2-2.26.0/bin$ sh bdg2bw.sh
Need 2 parameters! <bedgraph> <chrom info="">
/usr/bin/bedtools
administrator@ACB-HuangLab-Ubuntu:~/bedtools2-2.26.0/bin$ sh bdg2bw.sh    flag1_FE.bdg hg38.len
bdg2bw.sh: 19: bdg2bw.sh: bedClip: not found
/usr/bin/bedtools
bdg2bw.sh: 21: bdg2bw.sh: cannot create flag1_FE.bdg.sort.clip: Permission denied
bdg2bw.sh: 23: bdg2bw.sh: Bad substitution
ADD REPLYlink modified 6 weeks ago • written 6 weeks ago by yueli740

What is the output to:

which -a bedClip
which -a bedtools

If either of those gives you an error, you need to add the location of those binaries to your $PATH. Computers cannot see what you see, so just because the executable in your directory, you shell won't recognize them.

ADD REPLYlink written 6 weeks ago by RamRS23k

Hello, RamRs,

Thank you so much for your great help!

Thank you again!

Best,

Yue

administrator@ACB-HuangLab-Ubuntu:~/bedtools2-2.26.0/bin$ PATH=$PATH:~/bedtools2-2.26.0/bin sh bdg2bw.sh flag1_FE.bdg chromInfo.txt
ADD REPLYlink modified 6 weeks ago • written 6 weeks ago by yueli740

Also, don't use sh to execute shell scripts unless you're sure the script is POSIX compliant. Use either . or bash. Certain features (such as process substitution) will not work when executed with sh.

ADD REPLYlink written 6 weeks ago by RamRS23k

Hello, RamRs,

Thank you so much for your remaining.

It finally work!

Thank you again!

Best,

Yue li

administrator@Ab-Ubuntu:~/bedtools2-2.26.0/bin$ PATH=$PATH:~/bedtools2-2.26.0/bin ./bdg2bw.sh xaf.txt chromInfo.txt
ADD REPLYlink modified 6 weeks ago by RamRS23k • written 6 weeks ago by yueli740
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: 1544 users visited in the last hour