-
-
Save jl32587/34370c995460f9d5ad65 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# check commands: slopBed, bedGraphToBigWig and bedClip | |
which slopBed &>/dev/null || which bedtools &>/dev/null || { echo "slopBed/bedtools not found! Download bedTools: <http://code.google.com/p/bedtools/>"; exit 1; } | |
which bedGraphToBigWig &>/dev/null || { echo "bedGraphToBigWig not found! Download: <http://hgdownload.cse.ucsc.edu/admin/exe/>"; exit 1; } | |
which bedClip &>/dev/null || { echo "bedClip not found! Download: <http://hgdownload.cse.ucsc.edu/admin/exe/>"; exit 1; } | |
# end of checking | |
if [ $# -lt 2 ];then | |
echo "Need 2 parameters! <bedgraph> <chrom info>" | |
exit | |
fi | |
F=$1 | |
G=$2 | |
slopBed -i ${F} -g ${G} -b 0 | bedClip stdin ${G} ${F}.clip | |
bedGraphToBigWig ${F}.clip ${G} ${F/bdg/bw} | |
rm -f ${F}.clip |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, I'm using bdg2bw and I'm getting this error:
Previously the error was for chrY. I removed all of the chrY entries in the bdg file and go this. I presume if I remove chrX the error will be a different chromosome. If the notion is that there are no chrY or X or whichever chromosome is not present in my genome file is ridiculous. Of course they are (or I couldn't have removed them!) I've used bdg2bw countless times and never had an error. I get no unusual errors after alignment (either bowtie or bowtie2) or after peak calling (either MACS or MACS2). I'm at my wits end. Any suggestions?