Commit ceffa1b9 authored by Lena Hersemann's avatar Lena Hersemann

cont duplicate analysis

parent fc642801
......@@ -7,16 +7,17 @@ while getopts "o:" curopt; do
done
shift $(($OPTIND - 1))
local fastqFiles=$*
bamFiles=$*
# bamFiles=$(ls *bam | head -n3)
# bamFiles=$(ls *bam)
#if [ -z "$fastqFiles" ]; then
if [ $# -lt 1 ]; then
echo "Usage: dge_fastqc [-o <output_directory>] [<fastq.gz file>]+" >&2 ; return;
echo "Usage: dge_analyze_duplicates.sh [-o <output_directory>] [<bam file>]+" >&2 ; exit 1;
fi
## use current directory if not specified
if [ -z "$outputDir" ]; then
outputDir="fastqc"
outputDir="duplicate_analysis"
fi
if [ ! -d "$outputDir" ]; then
......@@ -25,17 +26,30 @@ if [ ! -d "$outputDir" ]; then
fi
for fastqFile in $fastqFiles ; do
echo "fastqcing $fastqFile"
picardJar=${BIO_BIN_BASE}/picard_tools/picard_v2.10.2.jar
if [ ! -f $fastqFile ]; then
continue;
fi
if [[ ! -f $picardJar ]]; then
echo "picard tools do not exist" >&2
exit 1
fi
#export JL_FORCE_LOCAL=true
for bamFile in $bamFiles ; do
# DEBUG bamFile=$(ls $bamFiles | head -n1)
echo "running duplicate analysis for $bamFile"
bamBaseName=$(basename $bamFile .bam)
# jl submit -j .fastqc_jobs -n "fastqc__$(basename $fastqFile)" "fastqc -j ${JAVA_HOME}/bin/java -o $outputDir -f fastq $fastqFile"
jl submit -j .fastqc_jobs -n "fastqc__$(basename $fastqFile)" "fastqc -o $outputDir -f fastq $fastqFile"
jl submit -j .dupanlysis -n "dupanalysis__${bamBaseName}" "java -jar -Xmx5g $picardJar MarkDuplicates I=${bamFile} O=${outputDir}/${bamBaseName}.markdup.bam M=${outputDir}/${bamBaseName}.markdup.txt"
done
jl wait --email --report .fastqc_jobs
jl wait --report .dupanlysis
#rend.R ${NGS_TOOLS}/misc/fastqc_summary.R $outputDir
rendr_snippet - <<"EOF"
print("todo")
rend.R ${NGS_TOOLS}/misc/fastqc_summary.R $outputDir
EOF
\ No newline at end of file
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