Skip to content
Snippets Groups Projects
Commit 2fd0b5ad authored by Floreal Cabanettes's avatar Floreal Cabanettes
Browse files

Remove unused sh

parent 10832e0e
No related branches found
No related tags found
No related merge requests found
#!/bin/bash
# If you adapt this script for your own use, you will need to set these two variables based on your environment.
# SV_DIR is the installation directory for SVToolkit - it must be an exported environment variable.
# SV_TMPDIR is a directory for writing temp files, which may be large if you have a large data set.
# export SV_DIR=/usr/local/bioinfo/src/genomeSTRIP/svtoolkit
echo "---"
echo "Running gstrip_preprocess.sh $1 $2 $3 $4 $5"
echo "Starting "`date +%Y-%m-%d`" at "`date +%H:%M:%S`
echo "---"
myname=`basename "$0"`
function usage() {
echo "
Program: SVpreprocess wrapper
usage: $myname <bamlist> <gendermap> <genome> <outdir> <outprefix>
positional args:
bamlist a file listing the bamfiles
gendermap the gendermap file for genomestrip
genome the genome fasta file (the genomestrip reference genome fasta file)
outdir output directory
outprefix prefix for the run directory
"
}
bamlist=$1
gendermap=$2
genome=$3
outdir=$4
outprefix=$5
if [[ -z ${bamlist} || -z ${gendermap} || -z ${genome} || -z ${outdir} || -z ${outprefix} ]]
then
usage
echo "At least one argument is missing"
exit 1
fi
inputFile=$bamlist
reference_prefix=${genome%.fasta}
runDir=${outdir}/${outprefix}_run
SV_TMPDIR=${outdir}/${outprefix}_tmp
# For SVAltAlign, you must use the version of bwa compatible with Genome STRiP.
export PATH=${SV_DIR}/bwa:${PATH}
export LD_LIBRARY_PATH=${SV_DIR}/bwa:${LD_LIBRARY_PATH}
mx="-Xmx4g"
classpath="${SV_DIR}/lib/SVToolkit.jar:${SV_DIR}/lib/gatk/GenomeAnalysisTK.jar:${SV_DIR}/lib/gatk/Queue.jar"
echo $classpath
mkdir -p ${SV_TMPDIR}
mkdir -p ${runDir}/logs || exit 1
mkdir -p ${runDir}/metadata || exit 1
# Display version information.
java -cp ${classpath} ${mx} -jar ${SV_DIR}/lib/SVToolkit.jar
echo "-- Run Preprocessing -- "
# Run preprocessing.
export LD_LIBRARY_PATH=/SGE/ogs/lib/linux-x64:$LD_LIBRARY_PATH
classpath="${SV_DIR}/lib/SVToolkit.jar:${SV_DIR}/lib/gatk/GenomeAnalysisTK.jar:${SV_DIR}/lib/gatk/Queue.jar"
if [ -n "$SV_PARALLEL_DRMAA" ] && [ "$SV_PARALLEL_DRMAA" -eq "1" ]; then
LC_ALL=C java -Xmx4g -cp ${classpath} \
org.broadinstitute.gatk.queue.QCommandLine \
-S ${SV_DIR}/qscript/SVPreprocess.q \
-S ${SV_DIR}/qscript/SVQScript.q \
-gatk ${SV_DIR}/lib/gatk/GenomeAnalysisTK.jar \
-cp ${classpath} \
-jobProject Capri \
-jobRunner Drmaa \
-gatkJobRunner Drmaa \
-jobQueue workq \
-jobNative "${SV_PARALLEL_NATIVES}" \
-configFile ${SV_DIR}/conf/genstrip_parameters.txt \
-tempDir ${SV_TMPDIR} \
-R ${reference_prefix}.fasta \
-I ${inputFile} \
-runDirectory ${runDir} \
-md ${runDir}/metadata \
-jobLogDir ${runDir}/logs \
-disableGATKTraversal \
-bamFilesAreDisjoint true \
-computeGCProfiles true \
-computeReadCounts true \
-copyNumberMaskFile ${reference_prefix}.gcmask.fasta \
-genderMaskBedFile ${reference_prefix}.gendermask.bed \
-genomeMaskFile ${reference_prefix}.svmask.fasta \
-ploidyMapFile ${reference_prefix}.ploidymap.txt \
-readDepthMaskFile ${reference_prefix}.rdmask.bed \
-genderMapFile ${gendermap} \
-maxConcurrentRun 20 \
-run \
|| exit 1
else
LC_ALL=C java -Xmx4g -cp ${classpath} \
org.broadinstitute.gatk.queue.QCommandLine \
-S ${SV_DIR}/qscript/SVPreprocess.q \
-S ${SV_DIR}/qscript/SVQScript.q \
-gatk ${SV_DIR}/lib/gatk/GenomeAnalysisTK.jar \
-cp ${classpath} \
-jobProject Capri \
-configFile ${SV_DIR}/conf/genstrip_parameters.txt \
-tempDir ${SV_TMPDIR} \
-R ${reference_prefix}.fasta \
-I ${inputFile} \
-runDirectory ${runDir} \
-md ${runDir}/metadata \
-jobLogDir ${runDir}/logs \
-disableGATKTraversal \
-bamFilesAreDisjoint true \
-computeGCProfiles true \
-computeReadCounts true \
-copyNumberMaskFile ${reference_prefix}.gcmask.fasta \
-genderMaskBedFile ${reference_prefix}.gendermask.bed \
-genomeMaskFile ${reference_prefix}.svmask.fasta \
-ploidyMapFile ${reference_prefix}.ploidymap.txt \
-readDepthMaskFile ${reference_prefix}.rdmask.bed \
-genderMapFile ${gendermap} \
-run \
|| exit 1
fi
rm -fr ${SV_TMPDIR}
mv ${runDir}/metadata ${outdir}/
echo "Script SVPreprocess completed successfully "`date +%Y-%m-%d`" at "`date +%H:%M:%S`
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment