Commit 2ff898d6 authored by Holger Brandl's avatar Holger Brandl
Browse files

added helper for bigwig generation using deeptools bamCoverage

parent 451e6cfc
......@@ -207,6 +207,36 @@ jl wait --report .bigwig
}
export -f dge_bigwig
dge_bigwigs(){
usage="Usage: dge_bigwigs [<bam_file>]+"
if [ $# -lt 1 ]; then
echo ${usage} >&2 ; return;
fi
#bamFiles=$(find . -name "*.bam" | grep -v unmapped | xargs echo)
bamFiles="${@}"
if [ -z "$(which bamCoverage 2>/dev/null)" ]; then
echo "could not find bamCoverage in PATH! ${usage}" >&2 ; #return;
fi
## create big wig files
for bamFile in $bamFiles; do
sample=$(basename $bamFile .bam)
echo "converting $bamFile to bigwig format"
jl submit -j .bigwig -w 10:00 -n "${project}__bw__${sample}" "bamCoverage --bam ${bamFile} --binSize 10 -p 1 -o ${sample}.bw"
done
jl wait --report .bigwig
}
export -f dge_bigwigs
## http://stackoverflow.com/questions/6916856/can-bash-show-a-functions-definition
#type dge_bigwig
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment