Commit 99b711dc authored by Simon Verdez's avatar Simon Verdez

modif master

parent 6738d95c
......@@ -19,14 +19,6 @@
#$ -V
function jumpto
{
label=$1
cmd=$(sed -n "/$label:/{:a;n;p;ba};" $0 | grep -v ':$')
eval "$cmd"
exit
}
#Logging
logbasename=$(date +"%F_%H-%M-%S")
vcfbasename=$(date +"%F")
......@@ -72,11 +64,6 @@ REF=`grep "reference" $PHARMCONFIG | cut -f2`
PYTHONPATH=$PIPELINEBASE/common:/work/gad/shared/bin/lib/python_2.7/lib/python2.7/site-packages:/work/gad/shared/bin/miniconda2/lib/python2.7/site-packages/
export PYTHONPATH
# Varcall status file
if [ -z ${STATUSFILE} ]
then
STATUSFILE=$ANALYSISDIR/status.tsv
fi
# Sample list
samples=`find -L $ANALYSISDIR/ -maxdepth 1 -mindepth 1 -type d | xargs -l basename`
......@@ -88,92 +75,6 @@ then
fi
find -L $ANALYSISDIR/ -maxdepth 1 -mindepth 1 -type d | xargs -l basename >> $ANALYSISDIR/batch.list
# 0 : Check status file
if [ ! -e $STATUSFILE ]
then
echo "No status file found : Jumping to configuration step"
jumpto configure
else
echo "### Getting last analysis status ###"
# delete .failed files
failedfile=($ANALYSISDIR/*.failed)
if [ -e ${failedfile[0]} ]
then
rm $ANALYSISDIR/*.failed
fi
# get the status
HLAscan=`grep "process_HLAscan" $STATUSFILE | cut -f2`
varcallSNP=`grep "process_varcallSNP" $STATUSFILE | cut -f2`
varcallCNV=`grep "process_varcallCNV" $STATUSFILE | cut -f2`
createHTML=`grep "process_createHTML" $STATUSFILE | cut -f2`
mergeVCF=`grep "mergeVCF" $STATUSFILE | cut -f2`
if [ "$HLAscan" == "FAIL" ]
then
echo "HLAscan step failed : jumping to HLAscan step"
jumpto HLAscan
else
echo "HLAscan step was OK"
fi
if [ "$varcallSNP" == "FAIL" ]
then
echo "Variant calling SNP first step failed : jumping to variant calling SNP first step"
jumpto varcallSNP
else
echo "Variant calling SNP first step was OK"
fi
if [ "$varcallCNV" == "FAIL" ]
then
echo "Variant calling CNV second step failed : jumping to variant calling CNV second step"
jumpto varcallCNV
else
echo "Variant calling CNV second step was OK"
fi
if [ "$createHTML" == "FAIL" ]
then
echo "CreateHTML step failed : jumping to variant create HTML step"
jumpto createHTML
else
echo "CreateHTML step was OK"
fi
if [ "$mergeVCF" == "FAIL" ]
then
echo "MergeVCF step failed : jumping to merge step"
jumpto MergeVCF
else
echo "MerfeVCF step was OK"
fi
echo "pipeline was correctly executed, no need to relaunch a step"
exit 0
fi
configure:
# Configure variant calling analysis
echo "### Configuration step ###"
echo "Start : $(date +"%F_%H-%M-%S")"
varcallfiles=($ANALYSISDIR/*/*.Master.list)
if [ -e ${varcallfiles[0]} ]
then
rm $ANALYSISDIR/*/*.Master.list
fi
situation=0
# case no family file
if [ "$situation" -eq "0" ]
then
echo "No family file"
for currentSample in $samples
do
echo $currentSample >> $ANALYSISDIR/$currentSample/$currentSample.Master.list
done
fi
HLAscan:
# HLA genotyping
echo "### Execute HLAscan ###"
echo "Start : $(date +"%F_%H-%M-%S")"
......@@ -184,7 +85,6 @@ do
done
echo "End : $(date +"%F_%H-%M-%S")"
varcallSNP:
# Variant calling first step
echo "### Variant calling SNP first step ###"
echo "Start : $(date +"%F_%H-%M-%S")"
......@@ -195,7 +95,6 @@ do
done
echo "End : $(date +"%F_%H-%M-%S")"
varcallCNV:
# Variant calling second step
echo "### Variant calling CNV second step ###"
echo "Start : $(date +"%F_%H-%M-%S")"
......@@ -207,7 +106,6 @@ do
done
echo "End : $(date +"%F_%H-%M-%S")"
createHTML:
# Generate a HTML report_vcf
echo "### Generate HTML report ###"
echo "Start : $(date +"%F_%H-%M-%S")"
......@@ -218,7 +116,6 @@ do
done
echo "End : $(date +"%F_%H-%M-%S")"
MergeVCF:
#merge vcf fies
echo "### Merge VCF files"
echo "Start : $(date +"%F_%H-%M-%S")"
......
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