2023-08-25 10:06:31 +08:00
|
|
|
#create project directory
|
|
|
|
|
|
|
|
|
|
task create_dir {
|
|
|
|
|
String workdir
|
|
|
|
|
command <<<
|
2023-09-27 10:47:03 +08:00
|
|
|
if [ ! -d ${workdir} ];then
|
2023-08-25 10:06:31 +08:00
|
|
|
mkdir -p ${workdir}/log
|
|
|
|
|
fi
|
|
|
|
|
>>>
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
task annovar {
|
2023-09-27 17:57:28 +08:00
|
|
|
String prefix
|
|
|
|
|
String output_dir
|
2023-08-25 10:06:31 +08:00
|
|
|
String ref
|
2023-09-27 17:57:28 +08:00
|
|
|
String vcf
|
2023-08-25 10:06:31 +08:00
|
|
|
|
|
|
|
|
command <<<
|
|
|
|
|
|
2023-09-27 17:57:28 +08:00
|
|
|
if [ ! -d ${output_dir}/mutation ];then
|
|
|
|
|
mkdir ${output_dir}/mutation
|
2023-08-25 10:06:31 +08:00
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
table_annovar.pl \
|
2023-09-27 17:57:28 +08:00
|
|
|
${vcf} \
|
2023-08-25 10:06:31 +08:00
|
|
|
/dataseq/jmdna/software/annovar/humandb/ \
|
|
|
|
|
-buildver hg19 -nastring . -vcfinput -remove -otherinfo \
|
|
|
|
|
-protocol refGene,avsnp150,cosmic91,clinvar_20220320,1000g2015aug_all,1000g2015aug_eas,esp6500siv2_all,exac03nontcga,gnomad_genome,dbnsfp35c,cytoBand \
|
|
|
|
|
-argument '-splicing_threshold 2 -hgvs',,,,,,,,,, \
|
|
|
|
|
--intronhgvs 50 \
|
|
|
|
|
-operation g,f,f,f,f,f,f,f,f,f,r \
|
2023-09-27 17:57:28 +08:00
|
|
|
--outfile ${output_dir}/mutation/${prefix}
|
2023-08-25 10:06:31 +08:00
|
|
|
|
2023-09-27 17:57:28 +08:00
|
|
|
>>>
|
|
|
|
|
output {
|
|
|
|
|
String anno = "${output_dir}/mutation/${prefix}.hg19_multianno.txt"
|
|
|
|
|
}
|
|
|
|
|
}
|
2023-08-25 10:06:31 +08:00
|
|
|
|
2023-09-27 17:57:28 +08:00
|
|
|
task dealwithsnvindel {
|
|
|
|
|
String name
|
|
|
|
|
String anno
|
|
|
|
|
String project
|
|
|
|
|
String output_dir
|
|
|
|
|
String umi
|
|
|
|
|
String tumor_rmdup_bam
|
2023-08-25 10:06:31 +08:00
|
|
|
|
2023-09-27 17:57:28 +08:00
|
|
|
command <<<
|
2023-08-25 10:06:31 +08:00
|
|
|
|
2023-09-27 17:57:28 +08:00
|
|
|
if [ ! -d ${output_dir}/mutation ];then
|
|
|
|
|
mkdir ${output_dir}/mutation
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
if ${umi} ;then
|
|
|
|
|
filter_snpindel_common.pl \
|
|
|
|
|
${anno} \
|
|
|
|
|
${project} \
|
|
|
|
|
c \
|
|
|
|
|
${output_dir}/mutation/${name}.snp.indel.Somatic.anno.hg19_multianno_filtered_pre.txt \
|
|
|
|
|
${output_dir}/mutation/${name}.snp.indel.Germline.anno.hg19_multianno_filtered.txt \
|
|
|
|
|
${output_dir}/mutation/${name}.snp.indel.anno.hg19_multianno_tag.txt
|
|
|
|
|
|
|
|
|
|
filter_snpindel_umi_correct_f1r1.py \
|
|
|
|
|
${output_dir}/mutation/${name}.snp.indel.Somatic.anno.hg19_multianno_filtered_pre.txt \
|
|
|
|
|
${tumor_rmdup_bam} \
|
|
|
|
|
${output_dir}/mutation/${name}.snp.indel.Somatic.anno.hg19_multianno_filtered.txt
|
|
|
|
|
|
|
|
|
|
else
|
|
|
|
|
filter_snpindel_common.pl \
|
|
|
|
|
${anno} \
|
|
|
|
|
${project} \
|
|
|
|
|
t \
|
|
|
|
|
${output_dir}/mutation/${name}.snp.indel.Somatic.anno.hg19_multianno_filtered.txt \
|
|
|
|
|
${output_dir}/mutation/${name}.snp.indel.Germline.anno.hg19_multianno_filtered.txt \
|
|
|
|
|
${output_dir}/mutation/${name}.snp.indel.anno.hg19_multianno_tag.txt
|
2023-08-25 10:06:31 +08:00
|
|
|
|
|
|
|
|
>>>
|
|
|
|
|
output {
|
2023-09-27 17:57:28 +08:00
|
|
|
String snvindel_filtered= "${output_dir}/mutation/${name}.snp.indel.Somatic.anno.hg19_multianno_filtered.txt"
|
|
|
|
|
String germline_filtered = "${output_dir}/mutation/${name}.snp.indel.Germline.anno.hg19_multianno_filtered.txt"
|
2023-08-25 10:06:31 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
task tmb {
|
|
|
|
|
String codesDir
|
|
|
|
|
String name
|
2023-09-27 17:57:28 +08:00
|
|
|
String output_dir
|
2023-08-25 10:06:31 +08:00
|
|
|
String somatic_anno
|
|
|
|
|
|
|
|
|
|
command <<<
|
2023-09-27 17:57:28 +08:00
|
|
|
perl ${codesDir}/tmb.pl ${output_dir} ${name}
|
2023-08-25 10:06:31 +08:00
|
|
|
>>>
|
|
|
|
|
output {
|
2023-09-27 17:57:28 +08:00
|
|
|
String tmb="${output_dir}/mutation/${name}.tmb.txt"
|
2023-08-25 10:06:31 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
task fusion {
|
|
|
|
|
String name
|
|
|
|
|
String ref
|
|
|
|
|
String codesDir
|
2023-09-27 17:57:28 +08:00
|
|
|
String output_dir
|
2023-08-25 10:06:31 +08:00
|
|
|
String rmdupBam
|
|
|
|
|
String cancer
|
|
|
|
|
String project
|
2023-08-29 10:31:06 +08:00
|
|
|
String tumor_bamdst_depth
|
2023-08-25 10:06:31 +08:00
|
|
|
|
|
|
|
|
command <<<
|
|
|
|
|
|
2023-09-27 17:57:28 +08:00
|
|
|
if [ ! -d ${output_dir}/fusion ];then
|
|
|
|
|
mkdir ${output_dir}/fusion
|
2023-08-25 10:06:31 +08:00
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
# Extract the discordant paired-end alignments.
|
2023-09-27 17:57:28 +08:00
|
|
|
samtools view -b -F 1294 ${rmdupBam} > ${output_dir}/fusion/${name}.discordants.bam
|
2023-08-25 10:06:31 +08:00
|
|
|
|
|
|
|
|
# Extract the split-read alignments
|
|
|
|
|
samtools view -h ${rmdupBam} \
|
|
|
|
|
| /dataseq/jmdna/software/lumpy-sv/scripts/extractSplitReads_BwaMem -i stdin \
|
|
|
|
|
| samtools view -Sb - \
|
2023-09-27 17:57:28 +08:00
|
|
|
> ${output_dir}/fusion/${name}.splitters.bam
|
2023-08-25 10:06:31 +08:00
|
|
|
|
|
|
|
|
lumpyexpress \
|
2023-08-29 10:31:06 +08:00
|
|
|
-B ${rmdupBam} \
|
2023-09-27 17:57:28 +08:00
|
|
|
-S ${output_dir}/fusion/${name}.splitters.bam \
|
|
|
|
|
-D ${output_dir}/fusion/${name}.discordants.bam \
|
|
|
|
|
-o ${output_dir}/fusion/${name}.fusion.vcf
|
2023-08-25 10:06:31 +08:00
|
|
|
|
2023-09-27 17:57:28 +08:00
|
|
|
perl ${codesDir}/fusion.filter.pl ${output_dir}/fusion/${name}.fusion.vcf ${output_dir}/fusion/${name}.fusion.filter.vcf
|
2023-08-25 10:06:31 +08:00
|
|
|
|
|
|
|
|
svtyper \
|
|
|
|
|
-B ${rmdupBam} \
|
2023-09-27 17:57:28 +08:00
|
|
|
-i ${output_dir}/fusion/${name}.fusion.filter.vcf \
|
2023-08-25 10:06:31 +08:00
|
|
|
-T ${ref} \
|
2023-09-27 17:57:28 +08:00
|
|
|
-o ${output_dir}/fusion/${name}.fusion.gt.vcf
|
2023-08-25 10:06:31 +08:00
|
|
|
|
|
|
|
|
table_annovar.pl \
|
2023-09-27 17:57:28 +08:00
|
|
|
${output_dir}/fusion/${name}.fusion.gt.vcf \
|
2023-08-25 10:06:31 +08:00
|
|
|
/dataseq/jmdna/software/annovar/humandb/ \
|
|
|
|
|
-buildver hg19 -nastring . -vcfinput -remove -otherinfo \
|
|
|
|
|
-protocol refGene \
|
|
|
|
|
-operation g \
|
2023-09-27 17:57:28 +08:00
|
|
|
--outfile ${output_dir}/fusion/${name}.fusion
|
2023-08-25 10:06:31 +08:00
|
|
|
|
2023-09-27 17:57:28 +08:00
|
|
|
perl ${codesDir}/fusion.reanno.pl ${tumor_bamdst_depth} ${output_dir} ${name}
|
|
|
|
|
perl /home/jm001/test_duantao/database_update/codes/682/fusion_targetTherapy.pl ${codesDir} ${name} ${output_dir} ${project} ${cancer}
|
2023-08-25 10:06:31 +08:00
|
|
|
|
|
|
|
|
>>>
|
|
|
|
|
|
|
|
|
|
output {
|
2023-09-27 17:57:28 +08:00
|
|
|
String fusion = "${output_dir}/fusion/${name}.fusion.pos.txt"
|
2023-08-25 10:06:31 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
task tumor_content {
|
|
|
|
|
String name
|
|
|
|
|
String tumor_pileup
|
|
|
|
|
String normal_pileup
|
|
|
|
|
String ref
|
2023-09-27 17:57:28 +08:00
|
|
|
String output_dir
|
2023-08-25 10:06:31 +08:00
|
|
|
String codesDir
|
|
|
|
|
String gc_wiggle = "/dataseq/jmdna/codes/pancancer_controlsample/hg19.gc200Base.txt.gz"
|
|
|
|
|
|
|
|
|
|
command <<<
|
|
|
|
|
|
|
|
|
|
sequenza-utils bam2seqz \
|
|
|
|
|
-p -gc ${gc_wiggle} \
|
|
|
|
|
-F ${ref} \
|
|
|
|
|
-n ${normal_pileup} \
|
|
|
|
|
-t ${tumor_pileup} \
|
2023-09-27 17:57:28 +08:00
|
|
|
| gzip > ${output_dir}/qc/target_${name}.200base.seqz.gz
|
2023-08-25 10:06:31 +08:00
|
|
|
|
2023-09-27 17:57:28 +08:00
|
|
|
sequenza-utils seqz_binning -w 200 -s ${output_dir}/qc/target_${name}.200base.seqz.gz \
|
|
|
|
|
| gzip > ${output_dir}/qc/target_${name}.200base.small.seqz.gz
|
2023-08-25 10:06:31 +08:00
|
|
|
|
2023-09-27 17:57:28 +08:00
|
|
|
Rscript ${codesDir}/sequenza.R ${name} ${output_dir}/qc/target_${name}.200base.small.seqz.gz ${output_dir}/qc/sequenza || echo "sequenza failed!"
|
2023-08-25 10:06:31 +08:00
|
|
|
|
|
|
|
|
>>>
|
|
|
|
|
output {
|
2023-09-27 17:57:28 +08:00
|
|
|
String purity = "${output_dir}/qc/sequenza/${name}_CP_contours.pdf"
|
2023-08-25 10:06:31 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
task cnvkit {
|
|
|
|
|
String tumor
|
|
|
|
|
String normal
|
|
|
|
|
|
|
|
|
|
String tumor_rmdupBam
|
|
|
|
|
String normal_rmdupBam
|
|
|
|
|
String ref
|
|
|
|
|
String bed
|
2023-09-27 17:57:28 +08:00
|
|
|
String output_dir
|
2023-08-25 10:06:31 +08:00
|
|
|
String cancer
|
|
|
|
|
String codesDir
|
|
|
|
|
String project
|
|
|
|
|
String accessBed = "/dataseq/jmdna/software/cnvkit-0.9.7/data/access-5k-mappable.hg19.bed"
|
|
|
|
|
String annotateGene = "/dataseq/jmdna/software/cnvkit-0.9.7/data/refFlat.txt"
|
|
|
|
|
|
|
|
|
|
command <<<
|
|
|
|
|
|
2023-09-27 17:57:28 +08:00
|
|
|
if [ ! -d ${output_dir}/cnvkit ];then
|
|
|
|
|
mkdir ${output_dir}/cnvkit
|
2023-08-25 10:06:31 +08:00
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
cnvkit.py batch \
|
|
|
|
|
${tumor_rmdupBam} \
|
|
|
|
|
--normal ${normal_rmdupBam} \
|
|
|
|
|
--targets ${bed} \
|
|
|
|
|
--fasta ${ref} \
|
|
|
|
|
--access ${accessBed} \
|
2023-09-27 17:57:28 +08:00
|
|
|
--output-reference ${output_dir}/cnvkit/${normal}_reference.cnn \
|
2023-08-25 10:06:31 +08:00
|
|
|
--annotate ${annotateGene} \
|
2023-09-27 17:57:28 +08:00
|
|
|
--drop-low-coverage --scatter --output-dir ${output_dir}/cnvkit
|
2023-08-25 10:06:31 +08:00
|
|
|
|
|
|
|
|
cnvkit.py scatter \
|
2023-09-27 17:57:28 +08:00
|
|
|
${output_dir}/cnvkit/${tumor}.rmdup.cnr -s ${output_dir}/cnvkit/${tumor}.rmdup.cns \
|
2023-08-25 10:06:31 +08:00
|
|
|
--y-max 3 --y-min -3 \
|
|
|
|
|
--title ${tumor}.cns \
|
2023-09-27 17:57:28 +08:00
|
|
|
-o ${output_dir}/cnvkit/${tumor}.cnv.png
|
2023-08-25 10:06:31 +08:00
|
|
|
|
2023-09-27 17:57:28 +08:00
|
|
|
perl ${codesDir}/log2_cn.pl ${output_dir}/cnvkit/${tumor}.rmdup.cns ${output_dir}/cnvkit/${tumor}.rmdup.cns.cn
|
|
|
|
|
perl /home/jm001/test_duantao/database_update/codes/682/cnv_targetTherapy.pl ${codesDir} ${tumor} ${output_dir} ${project} ${cancer}
|
2023-08-25 10:06:31 +08:00
|
|
|
>>>
|
|
|
|
|
|
|
|
|
|
output {
|
2023-09-27 17:57:28 +08:00
|
|
|
String cns = "${output_dir}/cnvkit/${tumor}.rmdup.cns"
|
|
|
|
|
String png = "${output_dir}/cnvkit/${tumor}.cnv.png"
|
2023-08-25 10:06:31 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
task chemo {
|
|
|
|
|
String codesDir
|
2023-09-27 17:57:28 +08:00
|
|
|
String output_dir
|
2023-08-25 10:06:31 +08:00
|
|
|
String project
|
|
|
|
|
String normal
|
|
|
|
|
String rmdupBam
|
|
|
|
|
command <<<
|
|
|
|
|
|
2023-09-27 17:57:28 +08:00
|
|
|
if [ ! -d ${output_dir}/chemo ];then
|
|
|
|
|
mkdir ${output_dir}/chemo
|
2023-08-25 10:06:31 +08:00
|
|
|
fi
|
|
|
|
|
|
2023-09-27 17:57:28 +08:00
|
|
|
${codesDir}/chemo/chemo_panel.py -p ${project} -o ${output_dir} --n ${normal}
|
2023-08-25 10:06:31 +08:00
|
|
|
>>>
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
task msi {
|
|
|
|
|
String bed
|
|
|
|
|
String name
|
2023-09-27 17:57:28 +08:00
|
|
|
String output_dir
|
2023-08-25 10:06:31 +08:00
|
|
|
String tumor_rmdupBam
|
|
|
|
|
String normal_rmdupBam
|
|
|
|
|
|
|
|
|
|
command <<<
|
2023-09-27 17:57:28 +08:00
|
|
|
if [ ! -d ${output_dir}/msi ];then
|
|
|
|
|
mkdir ${output_dir}/msi
|
2023-08-25 10:06:31 +08:00
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
msisensor2 msi -d /dataseq/jmdna/software/msisensor2/hg19.microsatellites.list \
|
2023-08-29 10:31:06 +08:00
|
|
|
-n ${normal_rmdupBam} \
|
|
|
|
|
-t ${tumor_rmdupBam} \
|
2023-09-27 17:57:28 +08:00
|
|
|
-e ${bed} -b 10 -o ${output_dir}/msi/${name}.msi
|
2023-08-25 10:06:31 +08:00
|
|
|
|
|
|
|
|
>>>
|
|
|
|
|
output {
|
2023-09-27 17:57:28 +08:00
|
|
|
String target="${output_dir}/MSI/${name}.msi"
|
2023-08-25 10:06:31 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
task hla {
|
|
|
|
|
String inputDir
|
2023-09-27 17:57:28 +08:00
|
|
|
String output_dir
|
2023-08-25 10:06:31 +08:00
|
|
|
String normal
|
|
|
|
|
|
|
|
|
|
command <<<
|
2023-09-27 17:57:28 +08:00
|
|
|
if [ ! -d ${output_dir}/neoantigen ];then
|
|
|
|
|
mkdir -p ${output_dir}/neoantigen/HLA
|
2023-08-25 10:06:31 +08:00
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
razers3 -tc 10 -i 95 -m 1 -dr 0 \
|
2023-09-27 17:57:28 +08:00
|
|
|
-o ${output_dir}/neoantigen/HLA/fished_1.bam /dataseq/jmdna/software/OptiType-1.3.5/data/hla_reference_dna.fasta \
|
2023-08-25 10:06:31 +08:00
|
|
|
${inputDir}/*_${normal}_*1.fq.gz
|
|
|
|
|
|
2023-09-27 17:57:28 +08:00
|
|
|
samtools bam2fq ${output_dir}/neoantigen/HLA/fished_1.bam > ${output_dir}/neoantigen/HLA/${normal}_1_fished.fastq
|
|
|
|
|
rm ${output_dir}/neoantigen/HLA/fished_1.bam
|
2023-08-25 10:06:31 +08:00
|
|
|
|
|
|
|
|
razers3 -tc 10 -i 95 -m 1 -dr 0 \
|
2023-09-27 17:57:28 +08:00
|
|
|
-o ${output_dir}/neoantigen/HLA/fished_2.bam /dataseq/jmdna/software/OptiType-1.3.5/data/hla_reference_dna.fasta \
|
2023-08-25 10:06:31 +08:00
|
|
|
${inputDir}/*_${normal}_*2.fq.gz
|
|
|
|
|
|
2023-09-27 17:57:28 +08:00
|
|
|
samtools bam2fq ${output_dir}/neoantigen/HLA/fished_2.bam > ${output_dir}/neoantigen/HLA/${normal}_2_fished.fastq
|
|
|
|
|
rm ${output_dir}/neoantigen/HLA/fished_2.bam
|
2023-08-25 10:06:31 +08:00
|
|
|
|
|
|
|
|
/dataseq/jmdna/software/OptiType-1.3.5/OptiTypePipeline.py \
|
2023-09-27 17:57:28 +08:00
|
|
|
-i ${output_dir}/neoantigen/HLA/${normal}_1_fished.fastq ${output_dir}/neoantigen/HLA/${normal}_2_fished.fastq \
|
|
|
|
|
--dna -v --prefix ${normal} -o ${output_dir}/neoantigen/HLA/
|
2023-08-25 10:06:31 +08:00
|
|
|
|
|
|
|
|
>>>
|
|
|
|
|
output {
|
2023-09-27 17:57:28 +08:00
|
|
|
String hla = "${output_dir}/neoantigen/HLA/${normal}_result.tsv"
|
2023-08-25 10:06:31 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
task neoantigen {
|
|
|
|
|
String codesDir
|
2023-09-27 17:57:28 +08:00
|
|
|
String output_dir
|
2023-08-25 10:06:31 +08:00
|
|
|
String name
|
|
|
|
|
String normal
|
|
|
|
|
String somatic_hc_vcf
|
|
|
|
|
String hla
|
|
|
|
|
command <<<
|
2023-09-27 17:57:28 +08:00
|
|
|
sh /home/jm001/test_duantao/database_update/test_project/20230814_test/predict_neoantigen.sh ${output_dir} ${name} ${name} ${codesDir}
|
2023-08-29 17:46:31 +08:00
|
|
|
>>>
|
|
|
|
|
output {
|
2023-09-27 17:57:28 +08:00
|
|
|
String neoantigen = "${output_dir}/neoantigen/MHC_Class_I/${name}.all_epitopes.netchop.txt"
|
2023-08-29 17:46:31 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
task hereditary {
|
|
|
|
|
String codesDir
|
|
|
|
|
String name
|
2023-09-27 17:57:28 +08:00
|
|
|
String output_dir
|
2023-08-29 17:46:31 +08:00
|
|
|
String project
|
|
|
|
|
String germline_filtered
|
|
|
|
|
command <<<
|
|
|
|
|
|
2023-09-27 17:57:28 +08:00
|
|
|
${codesDir}/hereditary/hereditary.py -p ${project} -o ${output_dir} --n ${name}
|
2023-08-29 17:46:31 +08:00
|
|
|
>>>
|
|
|
|
|
|
|
|
|
|
output {
|
2023-09-27 17:57:28 +08:00
|
|
|
String hereditary_pre = "${output_dir}/hereditary/${name}.hereditary.pre.txt"
|
2023-08-29 17:46:31 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
task conpair {
|
|
|
|
|
String codesDir
|
|
|
|
|
String name
|
|
|
|
|
String tumor_rmdupBam
|
|
|
|
|
String normal_rmdupBam
|
2023-09-27 17:57:28 +08:00
|
|
|
String output_dir
|
2023-08-29 17:46:31 +08:00
|
|
|
String ref
|
|
|
|
|
|
|
|
|
|
command <<<
|
|
|
|
|
|
2023-09-27 17:57:28 +08:00
|
|
|
if [ ! -d ${output_dir}/conpair ];then
|
|
|
|
|
mkdir -p ${output_dir}/conpair
|
2023-08-29 17:46:31 +08:00
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
python3 /dataseq/jmdna/software/Conpair-master/scripts/run_gatk_pileup_for_sample.py \
|
|
|
|
|
-M /dataseq/jmdna/software/Conpair-master/data/markers/GRCh37.autosomes.phase3_shapeit2_mvncall_integrated.20130502.SNV.genotype.sselect_v4_MAF_0.4_LD_0.8.bed \
|
|
|
|
|
-B ${tumor_rmdupBam} \
|
2023-09-27 17:57:28 +08:00
|
|
|
-O ${output_dir}/conpair/${name}.tumor.gatk.mpileup \
|
2023-08-29 17:46:31 +08:00
|
|
|
-R ${ref} \
|
|
|
|
|
-G /dataseq/jmdna/software/GenomeAnalysisTK.3.7.jar
|
|
|
|
|
|
|
|
|
|
python3 /dataseq/jmdna/software/Conpair-master/scripts/run_gatk_pileup_for_sample.py \
|
|
|
|
|
-M /dataseq/jmdna/software/Conpair-master/data/markers/GRCh37.autosomes.phase3_shapeit2_mvncall_integrated.20130502.SNV.genotype.sselect_v4_MAF_0.4_LD_0.8.bed \
|
|
|
|
|
-B ${normal_rmdupBam} \
|
2023-09-27 17:57:28 +08:00
|
|
|
-O ${output_dir}/conpair/${name}.normal.gatk.mpileup \
|
2023-08-29 17:46:31 +08:00
|
|
|
-R ${ref} \
|
|
|
|
|
-G /dataseq/jmdna/software/GenomeAnalysisTK.3.7.jar
|
|
|
|
|
|
2023-09-27 17:57:28 +08:00
|
|
|
sed -i 's/^chr//g' ${output_dir}/conpair/${name}.tumor.gatk.mpileup
|
|
|
|
|
sed -i 's/^chr//g' ${output_dir}/conpair/${name}.normal.gatk.mpileup
|
2023-08-29 17:46:31 +08:00
|
|
|
|
|
|
|
|
python3 /dataseq/jmdna/software/Conpair-master/scripts/verify_concordance.py \
|
|
|
|
|
-H \
|
2023-09-27 17:57:28 +08:00
|
|
|
-T ${output_dir}/conpair/${name}.tumor.gatk.mpileup \
|
|
|
|
|
-N ${output_dir}/conpair/${name}.normal.gatk.mpileup \
|
|
|
|
|
-O ${output_dir}/conpair/${name}_concordance.txt
|
2023-08-29 17:46:31 +08:00
|
|
|
|
|
|
|
|
python3 /dataseq/jmdna/software/Conpair-master/scripts/estimate_tumor_normal_contamination.py \
|
2023-09-27 17:57:28 +08:00
|
|
|
-T ${output_dir}/conpair/${name}.tumor.gatk.mpileup \
|
|
|
|
|
-N ${output_dir}/conpair/${name}.normal.gatk.mpileup \
|
|
|
|
|
-O ${output_dir}/conpair/${name}_contamination.txt
|
2023-08-29 17:46:31 +08:00
|
|
|
|
|
|
|
|
>>>
|
|
|
|
|
output {
|
2023-09-27 17:57:28 +08:00
|
|
|
String concordance = "${output_dir}/conpair/${name}_concordance.txt"
|
|
|
|
|
String contamination = "${output_dir}/conpair/${name}_contamination.txt"
|
2023-08-29 17:46:31 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
task mmr {
|
|
|
|
|
String codesDir
|
|
|
|
|
String name
|
2023-09-27 17:57:28 +08:00
|
|
|
String output_dir
|
2023-08-29 17:46:31 +08:00
|
|
|
String germline_filtered
|
|
|
|
|
command <<<
|
2023-09-27 17:57:28 +08:00
|
|
|
if [ ! -d ${output_dir}/MMR ];then
|
|
|
|
|
mkdir -p ${output_dir}/MMR
|
2023-08-29 17:46:31 +08:00
|
|
|
fi
|
2023-09-27 17:57:28 +08:00
|
|
|
perl ${codesDir}/mmr_controlsample.pl ${output_dir} ${name}
|
2023-08-29 17:46:31 +08:00
|
|
|
>>>
|
|
|
|
|
output {
|
2023-09-27 17:57:28 +08:00
|
|
|
String mmr = "${output_dir}/MMR/${name}_mmr.txt"
|
2023-08-29 17:46:31 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
task hrr {
|
|
|
|
|
String codesDir
|
|
|
|
|
String name
|
2023-09-27 17:57:28 +08:00
|
|
|
String output_dir
|
2023-08-29 17:46:31 +08:00
|
|
|
String germline_filtered
|
|
|
|
|
command <<<
|
2023-09-27 17:57:28 +08:00
|
|
|
if [ ! -d ${output_dir}/HRR ];then
|
|
|
|
|
mkdir -p ${output_dir}/HRR
|
2023-08-29 17:46:31 +08:00
|
|
|
fi
|
2023-09-27 17:57:28 +08:00
|
|
|
perl ${codesDir}/hrr_controlsample_tissue.pl ${output_dir} ${name}
|
2023-08-29 17:46:31 +08:00
|
|
|
>>>
|
|
|
|
|
output {
|
2023-09-27 17:57:28 +08:00
|
|
|
String hrr = "${output_dir}/HRR/${name}_hrr.txt"
|
2023-08-29 17:46:31 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
task hotspot {
|
|
|
|
|
String name
|
2023-09-27 17:57:28 +08:00
|
|
|
String output_dir
|
2023-08-29 17:46:31 +08:00
|
|
|
String ref
|
|
|
|
|
String rmdupBam
|
|
|
|
|
String codesDir
|
|
|
|
|
command <<<
|
2023-09-27 17:57:28 +08:00
|
|
|
if [ ! -d ${output_dir}/mutation/hotspot/ ];then
|
|
|
|
|
mkdir -p ${output_dir}/mutation/hotspot/
|
2023-08-29 17:46:31 +08:00
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
samtools mpileup -Bq 20 -Q 20 \
|
|
|
|
|
-f ${ref} \
|
|
|
|
|
-l ${codesDir}/hotspot.bed \
|
2023-09-27 17:57:28 +08:00
|
|
|
-o ${output_dir}/mutation/hotspot/${name}.hotspot.pileup \
|
2023-08-29 17:46:31 +08:00
|
|
|
${rmdupBam}
|
|
|
|
|
|
|
|
|
|
java -jar $VARSCAN mpileup2cns \
|
2023-09-27 17:57:28 +08:00
|
|
|
${output_dir}/mutation/hotspot/${name}.hotspot.pileup \
|
2023-08-29 17:46:31 +08:00
|
|
|
--min-var-freq 0.005 \
|
|
|
|
|
--min-avg-qual 20 \
|
|
|
|
|
--output-vcf 1 \
|
|
|
|
|
--variants 1 \
|
|
|
|
|
--p-value 0.99 \
|
|
|
|
|
--min-reads2 2 \
|
|
|
|
|
--strand-filter 0 \
|
2023-09-27 17:57:28 +08:00
|
|
|
> ${output_dir}/mutation/hotspot/${name}.hotspot.L.snp.indel.vcf
|
2023-08-29 17:46:31 +08:00
|
|
|
|
|
|
|
|
java -jar $VARSCAN mpileup2cns \
|
2023-09-27 17:57:28 +08:00
|
|
|
${output_dir}/mutation/hotspot/${name}.hotspot.pileup \
|
2023-08-29 17:46:31 +08:00
|
|
|
--min-var-freq 0.01 \
|
|
|
|
|
--min-avg-qual 20 \
|
|
|
|
|
--output-vcf 1 \
|
|
|
|
|
--variants 1 \
|
|
|
|
|
--p-value 0.05 \
|
|
|
|
|
--min-reads2 3 \
|
|
|
|
|
--strand-filter 1 \
|
2023-09-27 17:57:28 +08:00
|
|
|
> ${output_dir}/mutation/hotspot/${name}.hotspot.H.snp.indel.vcf
|
2023-08-29 17:46:31 +08:00
|
|
|
|
2023-09-27 17:57:28 +08:00
|
|
|
perl ${codesDir}/hotspot.hvl.pl ${output_dir} ${name}
|
2023-08-29 17:46:31 +08:00
|
|
|
|
2023-09-27 17:57:28 +08:00
|
|
|
if [ -e "${output_dir}/mutation/hotspot/${name}.hotspot.snp.indel.vcf" ]; then
|
2023-08-29 17:46:31 +08:00
|
|
|
table_annovar.pl \
|
2023-09-27 17:57:28 +08:00
|
|
|
${output_dir}/mutation/hotspot/${name}.hotspot.snp.indel.vcf \
|
2023-08-29 17:46:31 +08:00
|
|
|
/dataseq/jmdna/software/annovar/humandb/ \
|
|
|
|
|
-buildver hg19 -nastring . -vcfinput -remove -otherinfo \
|
|
|
|
|
-protocol refGene \
|
|
|
|
|
-argument '-hgvs' \
|
|
|
|
|
-operation g \
|
2023-09-27 17:57:28 +08:00
|
|
|
--outfile ${output_dir}/mutation/hotspot/${name}.hotspot.snp.indel.anno
|
|
|
|
|
perl ${codesDir}/hotspot.filter.pl ${output_dir} ${name}
|
2023-08-29 17:46:31 +08:00
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
>>>
|
|
|
|
|
output {
|
2023-09-27 17:57:28 +08:00
|
|
|
String hotspot = "${output_dir}/mutation/hotspot/${name}.hotspot.H.snp.indel.vcf"
|
2023-08-29 17:46:31 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
task auto_report {
|
|
|
|
|
String cancer
|
|
|
|
|
String codesDir
|
2023-09-27 17:57:28 +08:00
|
|
|
String output_dir
|
2023-08-29 17:46:31 +08:00
|
|
|
|
|
|
|
|
String normal
|
|
|
|
|
String tumor
|
|
|
|
|
|
|
|
|
|
String cnv_cns
|
|
|
|
|
String cnv_png
|
|
|
|
|
|
|
|
|
|
String fusion_pos
|
|
|
|
|
String snvindel_filtered
|
|
|
|
|
|
|
|
|
|
String tmb
|
|
|
|
|
String mmr
|
|
|
|
|
String hrr
|
|
|
|
|
String hereditary_pre
|
|
|
|
|
|
|
|
|
|
command <<<
|
|
|
|
|
|
2023-09-27 17:57:28 +08:00
|
|
|
if [ ! -d ${output_dir}/report ];then
|
|
|
|
|
mkdir -p ${output_dir}/report
|
2023-08-29 17:46:31 +08:00
|
|
|
fi
|
|
|
|
|
|
2023-09-27 17:57:28 +08:00
|
|
|
perl /home/jm001/test_duantao/database_update/codes/682/indication.pl ${output_dir} ${cancer}
|
|
|
|
|
python3 ${codesDir}/drug_dedup.py ${output_dir} ${tumor}
|
|
|
|
|
perl ${codesDir}/file_format_change.pl ${output_dir} ${tumor}
|
|
|
|
|
python3 ${codesDir}/report_template/682gene_tissue_control_report.py ${output_dir} ${tumor} ${normal} ${cancer}
|
2023-08-29 17:46:31 +08:00
|
|
|
|
2023-09-27 17:57:28 +08:00
|
|
|
ln -s ${cnv_cns} ${output_dir}/report/
|
|
|
|
|
ln -s ${cnv_png} ${output_dir}/report/
|
2023-08-29 17:46:31 +08:00
|
|
|
|
2023-09-27 17:57:28 +08:00
|
|
|
ln -s ${fusion_pos} ${output_dir}/report/
|
|
|
|
|
ln -s ${snvindel_filtered} ${output_dir}/report/
|
2023-08-29 17:46:31 +08:00
|
|
|
|
2023-09-27 17:57:28 +08:00
|
|
|
ln -s ${tmb} ${output_dir}/report/
|
2023-08-29 17:46:31 +08:00
|
|
|
|
2023-09-27 17:57:28 +08:00
|
|
|
ln -s ${mmr} ${output_dir}/report/
|
2023-08-29 17:46:31 +08:00
|
|
|
|
2023-09-27 17:57:28 +08:00
|
|
|
ln -s ${hrr} ${output_dir}/report/
|
2023-08-29 17:46:31 +08:00
|
|
|
|
2023-09-27 17:57:28 +08:00
|
|
|
ln -s ${hereditary_pre} ${output_dir}/report/
|
2023-08-29 17:46:31 +08:00
|
|
|
|
|
|
|
|
>>>
|
|
|
|
|
}
|