Commit 0208c5db authored by Simon Verdez's avatar Simon Verdez

pipeline epilepsie

parent 99b711dc
#!/bin/bash
if [ ! -e /work/gad/sv347413/epilepsie/vcf_tmp/$i*.vcf ]
then
for i in $(cat /work/gad/sv347413/HLAscan/liste_patients_epileptiques.txt)
do
cp /work/gad/shared/vcf/individu/$i/*.raw.vcf /work/gad/sv347413/epilepsie/vcf_tmp/.
done
fi
if [ ! -e /work/gad/sv347413/epilepsie/tsv_tmp/$i*.tsv ]
then
for i in $(cat /work/gad/sv347413/HLAscan/liste_patients_epileptiques.txt)
do
cp /work/gad/shared/vcf/individu/$i/*.cnv.annot.tsv /work/gad/sv347413/epilepsie/tsv_tmp/.
done
fi
...@@ -64,7 +64,6 @@ REF=`grep "reference" $PHARMCONFIG | cut -f2` ...@@ -64,7 +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/ 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 export PYTHONPATH
# Sample list # Sample list
samples=`find -L $ANALYSISDIR/ -maxdepth 1 -mindepth 1 -type d | xargs -l basename` samples=`find -L $ANALYSISDIR/ -maxdepth 1 -mindepth 1 -type d | xargs -l basename`
...@@ -75,16 +74,18 @@ then ...@@ -75,16 +74,18 @@ then
fi fi
find -L $ANALYSISDIR/ -maxdepth 1 -mindepth 1 -type d | xargs -l basename >> $ANALYSISDIR/batch.list find -L $ANALYSISDIR/ -maxdepth 1 -mindepth 1 -type d | xargs -l basename >> $ANALYSISDIR/batch.list
HLAscan:
# HLA genotyping # HLA genotyping
echo "### Execute HLAscan ###" echo "### Execute HLAscan ###"
echo "Start : $(date +"%F_%H-%M-%S")" echo "Start : $(date +"%F_%H-%M-%S")"
for currentSample in $samples for currentSample in $samples
do do
echo "Command : qsub -pe smp 2 -N HLAscan_${currentSample} -o $ANALYSISDIR/$currentSample/logs/ -e $ANALYSISDIR/$currentSample/logs/ -v INPUTFILE=$ANALYSISDIR/$currentSample/$currentSample.dedup.bam,OUTPUTFILE=$ANALYSISDIR/$currentSample/HLAscan,GeneList=$GL,LOGFILE=$ANALYSISDIR/$currentSample/logs/process_HLAscan.$logbasename.log,CONFIGFILE=$CONFIGFILE $PIPELINEBASE/haplo_scan.sh" echo "Command : qsub -pe smp 1 -N HLAscan_${currentSample} -o $ANALYSISDIR/$currentSample/logs/ -e $ANALYSISDIR/$currentSample/logs/ -v INPUTFILE=$ANALYSISDIR/$currentSample/$currentSample.dedup.bam,OUTPUTFILE=$ANALYSISDIR/$currentSample/HLAscan,GeneList=$GL,LOGFILE=$ANALYSISDIR/$currentSample/logs/process_HLAscan.$logbasename.log,CONFIGFILE=$CONFIGFILE $PIPELINEBASE/haplo_scan.sh"
qsub -pe smp 1 -N HLAscan_${currentSample} -o $ANALYSISDIR/$currentSample/logs/ -e $ANALYSISDIR/$currentSample/logs/ -v BAM=$ANALYSISDIR/$currentSample/$currentSample.dedup.bam,SORTIE=$ANALYSISDIR/$currentSample/HLAscan,GeneList=$GL,LOGFILE=$ANALYSISDIR/$currentSample/logs/process_HLAscan.$logbasename.log,CONFIGFILE=$CONFIGFILE $PIPELINEBASE/haplo_scan.sh qsub -pe smp 1 -N HLAscan_${currentSample} -o $ANALYSISDIR/$currentSample/logs/ -e $ANALYSISDIR/$currentSample/logs/ -v BAM=$ANALYSISDIR/$currentSample/$currentSample.dedup.bam,SORTIE=$ANALYSISDIR/$currentSample/HLAscan,GeneList=$GL,LOGFILE=$ANALYSISDIR/$currentSample/logs/process_HLAscan.$logbasename.log,CONFIGFILE=$CONFIGFILE $PIPELINEBASE/haplo_scan.sh
done done
echo "End : $(date +"%F_%H-%M-%S")" echo "End : $(date +"%F_%H-%M-%S")"
varcallSNP:
# Variant calling first step # Variant calling first step
echo "### Variant calling SNP first step ###" echo "### Variant calling SNP first step ###"
echo "Start : $(date +"%F_%H-%M-%S")" echo "Start : $(date +"%F_%H-%M-%S")"
...@@ -95,6 +96,7 @@ do ...@@ -95,6 +96,7 @@ do
done done
echo "End : $(date +"%F_%H-%M-%S")" echo "End : $(date +"%F_%H-%M-%S")"
varcallCNV:
# Variant calling second step # Variant calling second step
echo "### Variant calling CNV second step ###" echo "### Variant calling CNV second step ###"
echo "Start : $(date +"%F_%H-%M-%S")" echo "Start : $(date +"%F_%H-%M-%S")"
...@@ -106,22 +108,24 @@ do ...@@ -106,22 +108,24 @@ do
done done
echo "End : $(date +"%F_%H-%M-%S")" echo "End : $(date +"%F_%H-%M-%S")"
createHTML:
# Generate a HTML report_vcf # Generate a HTML report_vcf
echo "### Generate HTML report ###" echo "### Generate HTML report ###"
echo "Start : $(date +"%F_%H-%M-%S")" echo "Start : $(date +"%F_%H-%M-%S")"
for currentSample in $samples for currentSample in $samples
do do
echo "Command : qsub -pe smp 1 -hold_jid varcallCNV_${currentSample},varcallSNP_${currentSample},HLAscan_${currentSample} -N createHTML_${currentSample} -o $ANALYSISDIR/$currentSample/logs/ -e $ANALYSISDIR/$currentSample/logs/ -v VCF_SNP=$ANALYSISDIR/$currentSample/$currentSample.pharmacoAnnot.SNP.vcf,VCF_CNV=$ANALYSISDIR/$currentSample/$currentSample.CNV.vcf,REPORTFILE=$ANALYSISDIR/$currentSample/HLAscan/Report,BAMFILE=$ANALYSISDIR/$currentSample/$currentSample.dedup.bam,TSVFILE=$TSVFILE,OUTPUTFILE=$ANALYSISDIR/$currentSample/$currentSample.html,LOGFILE=$ANALYSISDIR/$currentSample/logs/create_html.$logbasename.log,CONFIGFILE=$CONFIGFILE $PIPELINEBASE/wrapper_create_html.sh" echo "Command : qsub -pe smp 1 -hold_jid varcallCNV_${currentSample},varcallSNP_${currentSample},HLAscan_${currentSample} -N createHTML_${currentSample} -o $ANALYSISDIR/$currentSample/logs/ -e $ANALYSISDIR/$currentSample/logs/ -v VCF_SNP=$ANALYSISDIR/$currentSample/$currentSample.pharmacoAnnot.SNP.vcf,VCF_CNV=$ANALYSISDIR/$currentSample/$currentSample.CNV.vcf,REPORTFILE=$ANALYSISDIR/$currentSample/HLAscan/Report,BAMFILE=$ANALYSISDIR/$currentSample/$currentSample.dedup.bam,TSVFILE=$TSVFILE,OUTPUTFILE=$ANALYSISDIR/$currentSample/$currentSample.html,LOGFILE=$ANALYSISDIR/$currentSample/logs/create_html.$logbasename.log,CONFIGFILE=$CONFIGFILE $PIPELINEBASE/wrapper_create_html.sh"
qsub -pe smp 1 -hold_jid varcallCNV_${currentSample},varcallSNP_${currentSample},HLAscan_${currentSample} -N createHTML_${currentSample} -o $ANALYSISDIR/$currentSample/logs/ -e $ANALYSISDIR/$currentSample/logs/ -v VCF_SNP=$ANALYSISDIR/$currentSample/$currentSample.pharmacoAnnot.SNP.vcf,VCF_CNV=$ANALYSISDIR/$currentSample/$currentSample.CNV.vcf,REPORTFILE=$ANALYSISDIR/$currentSample/HLAscan/Report,BAMFILE=$ANALYSISDIR/$currentSample/$currentSample.dedup.bam,TSVFILE=$TSVFILE,OUTPUTFILE=$ANALYSISDIR/$currentSample/$currentSample.html,LOGFILE=$ANALYSISDIR/$currentSample/logs/create_html.$logbasename.log,CONFIGFILE=$CONFIGFILE $PIPELINEBASE/wrapper_create_html.sh qsub -pe smp 1 -hold_jid varcallCNV_${currentSample} -N createHTML_${currentSample} -o $ANALYSISDIR/$currentSample/logs/ -e $ANALYSISDIR/$currentSample/logs/ -v VCF_SNP=$ANALYSISDIR/$currentSample/$currentSample.pharmacoAnnot.SNP.vcf,VCF_CNV=$ANALYSISDIR/$currentSample/$currentSample.CNV.vcf,REPORTFILE=$ANALYSISDIR/$currentSample/HLAscan/Report,BAMFILE=$ANALYSISDIR/$currentSample/$currentSample.dedup.bam,TSVFILE=$TSVFILE,OUTPUTFILE=$ANALYSISDIR/$currentSample/$currentSample.html,LOGFILE=$ANALYSISDIR/$currentSample/logs/create_html.$logbasename.log,CONFIGFILE=$CONFIGFILE $PIPELINEBASE/wrapper_create_html.sh
done done
echo "End : $(date +"%F_%H-%M-%S")" echo "End : $(date +"%F_%H-%M-%S")"
MergeVCF:
#merge vcf fies #merge vcf fies
echo "### Merge VCF files" echo "### Merge VCF files"
echo "Start : $(date +"%F_%H-%M-%S")" echo "Start : $(date +"%F_%H-%M-%S")"
for currentSample in $samples for currentSample in $samples
do do
echo "Command : qsub -pe smp 1 -hold_jid varcallCNV_${currentSample},varcallSNP_${currentSample} -N mergeVCF_${currentSample} -o $ANALYSISDIR/$currentSample/logs/ -e $ANALYSISDIR/$currentSample/logs/ -v INPUTFILE1=$ANALYSISDIR/$currentSample/$currentSample.CNV.vcf,INPUTFILE2=$ANALYSISDIR/$currentSample/$currentSample.pharmacoAnnot.SNP.vcf,REF=$REF,OUTPUTFILE=$ANALYSISDIR/$currentSample/$currentSample.pharmacoAnnot.merge.vcf,LOGFILE=$ANALYSISDIR/$currentSample/logs/merge_file.$logbasename.log,CONFIGFILE=$CONFIGFILE $PIPELINEBASE/merge_GATK.sh" echo "Command : qsub -pe smp 1 -hold_jid varcallCNV_${currentSample},varcallSNP_${currentSample} -N mergeVCF_${currentSample} -o $ANALYSISDIR/$currentSample/logs/ -e $ANALYSISDIR/$currentSample/logs/ -v INPUTFILE1=$ANALYSISDIR/$currentSample/$currentSample.CNV.vcf,INPUTFILE2=$ANALYSISDIR/$currentSample/$currentSample.pharmacoAnnot.SNP.vcf,REF=$REF,OUTPUTFILE=$ANALYSISDIR/$currentSample/$currentSample.pharmacoAnnot.merge.vcf,LOGFILE=$ANALYSISDIR/$currentSample/logs/merge_file.$logbasename.log,CONFIGFILE=$CONFIGFILE $PIPELINEBASE/merge_GATK.sh"
qsub -pe smp 1 -hold_jid varcallCNV_${currentSample},varcallSNP_${currentSample} -N mergeVCF_${currentSample} -o $ANALYSISDIR/$currentSample/logs/ -e $ANALYSISDIR/$currentSample/logs/ -v INPUTFILE1=$ANALYSISDIR/$currentSample/$currentSample.CNV.vcf,INPUTFILE2=$ANALYSISDIR/$currentSample/$currentSample.pharmacoAnnot.SNP.vcf,REF=$REF,OUTPUTFILE=$ANALYSISDIR/$currentSample/$currentSample.merge.vcf,LOGFILE=$ANALYSISDIR/$currentSample/logs/merge_file.$logbasename.log,CONFIGFILE=$CONFIGFILE $PIPELINEBASE/merge_GATK.sh qsub -pe smp 1 -N mergeVCF_${currentSample} -o $ANALYSISDIR/$currentSample/logs/ -e $ANALYSISDIR/$currentSample/logs/ -v INPUTFILE1=$ANALYSISDIR/$currentSample/$currentSample.CNV.vcf,INPUTFILE2=$ANALYSISDIR/$currentSample/$currentSample.pharmacoAnnot.SNP.vcf,REF=$REF,OUTPUTFILE=$ANALYSISDIR/$currentSample/$currentSample.pharmacoAnnot.merge.vcf,LOGFILE=$ANALYSISDIR/$currentSample/logs/merge_file.$logbasename.log,CONFIGFILE=$CONFIGFILE $PIPELINEBASE/merge_GATK.sh
done done
echo "End : $(date +"%F_%H-%M-%S")" echo "End : $(date +"%F_%H-%M-%S")"
...@@ -74,5 +74,6 @@ def create_header(): ...@@ -74,5 +74,6 @@ def create_header():
##contig=<ID=chr22,length=51304566> ##contig=<ID=chr22,length=51304566>
##contig=<ID=chrX,length=155270560> ##contig=<ID=chrX,length=155270560>
##contig=<ID=chrY,length=59373566> ##contig=<ID=chrY,length=59373566>
#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT dijex
""" """
return header return header
No preview for this file type
This diff is collapsed.
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
#$ -N hlascan #$ -N hlascan
#$ -q batch #$ -q batch
#$ -pe smp 1 #$ -pe smp 2
#$ -V #$ -V
# Log file path option # Log file path option
...@@ -66,7 +66,7 @@ fi ...@@ -66,7 +66,7 @@ fi
SAMPLE=`basename ${BAM} | cut -d . -f1` SAMPLE=`basename ${BAM} | cut -d . -f1`
RES=${SORTIE} RES=${SORTIE}
GL=/work/gad/shared/analyse/test_HLA/HLAscan_v1.0/hla-ref-5gene/gene_list GL=/work/gad/shared/bin/HLAscan_v1.0/hla-ref-5gene/gene_list
#Launch haplo_scan #Launch haplo_scan
/work/gad/shared/bin/miniconda2/bin/python2.7 /work/gad/shared/bin/HLAscan_v1.0/hla-paper/haplo_scan_v4.0-sv.py $BAM $GL $RES /work/gad/shared/bin/miniconda2/bin/python2.7 /work/gad/shared/bin/HLAscan_v1.0/hla-paper/haplo_scan_v4.0-sv.py $BAM $GL $RES
......
...@@ -79,12 +79,13 @@ then ...@@ -79,12 +79,13 @@ then
exit 1 exit 1
fi fi
JAVA=$(grep "javacmd" $CONFIGFILE | awk '{print $2}') #JAVA=$(grep "javacmd" $CONFIGFILE | awk '{print $2}')
module load java64/1.8.0_162
PATHSCRIPT=$(grep "pipelinebase" $CONFIGFILE | awk '{print $2}') PATHSCRIPT=$(grep "pipelinebase" $CONFIGFILE | awk '{print $2}')
#GATK=$(grep "GATKbase" $CONFIGFILE | awk '{print $2}') #GATK=$(grep "GATKbase" $CONFIGFILE | awk '{print $2}')
echo "command : $JAVA -jar /work/gad/shared/bin/GATK_3.8/GenomeAnalysisTK.jar -T CombineVariants -R $REF --variant $INPUTFILE1 --variant $INPUTFILE2 -o merge.vcf -genotypeMergeOptions UNIQUIFY" echo "command : $JAVA -jar /work/gad/shared/bin/GATK_3.7/GenomeAnalysisTK.jar -T CombineVariants -R $REF --variant $INPUTFILE1 --variant $INPUTFILE2 -genotypeMergeOptions UNIQUIFY"
$JAVA -jar /work/gad/shared/bin/GATK_3.8/GenomeAnalysisTK.jar -T CombineVariants -R $REF --variant $INPUTFILE2 --variant $INPUTFILE2 -genotypeMergeOptions UNIQUIFY > $OUTPUTFILE java -jar /work/gad/shared/bin/GATK_3.7/GenomeAnalysisTK.jar -T CombineVariants -R $REF --variant $INPUTFILE1 --variant $INPUTFILE2 -o $OUTPUTFILE -genotypeMergeOptions UNIQUIFY
genotypeMerge_exitcode=$? genotypeMerge_exitcode=$?
echo "GenotypeMerge exit code : $genotypeMerge_exitcode" echo "GenotypeMerge exit code : $genotypeMerge_exitcode"
......
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