convert *.bdg file to *.bw file
1
0
Entering edit mode
5.4 years ago
yueli7 ▴ 250

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 • 3.3k views
ADD COMMENT
0
Entering edit mode
5.4 years ago
Ram 44k

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 COMMENT
0
Entering edit mode

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 REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode

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 REPLY

Login before adding your answer.

Traffic: 1444 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