Commit 1168f73a authored by Holger Brandl's avatar Holger Brandl

Merge branch 'master' of git.mpi-cbg.de:bioinfo/ngs_tools

parents 8928d706 fa9b01e3
......@@ -13,25 +13,34 @@ else
fi
export PATH=${BIO_BIN_BASE}/bowtie-1.1.2:$PATH
export PATH=${BIO_BIN_BASE}/bowtie2-2.2.5:$PATH
export PATH=${BIO_BIN_BASE}/FastQC_0.11.2:$PATH
export PATH=${BIO_BIN_BASE}/bedtools2-2.25.0/bin/:$PATH
export PATH=${BIO_BIN_BASE}/samtools-1.5:$PATH
export PATH=${BIO_BIN_BASE}/STAR-2.5.2b/source:$PATH
export PATH=${BIO_BIN_BASE}/ucsc:$PATH # for wigToBigWig
append2path(){
if [ ! -d ${1} ]; then
echo "can not append non-existing path '$1' to PATH" >&2
exit
fi
export PATH=/home/$(whoami)/local_bin/R-3.4.0/bin:$PATH
export PATH=$1:$PATH
}
append2path ${BIO_BIN_BASE}/bowtie-1.1.2
append2path ${BIO_BIN_BASE}/bowtie2-2.2.5
append2path ${BIO_BIN_BASE}/FastQC_0.11.2
append2path ${BIO_BIN_BASE}/bedtools2-2.25.0/bin
append2path ${BIO_BIN_BASE}/samtools-1.3
append2path ${BIO_BIN_BASE}/STAR-2.5.2b/source
append2path ${BIO_BIN_BASE}/ucsc
export PATH=/home/$(whoami)/local_bin/R-3.4.0/bin:$PATH
## Fixme use BIO_BIN_BASE for deeptools
## pip3 install --user deeptools
#export PATH=${BIO_BIN_BASE}/deepTools-2.2.2/bin:$PATH
export PATH=/home/$(whoami)/.local/bin/:$PATH
export PATH=/home/$(whoami)/.local/bin:$PATH
#export PATH=/home/brandl/bin/subread-1.4.6-p3-Linux-x86_64/bin:$PATH
## add cluster job manager
export PATH=/projects/bioinfo/tools/joblist_v0.7:$PATH
#export PATH=/projects/bioinfo/tools/joblist_v0.7:$PATH
append2path ${BIO_BIN_BASE}/joblist_v0.7
## make sure that rend.R is present
source <(curl https://raw.githubusercontent.com/holgerbrandl/datautils/v1.39/R/rendr/rendr_utils.sh 2>&1 2>/dev/null)
......@@ -165,12 +174,12 @@ plotCorrelation --corData bin_data.npz --plotFile bc.pdf --corMethod spearman --
#EOF
#echo "cmd is $bcCmd"
#mysub "${project}__bamcorrelate" "$bcCmd" -q long -n 4 -R span[hosts=1] | blockScript .bamcorrelate
#mysub "${PRJ_NAME}__bamcorrelate" "$bcCmd" -q long -n 4 -R span[hosts=1] | blockScript .bamcorrelate
## old lsf version
#jl submit --wait --jl .bamcorrelate -q long -t 4 -n "${project}__bamcorrelate" "$bcCmd"
#jl submit --wait --jl .bamcorrelate -q long -t 4 -n "${PRJ_NAME}__bamcorrelate" "$bcCmd"
jl reset .bamcorrelate
jl submit --jl .bamcorrelate -w 10:00 -t 4 -n "${project}__bamcorrelate" "$bcCmd"
jl submit --jl .bamcorrelate --wait -w 10:00 -t 4 -n "${PRJ_NAME}__bamcorrelate" "$bcCmd"
}
export -f dge_bam_correlate
......@@ -197,19 +206,19 @@ if [ ! -f "${genomeFai}" ]; then
echo "could not find fai index $1! ${usage}" >&2 ; return;
fi
## add bigwig to PATH
export PATH=~/bin:${PATH}
if [ -z "$(which wigToBigWig 2>/dev/null)" ]; then
echo "could not find wigToBigWig in PATH! ${usage}" >&2 ; #return;
fi
jl reset .bigwig
## 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}" "genomeCoverageBed -split -bg -ibam $bamFile -g ${genomeFai} | wigToBigWig -clip stdin ${genomeFai} ${sample}.bw"
jl submit -j .bigwig -w 10:00 -n "${PRJ_NAME}__bw__${sample}" "genomeCoverageBed -split -bg -ibam $bamFile -g ${genomeFai} | wigToBigWig -clip stdin ${genomeFai} ${sample}.bw"
done
jl wait --report .bigwig
......@@ -239,7 +248,7 @@ 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"
jl submit -j .bigwig -w 10:00 -n "${PRJ_NAME}__bw__${sample}" "bamCoverage --bam ${bamFile} --binSize 10 -p 1 -o ${sample}.bw"
done
jl wait --report .bigwig
......@@ -318,14 +327,14 @@ dge_create_star_index(){
# chmod +w $(dirname ${star_index})
mailme "${project}: creating STAR index in ${star_index}"
mailme "${PRJ_NAME}: creating STAR index in ${star_index}"
mkdir ${star_index}
cmd="STAR --runMode genomeGenerate --genomeDir ${star_index} --genomeFastaFiles ${igenome}/Sequence/WholeGenomeFasta/genome.fa --runThreadN 5"
#eval $cmd
#echo $cmd
#STAR --runMode genomeGenerate --genomeDir ${star_index} --genomeFastaFiles ${igenome}/Sequence/Chromosomes/*.fa --runThreadN 10
jl submit --wait -t 5 -w 10:00 -m 50g -n "${project}_star_index" "$cmd"
jl submit --wait -t 5 -w 10:00 -m 50g -n "${PRJ_NAME}_star_index" "$cmd"
## prevent further modification
# chmod -w $(dirname ${star_index})
......
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