2023-12-28 09:14:58 +08:00
|
|
|
|
# mutation
|
2023-12-25 14:06:30 +08:00
|
|
|
|
|
2023-12-19 13:37:52 +08:00
|
|
|
|
task mutation_calling_umi {
|
|
|
|
|
|
String name
|
|
|
|
|
|
String output_dir
|
|
|
|
|
|
String rmdup_bam
|
|
|
|
|
|
String ref
|
|
|
|
|
|
String bed
|
2023-12-21 10:22:54 +08:00
|
|
|
|
String probe
|
2023-12-19 13:37:52 +08:00
|
|
|
|
command <<<
|
|
|
|
|
|
|
|
|
|
|
|
if [ ! -d ${output_dir}/mutation ];then
|
|
|
|
|
|
mkdir ${output_dir}/mutation
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
#1条call
|
|
|
|
|
|
# 这个情况是reads数目只有1,但是如果去掉了这个reads数导致数据量减少很多
|
|
|
|
|
|
# -r 3 是指有3条这样样的reads支撑
|
|
|
|
|
|
# -f 是指频率 以2条方式的call出来的变异频率可以比1条的方式更可信
|
|
|
|
|
|
# hotspot 修改了 -r 3 为 -r 2 -f 0.001 为 -f 0.0005
|
|
|
|
|
|
|
|
|
|
|
|
java -jar /dataseq/jmdna/software/VarDict-1.8.3/lib/VarDict-1.8.3.jar \
|
|
|
|
|
|
-G ${ref} \
|
|
|
|
|
|
-f 0.0005 \
|
|
|
|
|
|
-N ${name} \
|
|
|
|
|
|
-b ${rmdup_bam} \
|
|
|
|
|
|
-UN -Q 20 -m 3 -r 2 -th 10 -z 1 -c 1 -S 2 -E 3 -g 4 ${bed} \
|
|
|
|
|
|
|/dataseq/jmdna/software/VarDict-1.8.3/bin/teststrandbias.R \
|
|
|
|
|
|
| /dataseq/jmdna/software/VarDict-1.8.3/bin/var2vcf_valid.pl \
|
2023-12-28 10:41:01 +08:00
|
|
|
|
-N ${name} -E -f 0.0005 -F 0.1 > ${output_dir}/mutation/${name}.1r.vcf
|
2023-12-19 13:37:52 +08:00
|
|
|
|
|
|
|
|
|
|
#提取>=2条矫正的序列
|
|
|
|
|
|
bam_fetch.py ${output_dir}/alignment/${name}.rmdup.bam ${output_dir}/alignment/${name}.2r.rmdup.bam
|
|
|
|
|
|
samtools index ${output_dir}/alignment/${name}.2r.rmdup.bam
|
|
|
|
|
|
|
|
|
|
|
|
# 保证 1r call mut umi family 里面有2条reads
|
|
|
|
|
|
#2条矫正的call
|
|
|
|
|
|
java -jar /dataseq/jmdna/software/VarDict-1.8.3/lib/VarDict-1.8.3.jar \
|
|
|
|
|
|
-G ${ref} \
|
|
|
|
|
|
-f 0.0001 \
|
|
|
|
|
|
-N ${name}_2r \
|
|
|
|
|
|
-b ${output_dir}/alignment/${name}.2r.rmdup.bam \
|
|
|
|
|
|
-UN -Q 20 -m 3 -r 1 -th 10 -z 1 -c 1 -S 2 -E 3 -g 4 ${bed} \
|
|
|
|
|
|
|/dataseq/jmdna/software/VarDict-1.8.3/bin/teststrandbias.R \
|
2023-12-28 10:41:01 +08:00
|
|
|
|
|/dataseq/jmdna/software/VarDict-1.8.3/bin/var2vcf_valid.pl -N ${name} -E -f 0.0001 -F 0.1 >${output_dir}/mutation/${name}.2r.vcf
|
2023-12-19 13:37:52 +08:00
|
|
|
|
|
|
|
|
|
|
# merge突变,以1条方式call的>0.01的突变+两条方式的对一条方式的低频区域(AF<0.01)进行矫正。
|
|
|
|
|
|
correct_umi_1r_plus_2r.pl \
|
|
|
|
|
|
${output_dir}/mutation/${name}.1r.vcf \
|
|
|
|
|
|
${output_dir}/mutation/${name}.2r.vcf \
|
|
|
|
|
|
${output_dir}/mutation/${name}.raw.vcf
|
|
|
|
|
|
|
|
|
|
|
|
vcf_filter.py \
|
|
|
|
|
|
-i ${output_dir}/mutation/${name}.raw.vcf \
|
|
|
|
|
|
-e 'INFO/AF[0] >= 0.001 && INFO/VD >= 3' \
|
|
|
|
|
|
-o ${output_dir}/mutation/${name}.raw.snp_indel.vcf
|
|
|
|
|
|
|
|
|
|
|
|
# add msi and strandbias flag
|
2023-12-21 10:22:54 +08:00
|
|
|
|
vcf_add_tag_msi.pl ${output_dir}/mutation/${name}.raw.snp_indel.vcf ${output_dir}/mutation/${name}.raw.addtagmsi.snp_indel.vcf ${probe} c
|
2023-12-19 13:37:52 +08:00
|
|
|
|
|
|
|
|
|
|
# add malt flag
|
|
|
|
|
|
grep -v ^# ${output_dir}/mutation/${name}.raw.snp_indel.vcf | awk '{OFS="\t"}{print $1,$2-1,$2}' - > \
|
|
|
|
|
|
${output_dir}/mutation/${name}.raw.snp_indel.vcf.bed
|
|
|
|
|
|
samtools mpileup -aBq 20 -Q 20 -f ${ref} -l ${output_dir}/mutation/${name}.raw.snp_indel.vcf.bed \
|
|
|
|
|
|
${output_dir}/alignment/${name}.2r.rmdup.bam -o ${output_dir}/mutation/${name}.raw.snp_indel.vcf.pileup
|
|
|
|
|
|
|
|
|
|
|
|
vcf_add_tag_mutalt.py ${output_dir}/mutation/${name}.raw.snp_indel.vcf.pileup \
|
|
|
|
|
|
${output_dir}/mutation/${name}.raw.addtagmsi.snp_indel.vcf \
|
|
|
|
|
|
${output_dir}/mutation/${name}.raw.addtagmsi.addmutalt.snp_indel.vcf
|
|
|
|
|
|
|
|
|
|
|
|
cp ${output_dir}/mutation/${name}.raw.addtagmsi.addmutalt.snp_indel.vcf ${output_dir}/mutation/${name}.snp_indel.somatic.vcf
|
|
|
|
|
|
|
|
|
|
|
|
vcf_filter.py \
|
|
|
|
|
|
-i ${output_dir}/mutation/${name}.raw.snp_indel.vcf \
|
|
|
|
|
|
-e 'INFO/AF[0] >= 0.1' \
|
|
|
|
|
|
-o ${output_dir}/mutation/${name}.snp_indel.germline.vcf
|
|
|
|
|
|
|
|
|
|
|
|
>>>
|
|
|
|
|
|
|
|
|
|
|
|
output {
|
|
|
|
|
|
String somatic_vcf = "${output_dir}/mutation/${name}.snp_indel.somatic.vcf"
|
|
|
|
|
|
String germline_vcf = "${output_dir}/mutation/${name}.snp_indel.germline.vcf"
|
|
|
|
|
|
String raw_vcf = "${output_dir}/mutation/${name}.1r.vcf"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
task mutation_calling_umi_control {
|
|
|
|
|
|
String name
|
|
|
|
|
|
String bed
|
|
|
|
|
|
String ref
|
|
|
|
|
|
String output_dir
|
|
|
|
|
|
String tumor_rmdup_bam
|
|
|
|
|
|
String normal_rmdup_bam
|
2023-12-21 10:22:54 +08:00
|
|
|
|
String probe
|
2023-12-19 13:37:52 +08:00
|
|
|
|
|
|
|
|
|
|
command <<<
|
|
|
|
|
|
if [ ! -d ${output_dir}/mutation ];then
|
|
|
|
|
|
mkdir ${output_dir}/mutation
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
# 对照样本
|
|
|
|
|
|
java -jar /dataseq/jmdna/software/VarDict-1.8.3/lib/VarDict-1.8.3.jar \
|
|
|
|
|
|
-G ${ref} \
|
|
|
|
|
|
-f 0.01 \
|
|
|
|
|
|
-N ${name} \
|
|
|
|
|
|
-b ${normal_rmdup_bam} \
|
|
|
|
|
|
-UN \
|
|
|
|
|
|
-Q 20 \
|
|
|
|
|
|
-m 3 \
|
|
|
|
|
|
-r 3 \
|
|
|
|
|
|
-th 10 \
|
|
|
|
|
|
-c 1 -S 2 -E 3 -g 4 ${bed} |/dataseq/jmdna/software/VarDict-1.8.3/bin/teststrandbias.R \
|
2023-12-28 10:41:01 +08:00
|
|
|
|
|/dataseq/jmdna/software/VarDict-1.8.3/bin/var2vcf_valid.pl -N ${name} -E -f 0.01 -F 0.1 >${output_dir}/mutation/${name}.normal.vcf
|
2023-12-19 13:37:52 +08:00
|
|
|
|
|
|
|
|
|
|
# 实验样本
|
|
|
|
|
|
java -jar /dataseq/jmdna/software/VarDict-1.8.3/lib/VarDict-1.8.3.jar \
|
|
|
|
|
|
-G ${ref} \
|
|
|
|
|
|
-f 0.0005 \
|
|
|
|
|
|
-N ${name} \
|
|
|
|
|
|
-b ${tumor_rmdup_bam} \
|
|
|
|
|
|
-UN -Q 20 -m 3 -r 2 -th 10 -c 1 -S 2 -E 3 -g 4 ${bed} \
|
|
|
|
|
|
| /dataseq/jmdna/software/VarDict-1.8.3/bin/teststrandbias.R \
|
|
|
|
|
|
| /dataseq/jmdna/software/VarDict-1.8.3/bin/var2vcf_valid.pl \
|
2023-12-28 10:41:01 +08:00
|
|
|
|
-N ${name} -E -f 0.0005 -F 0.1 > ${output_dir}/mutation/${name}.1r.vcf
|
2023-12-19 13:37:52 +08:00
|
|
|
|
|
|
|
|
|
|
#提取>=2条矫正的序列
|
|
|
|
|
|
bam_fetch.py ${output_dir}/alignment/${name}.rmdup.bam ${output_dir}/alignment/${name}.2r.rmdup.bam
|
|
|
|
|
|
samtools index ${output_dir}/alignment/${name}.2r.rmdup.bam
|
|
|
|
|
|
|
|
|
|
|
|
# 保证 1r call mut umi family 里面有2条reads
|
|
|
|
|
|
#2条矫正的call
|
|
|
|
|
|
java -jar /dataseq/jmdna/software/VarDict-1.8.3/lib/VarDict-1.8.3.jar -G ${ref} \
|
|
|
|
|
|
-f 0.0001 -N ${name}_2r -b ${output_dir}/alignment/${name}.2r.rmdup.bam \
|
|
|
|
|
|
-UN -Q 20 -m 3 -r 1 -th 10 -c 1 -S 2 -E 3 -g 4 ${bed} | /dataseq/jmdna/software/VarDict-1.8.3/bin/teststrandbias.R \
|
2023-12-28 10:41:01 +08:00
|
|
|
|
| /dataseq/jmdna/software/VarDict-1.8.3/bin/var2vcf_valid.pl -N ${name} -E -f 0.0001 -F 0.1 >${output_dir}/mutation/${name}.2r.vcf
|
2023-12-19 13:37:52 +08:00
|
|
|
|
|
|
|
|
|
|
# merge突变,以1条方式call的>0.01的突变+两条方式的对一条方式的低频区域(AF<0.01)进行矫正。
|
|
|
|
|
|
correct_umi_1r_plus_2r.pl \
|
|
|
|
|
|
${output_dir}/mutation/${name}.1r.vcf \
|
|
|
|
|
|
${output_dir}/mutation/${name}.2r.vcf \
|
|
|
|
|
|
${output_dir}/mutation/${name}.pre_raw.vcf
|
|
|
|
|
|
|
|
|
|
|
|
# 去除normal 中的突变位点
|
|
|
|
|
|
correct_umi_subnormal.pl \
|
|
|
|
|
|
${output_dir}/mutation/${name}.pre_raw.vcf \
|
|
|
|
|
|
${output_dir}/mutation/${name}.normal.vcf \
|
|
|
|
|
|
${output_dir}/mutation/${name}.raw.vcf
|
|
|
|
|
|
|
|
|
|
|
|
vcf_filter.py \
|
|
|
|
|
|
-i ${output_dir}/mutation/${name}.raw.vcf \
|
|
|
|
|
|
-e 'INFO/AF[0] >= 0.001 && INFO/VD >= 3' \
|
|
|
|
|
|
-o ${output_dir}/mutation/${name}.raw.snp_indel.vcf
|
|
|
|
|
|
|
|
|
|
|
|
# add msi and strandbias flag
|
2023-12-21 10:22:54 +08:00
|
|
|
|
vcf_add_tag_msi.pl ${output_dir}/mutation/${name}.raw.snp_indel.vcf ${output_dir}/mutation/${name}.raw.addtagmsi.snp_indel.vcf ${probe} c
|
2023-12-19 13:37:52 +08:00
|
|
|
|
|
|
|
|
|
|
# add malt flag
|
|
|
|
|
|
grep -v ^# ${output_dir}/mutation/${name}.raw.snp_indel.vcf | awk '{OFS="\t"}{print $1,$2-1,$2}' - > \
|
|
|
|
|
|
${output_dir}/mutation/${name}.raw.snp_indel.vcf.bed
|
|
|
|
|
|
samtools mpileup -aBq 20 -Q 20 -f ${ref} -l ${output_dir}/mutation/${name}.raw.snp_indel.vcf.bed \
|
|
|
|
|
|
${output_dir}/alignment/${name}.2r.rmdup.bam -o ${output_dir}/mutation/${name}.raw.snp_indel.vcf.pileup
|
|
|
|
|
|
|
|
|
|
|
|
vcf_add_tag_mutalt.py ${output_dir}/mutation/${name}.raw.snp_indel.vcf.pileup \
|
|
|
|
|
|
${output_dir}/mutation/${name}.raw.addtagmsi.snp_indel.vcf \
|
|
|
|
|
|
${output_dir}/mutation/${name}.raw.addtagmsi.addmutalt.snp_indel.vcf
|
|
|
|
|
|
|
|
|
|
|
|
cp ${output_dir}/mutation/${name}.raw.addtagmsi.addmutalt.snp_indel.vcf ${output_dir}/mutation/${name}.snp_indel.somatic.vcf
|
|
|
|
|
|
cp ${output_dir}/mutation/${name}.normal.vcf ${output_dir}/mutation/${name}.snp_indel.germline.vcf
|
|
|
|
|
|
|
|
|
|
|
|
>>>
|
|
|
|
|
|
|
|
|
|
|
|
output {
|
|
|
|
|
|
String somatic_vcf = "${output_dir}/mutation/${name}.snp_indel.somatic.vcf"
|
|
|
|
|
|
String germline_vcf = "${output_dir}/mutation/${name}.snp_indel.germline.vcf"
|
|
|
|
|
|
String raw_vcf = "${output_dir}/mutation/${name}.1r.vcf"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
task mutation_calling_tissue {
|
|
|
|
|
|
String name
|
|
|
|
|
|
String bed
|
|
|
|
|
|
String ref
|
|
|
|
|
|
String output_dir
|
|
|
|
|
|
String rmdup_bam
|
2023-12-21 10:22:54 +08:00
|
|
|
|
String probe
|
2023-12-19 13:37:52 +08:00
|
|
|
|
|
|
|
|
|
|
command <<<
|
|
|
|
|
|
if [ ! -d ${output_dir}/mutation ];then
|
|
|
|
|
|
mkdir ${output_dir}/mutation
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
# vardict
|
|
|
|
|
|
java -jar /dataseq/jmdna/software/VarDict-1.8.3/lib/VarDict-1.8.3.jar \
|
|
|
|
|
|
-G ${ref} \
|
|
|
|
|
|
-f 0.005 \
|
|
|
|
|
|
-N ${name} \
|
|
|
|
|
|
-b ${rmdup_bam} \
|
|
|
|
|
|
-UN \
|
|
|
|
|
|
-Q 20 \
|
|
|
|
|
|
-m 3 \
|
|
|
|
|
|
-r 2 \
|
|
|
|
|
|
-z 1 \
|
|
|
|
|
|
-th 10 \
|
|
|
|
|
|
-c 1 -S 2 -E 3 -g 4 ${bed} \
|
|
|
|
|
|
|/dataseq/jmdna/software/VarDict-1.8.3/bin/teststrandbias.R \
|
2023-12-28 10:41:01 +08:00
|
|
|
|
|/dataseq/jmdna/software/VarDict-1.8.3/bin/var2vcf_valid.pl -N ${name} -E -f 0.005 -F 0.1 \
|
2023-12-19 13:37:52 +08:00
|
|
|
|
>${output_dir}/mutation/${name}.raw.vcf
|
|
|
|
|
|
|
|
|
|
|
|
vcf_filter.py \
|
|
|
|
|
|
-i ${output_dir}/mutation/${name}.raw.vcf \
|
|
|
|
|
|
-e 'INFO/AF[0] >= 0.01 && INFO/VD >= 3' \
|
|
|
|
|
|
-o ${output_dir}/mutation/${name}.raw.snp_indel.vcf
|
|
|
|
|
|
|
|
|
|
|
|
# add msi and strandbias flag
|
2023-12-21 10:22:54 +08:00
|
|
|
|
vcf_add_tag_msi.pl ${output_dir}/mutation/${name}.raw.snp_indel.vcf ${output_dir}/mutation/${name}.raw.addtagmsi.snp_indel.vcf ${probe} t
|
2023-12-19 13:37:52 +08:00
|
|
|
|
|
|
|
|
|
|
cp ${output_dir}/mutation/${name}.raw.addtagmsi.snp_indel.vcf ${output_dir}/mutation/${name}.snp_indel.somatic.vcf
|
|
|
|
|
|
|
|
|
|
|
|
vcf_filter.py \
|
|
|
|
|
|
-i ${output_dir}/mutation/${name}.raw.snp_indel.vcf \
|
|
|
|
|
|
-e 'INFO/AF[0] > 0.1' \
|
|
|
|
|
|
-o ${output_dir}/mutation/${name}.snp_indel.germline.vcf
|
|
|
|
|
|
|
|
|
|
|
|
>>>
|
|
|
|
|
|
|
|
|
|
|
|
output {
|
|
|
|
|
|
String somatic_vcf = "${output_dir}/mutation/${name}.snp_indel.somatic.vcf"
|
|
|
|
|
|
String germline_vcf = "${output_dir}/mutation/${name}.snp_indel.germline.vcf"
|
|
|
|
|
|
String raw_vcf = "${output_dir}/mutation/${name}.raw.vcf"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
task mutation_calling_tissue_control {
|
|
|
|
|
|
String name
|
|
|
|
|
|
String bed
|
|
|
|
|
|
String ref
|
|
|
|
|
|
String output_dir
|
|
|
|
|
|
String tumor_rmdup_bam
|
|
|
|
|
|
String normal_rmdup_bam
|
2023-12-21 10:22:54 +08:00
|
|
|
|
String probe
|
2023-12-19 13:37:52 +08:00
|
|
|
|
|
|
|
|
|
|
command <<<
|
|
|
|
|
|
if [ ! -d ${output_dir}/mutation ];then
|
|
|
|
|
|
mkdir ${output_dir}/mutation
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
java -jar /dataseq/jmdna/software/VarDict-1.8.3/lib/VarDict-1.8.3.jar \
|
|
|
|
|
|
-G ${ref} \
|
|
|
|
|
|
-f 0.005 \
|
|
|
|
|
|
-N ${name} \
|
|
|
|
|
|
-b "${tumor_rmdup_bam}|${normal_rmdup_bam}" \
|
|
|
|
|
|
-UN \
|
|
|
|
|
|
-Q 20 \
|
|
|
|
|
|
-m 3 \
|
|
|
|
|
|
-r 2 \
|
|
|
|
|
|
-th 20 \
|
|
|
|
|
|
-z 1 -c 1 -S 2 -E 3 -g 4 ${bed} | /dataseq/jmdna/software/VarDict-1.8.3/bin/testsomatic.R \
|
2023-12-28 10:41:01 +08:00
|
|
|
|
| /dataseq/jmdna/software/VarDict-1.8.3/bin/var2vcf_paired.pl -N ${name} -f 0.005 -F 0.1 \
|
2023-12-19 13:37:52 +08:00
|
|
|
|
>${output_dir}/mutation/${name}.raw.vcf
|
|
|
|
|
|
|
|
|
|
|
|
vcf_filter.py \
|
|
|
|
|
|
-i ${output_dir}/mutation/${name}.raw.vcf \
|
|
|
|
|
|
-e 'INFO/AF[0] >= 0.01 && INFO/VD >= 3' \
|
|
|
|
|
|
-o ${output_dir}/mutation/${name}.raw.snp_indel.vcf
|
|
|
|
|
|
|
|
|
|
|
|
# add msi and strandbias flag
|
2023-12-21 10:22:54 +08:00
|
|
|
|
vcf_add_tag_msi.pl ${output_dir}/mutation/${name}.raw.snp_indel.vcf ${output_dir}/mutation/${name}.raw.addtagmsi.snp_indel.vcf ${probe} t
|
2023-12-19 13:37:52 +08:00
|
|
|
|
|
|
|
|
|
|
vcf_filter.py -i ${output_dir}/mutation/${name}.raw.addtagmsi.snp_indel.vcf \
|
2024-01-10 10:55:36 +08:00
|
|
|
|
-o ${output_dir}/mutation/${name}.snp_indel.somatic.vcf \
|
2023-12-19 13:37:52 +08:00
|
|
|
|
-e 'INFO/STATUS="StrongSomatic" | ( INFO/STATUS="LikelySomatic" && FORMAT/AF[0] > 3*FORMAT/AF[1] )'
|
|
|
|
|
|
|
|
|
|
|
|
vcf_filter.py -i ${output_dir}/mutation/${name}.raw.snp_indel.vcf \
|
|
|
|
|
|
-o ${output_dir}/mutation/${name}.snp_indel.germline.vcf \
|
2024-01-08 09:38:16 +08:00
|
|
|
|
-e 'INFO/STATUS="Germline" && FORMAT/AF[0] > 0.1 && FORMAT/AF[1] > 0.1'
|
2023-12-19 13:37:52 +08:00
|
|
|
|
|
|
|
|
|
|
>>>
|
|
|
|
|
|
|
|
|
|
|
|
output {
|
|
|
|
|
|
String somatic_vcf = "${output_dir}/mutation/${name}.snp_indel.somatic.vcf"
|
|
|
|
|
|
String germline_vcf = "${output_dir}/mutation/${name}.snp_indel.germline.vcf"
|
|
|
|
|
|
String raw_vcf = "${output_dir}/mutation/${name}.raw.vcf"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
task hotspot {
|
|
|
|
|
|
String name
|
|
|
|
|
|
String output_dir
|
|
|
|
|
|
String raw_vcf
|
|
|
|
|
|
Float threshold
|
|
|
|
|
|
|
|
|
|
|
|
command <<<
|
|
|
|
|
|
if [ ! -d ${output_dir}/mutation ];then
|
|
|
|
|
|
mkdir ${output_dir}/mutation
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
# hotspot
|
2024-01-12 15:44:01 +08:00
|
|
|
|
# vcf_filter.py \
|
|
|
|
|
|
# -i ${raw_vcf} \
|
|
|
|
|
|
# -e 'INFO/AF[0] < ${threshold}' \
|
|
|
|
|
|
# -o ${output_dir}/mutation/${name}.raw.hotspot.vcf
|
2023-12-19 13:37:52 +08:00
|
|
|
|
|
2024-01-12 15:44:01 +08:00
|
|
|
|
# vcf_operations.py ${output_dir}/mutation/${name}.raw.hotspot.vcf \
|
|
|
|
|
|
# -b $PUBLIC/hotspot/hotspot_delins.bed \
|
|
|
|
|
|
# -o ${output_dir}/mutation/${name}.raw.hotspot.delins.vcf
|
|
|
|
|
|
|
|
|
|
|
|
vcf_operations.py ${raw_vcf} \
|
2023-12-19 13:37:52 +08:00
|
|
|
|
-b $PUBLIC/hotspot/hotspot_delins.bed \
|
2023-12-29 10:11:01 +08:00
|
|
|
|
-o ${output_dir}/mutation/${name}.raw.hotspot.delins.vcf
|
|
|
|
|
|
|
2024-01-15 13:29:24 +08:00
|
|
|
|
vcf_operations.py ${raw_vcf} \
|
2023-12-29 10:11:01 +08:00
|
|
|
|
-b $PUBLIC/hotspot/hotspot_snpindel.bed \
|
|
|
|
|
|
-o ${output_dir}/mutation/${name}.raw.hotspot.snpindel.vcf \
|
|
|
|
|
|
-s
|
2023-12-19 13:37:52 +08:00
|
|
|
|
|
2024-01-15 13:29:24 +08:00
|
|
|
|
vcf_operations.py ${raw_vcf} \
|
2023-12-19 13:37:52 +08:00
|
|
|
|
-v $PUBLIC/hotspot/hotspot_snv.vcf \
|
2023-12-29 10:11:01 +08:00
|
|
|
|
-o ${output_dir}/mutation/${name}.raw.hotspot.snv.vcf
|
|
|
|
|
|
|
|
|
|
|
|
vcf_operations.py ${output_dir}/mutation/${name}.raw.hotspot.snv.vcf \
|
|
|
|
|
|
-v ${output_dir}/mutation/${name}.raw.hotspot.delins.vcf \
|
|
|
|
|
|
-o ${output_dir}/mutation/${name}.raw.hotspot.snv_delins.vcf \
|
|
|
|
|
|
-m
|
2023-12-19 13:37:52 +08:00
|
|
|
|
|
2023-12-29 10:11:01 +08:00
|
|
|
|
vcf_operations.py ${output_dir}/mutation/${name}.raw.hotspot.snv_delins.vcf \
|
|
|
|
|
|
-v ${output_dir}/mutation/${name}.raw.hotspot.snpindel.vcf \
|
2023-12-19 13:37:52 +08:00
|
|
|
|
-o ${output_dir}/mutation/${name}.hotspot.vcf \
|
|
|
|
|
|
-m
|
|
|
|
|
|
|
|
|
|
|
|
>>>
|
|
|
|
|
|
|
|
|
|
|
|
output {
|
|
|
|
|
|
String hotspot_vcf = "${output_dir}/mutation/${name}.hotspot.vcf"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
task annovar {
|
|
|
|
|
|
String prefix
|
|
|
|
|
|
String output_dir
|
|
|
|
|
|
String ref
|
|
|
|
|
|
String vcf
|
|
|
|
|
|
|
|
|
|
|
|
command <<<
|
|
|
|
|
|
|
|
|
|
|
|
if [ ! -d ${output_dir}/mutation ];then
|
|
|
|
|
|
mkdir ${output_dir}/mutation
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
# 有突变记录的进行注释
|
|
|
|
|
|
if grep -E -q "^[^#]" ${vcf}; then
|
|
|
|
|
|
|
|
|
|
|
|
table_annovar.pl \
|
|
|
|
|
|
${vcf} \
|
|
|
|
|
|
/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 \
|
|
|
|
|
|
-outfile ${output_dir}/mutation/${prefix} \
|
|
|
|
|
|
-dot2underline
|
|
|
|
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
|
|
|
|
# 无突变记录创建文件
|
|
|
|
|
|
touch ${output_dir}/mutation/${prefix}.hg19_multianno.txt ${output_dir}/mutation/${prefix}.hg19_multianno.vcf
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
>>>
|
|
|
|
|
|
output {
|
|
|
|
|
|
String anno_txt = "${output_dir}/mutation/${prefix}.hg19_multianno.txt"
|
|
|
|
|
|
String anno_vcf = "${output_dir}/mutation/${prefix}.hg19_multianno.txt"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
task filter_umi {
|
|
|
|
|
|
String name
|
|
|
|
|
|
String file
|
|
|
|
|
|
String project
|
|
|
|
|
|
String sample_type
|
|
|
|
|
|
String pipeline
|
|
|
|
|
|
String output_dir
|
|
|
|
|
|
String tumor_rmdup_bam
|
|
|
|
|
|
|
|
|
|
|
|
command <<<
|
|
|
|
|
|
|
|
|
|
|
|
if [ ! -d ${output_dir}/mutation ];then
|
|
|
|
|
|
mkdir ${output_dir}/mutation
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
filter_snpindel.pl \
|
|
|
|
|
|
${file} \
|
|
|
|
|
|
${output_dir}/mutation/${name}.snp_indel.${pipeline}.hg19_multianno.filter_pre.txt \
|
|
|
|
|
|
${output_dir}/mutation/${name}.snp_indel.${pipeline}.hg19_multianno.tag.txt \
|
|
|
|
|
|
${project} \
|
|
|
|
|
|
${sample_type} \
|
|
|
|
|
|
${pipeline}
|
|
|
|
|
|
|
|
|
|
|
|
if [ "${pipeline}" = 'hotspot' ] ;then
|
|
|
|
|
|
cp ${output_dir}/mutation/${name}.snp_indel.${pipeline}.hg19_multianno.filter_pre.txt \
|
|
|
|
|
|
${output_dir}/mutation/${name}.snp_indel.${pipeline}.hg19_multianno.filter.txt
|
|
|
|
|
|
else
|
|
|
|
|
|
correct_umi_overlap_reads.py \
|
|
|
|
|
|
${output_dir}/mutation/${name}.snp_indel.${pipeline}.hg19_multianno.filter_pre.txt \
|
|
|
|
|
|
${tumor_rmdup_bam} \
|
|
|
|
|
|
${output_dir}/mutation/${name}.snp_indel.${pipeline}.hg19_multianno.filter.txt
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
>>>
|
|
|
|
|
|
output {
|
|
|
|
|
|
String snvindel_filtered= "${output_dir}/mutation/${name}.snp_indel.${pipeline}.hg19_multianno.filter.txt"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
task filter_tissue {
|
|
|
|
|
|
String name
|
|
|
|
|
|
String file
|
|
|
|
|
|
String project
|
|
|
|
|
|
String sample_type
|
|
|
|
|
|
String pipeline
|
|
|
|
|
|
String output_dir
|
|
|
|
|
|
|
|
|
|
|
|
command <<<
|
|
|
|
|
|
|
|
|
|
|
|
if [ ! -d ${output_dir}/mutation ];then
|
|
|
|
|
|
mkdir ${output_dir}/mutation
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
filter_snpindel.pl \
|
|
|
|
|
|
${file} \
|
|
|
|
|
|
${output_dir}/mutation/${name}.snp_indel.${pipeline}.hg19_multianno.filter.txt \
|
|
|
|
|
|
${output_dir}/mutation/${name}.snp_indel.${pipeline}.hg19_multianno.tag.txt \
|
|
|
|
|
|
${project} \
|
|
|
|
|
|
${sample_type} \
|
|
|
|
|
|
${pipeline}
|
|
|
|
|
|
|
|
|
|
|
|
>>>
|
|
|
|
|
|
output {
|
|
|
|
|
|
String snvindel_filtered= "${output_dir}/mutation/${name}.snp_indel.${pipeline}.hg19_multianno.filter.txt"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
task mutation_sum {
|
|
|
|
|
|
String name
|
|
|
|
|
|
String somatic_txt
|
|
|
|
|
|
String germline_txt
|
|
|
|
|
|
String hotspot_txt
|
|
|
|
|
|
String output_dir
|
|
|
|
|
|
String cancer
|
|
|
|
|
|
|
|
|
|
|
|
command <<<
|
|
|
|
|
|
|
|
|
|
|
|
if [ ! -d ${output_dir}/mutation ];then
|
|
|
|
|
|
mkdir ${output_dir}/mutation
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
{ head -n 1 ${somatic_txt} ; tail -n +2 ${somatic_txt} ; tail -n +2 ${hotspot_txt} ;} |\
|
2024-01-15 13:29:24 +08:00
|
|
|
|
{ head -n 1 ; awk -F '\t' '{$1 = 1; OFS="\t" ; key=""; for (i=3; i<=7; i++) { key = key $i "," } \
|
2023-12-19 13:37:52 +08:00
|
|
|
|
if (key in data) { data[key] = data[key] ";" $NF; } \
|
|
|
|
|
|
else { data[key] = $0; }} END { for (i in data) { print data[i]; } }' ; } > \
|
|
|
|
|
|
${output_dir}/mutation/${name}.snp_indel.somatic.hg19_multianno.filter.sum.txt
|
|
|
|
|
|
|
|
|
|
|
|
target_therapy_snpindel.pl ${output_dir}/mutation/${name}.snp_indel.somatic.hg19_multianno.filter.sum.txt \
|
|
|
|
|
|
${output_dir}/mutation/${name}.snp_indel.somatic.hg19_multianno.filter.sum ${cancer}
|
|
|
|
|
|
|
|
|
|
|
|
>>>
|
|
|
|
|
|
output {
|
|
|
|
|
|
String snvindel_filtered_sum = "${output_dir}/mutation/${name}.snp_indel.somatic.hg19_multianno.filter.sum.txt"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
workflow call_mutation {
|
|
|
|
|
|
|
|
|
|
|
|
Boolean run=true
|
|
|
|
|
|
|
|
|
|
|
|
String tumor
|
|
|
|
|
|
String tumor_rmdup_bam
|
|
|
|
|
|
String? normal
|
|
|
|
|
|
String? normal_rmdup_bam
|
|
|
|
|
|
Boolean umi
|
|
|
|
|
|
String output_dir
|
|
|
|
|
|
String ref
|
|
|
|
|
|
String bed
|
|
|
|
|
|
String project
|
|
|
|
|
|
String cancer
|
2023-12-21 10:22:54 +08:00
|
|
|
|
String probe
|
2023-12-19 13:37:52 +08:00
|
|
|
|
|
|
|
|
|
|
# pipe 执行 mutation_calling => annovar => filter
|
|
|
|
|
|
if (run) {
|
|
|
|
|
|
# 单样本
|
|
|
|
|
|
if (!defined(normal)) {
|
|
|
|
|
|
if (umi) {
|
|
|
|
|
|
call mutation_calling_umi {
|
|
|
|
|
|
input:
|
|
|
|
|
|
name=tumor,
|
|
|
|
|
|
output_dir=output_dir,
|
|
|
|
|
|
ref=ref,
|
|
|
|
|
|
bed=bed,
|
2023-12-21 10:22:54 +08:00
|
|
|
|
rmdup_bam=tumor_rmdup_bam,
|
|
|
|
|
|
probe=probe
|
2023-12-19 13:37:52 +08:00
|
|
|
|
}
|
|
|
|
|
|
call hotspot as hotspot_calling_umi {
|
|
|
|
|
|
input:
|
|
|
|
|
|
name=tumor,
|
|
|
|
|
|
output_dir=output_dir,
|
|
|
|
|
|
raw_vcf=mutation_calling_umi.raw_vcf,
|
|
|
|
|
|
threshold=0.1
|
|
|
|
|
|
}
|
|
|
|
|
|
call annovar as anno_somatic_umi {
|
|
|
|
|
|
input:
|
|
|
|
|
|
prefix="${tumor}.snp_indel.somatic",
|
|
|
|
|
|
output_dir=output_dir,
|
|
|
|
|
|
ref=ref,
|
|
|
|
|
|
vcf=mutation_calling_umi.somatic_vcf
|
|
|
|
|
|
}
|
|
|
|
|
|
call annovar as anno_germline_umi {
|
|
|
|
|
|
input:
|
|
|
|
|
|
prefix="${tumor}.snp_indel.germline",
|
|
|
|
|
|
output_dir=output_dir,
|
|
|
|
|
|
ref=ref,
|
|
|
|
|
|
vcf=mutation_calling_umi.germline_vcf
|
|
|
|
|
|
}
|
|
|
|
|
|
call annovar as anno_hotspot_umi {
|
|
|
|
|
|
input:
|
|
|
|
|
|
prefix="${tumor}.hotspot",
|
|
|
|
|
|
output_dir=output_dir,
|
|
|
|
|
|
ref=ref,
|
|
|
|
|
|
vcf=hotspot_calling_umi.hotspot_vcf
|
|
|
|
|
|
}
|
|
|
|
|
|
call filter_umi as filter_somatic_umi {
|
|
|
|
|
|
input:
|
|
|
|
|
|
name=tumor,
|
|
|
|
|
|
file=anno_somatic_umi.anno_txt,
|
|
|
|
|
|
project=project,
|
|
|
|
|
|
sample_type='c',
|
|
|
|
|
|
pipeline='somatic',
|
|
|
|
|
|
output_dir=output_dir,
|
|
|
|
|
|
tumor_rmdup_bam = tumor_rmdup_bam
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
call filter_umi as filter_hotspot_umi {
|
|
|
|
|
|
input:
|
|
|
|
|
|
name=tumor,
|
|
|
|
|
|
file=anno_hotspot_umi.anno_txt,
|
|
|
|
|
|
project=project,
|
|
|
|
|
|
sample_type='c',
|
|
|
|
|
|
pipeline='hotspot',
|
|
|
|
|
|
output_dir=output_dir,
|
|
|
|
|
|
tumor_rmdup_bam = tumor_rmdup_bam
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
call filter_umi as filter_germline_umi {
|
|
|
|
|
|
input:
|
|
|
|
|
|
name=tumor,
|
|
|
|
|
|
file=anno_germline_umi.anno_txt,
|
|
|
|
|
|
project=project,
|
|
|
|
|
|
sample_type='c',
|
|
|
|
|
|
pipeline='germline',
|
|
|
|
|
|
output_dir=output_dir,
|
|
|
|
|
|
tumor_rmdup_bam = tumor_rmdup_bam
|
|
|
|
|
|
}
|
|
|
|
|
|
call mutation_sum as mutation_sum_umi {
|
|
|
|
|
|
input:
|
|
|
|
|
|
name=tumor,
|
|
|
|
|
|
output_dir=output_dir,
|
|
|
|
|
|
somatic_txt=filter_somatic_umi.snvindel_filtered,
|
|
|
|
|
|
germline_txt=filter_germline_umi.snvindel_filtered,
|
|
|
|
|
|
hotspot_txt=filter_hotspot_umi.snvindel_filtered,
|
|
|
|
|
|
cancer=cancer
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (!umi) {
|
|
|
|
|
|
call mutation_calling_tissue {
|
|
|
|
|
|
input:
|
|
|
|
|
|
name=tumor,
|
|
|
|
|
|
output_dir=output_dir,
|
|
|
|
|
|
ref=ref,
|
|
|
|
|
|
bed=bed,
|
2023-12-21 10:22:54 +08:00
|
|
|
|
rmdup_bam=tumor_rmdup_bam,
|
|
|
|
|
|
probe=probe
|
2023-12-19 13:37:52 +08:00
|
|
|
|
}
|
|
|
|
|
|
call hotspot as hotspot_calling_tissue {
|
|
|
|
|
|
input:
|
|
|
|
|
|
name=tumor,
|
|
|
|
|
|
output_dir=output_dir,
|
|
|
|
|
|
raw_vcf=mutation_calling_tissue.raw_vcf,
|
|
|
|
|
|
threshold=0.1
|
|
|
|
|
|
}
|
|
|
|
|
|
call annovar as anno_somatic_tissue {
|
|
|
|
|
|
input:
|
|
|
|
|
|
prefix="${tumor}.snp_indel.somatic",
|
|
|
|
|
|
output_dir=output_dir,
|
|
|
|
|
|
ref=ref,
|
|
|
|
|
|
vcf=mutation_calling_tissue.somatic_vcf
|
|
|
|
|
|
}
|
|
|
|
|
|
call annovar as anno_germline_tissue {
|
|
|
|
|
|
input:
|
|
|
|
|
|
prefix="${tumor}.snp_indel.germline",
|
|
|
|
|
|
output_dir=output_dir,
|
|
|
|
|
|
ref=ref,
|
|
|
|
|
|
vcf=mutation_calling_tissue.germline_vcf
|
|
|
|
|
|
}
|
|
|
|
|
|
call annovar as anno_hotspot_tissue {
|
|
|
|
|
|
input:
|
|
|
|
|
|
prefix="${tumor}.hotspot",
|
|
|
|
|
|
output_dir=output_dir,
|
|
|
|
|
|
ref=ref,
|
|
|
|
|
|
vcf=hotspot_calling_tissue.hotspot_vcf
|
|
|
|
|
|
}
|
|
|
|
|
|
call filter_tissue as filter_somatic_tissue {
|
|
|
|
|
|
input:
|
|
|
|
|
|
name=tumor,
|
|
|
|
|
|
file=anno_somatic_tissue.anno_txt,
|
|
|
|
|
|
project=project,
|
|
|
|
|
|
sample_type='t',
|
|
|
|
|
|
pipeline='somatic',
|
|
|
|
|
|
output_dir=output_dir,
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
call filter_tissue as filter_hotspot_tissue {
|
|
|
|
|
|
input:
|
|
|
|
|
|
name=tumor,
|
|
|
|
|
|
file=anno_hotspot_tissue.anno_txt,
|
|
|
|
|
|
project=project,
|
|
|
|
|
|
sample_type='t',
|
|
|
|
|
|
pipeline='hotspot',
|
|
|
|
|
|
output_dir=output_dir,
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
call filter_tissue as filter_germline_tissue {
|
|
|
|
|
|
input:
|
|
|
|
|
|
name=tumor,
|
|
|
|
|
|
file=anno_germline_tissue.anno_txt,
|
|
|
|
|
|
project=project,
|
|
|
|
|
|
sample_type='t',
|
|
|
|
|
|
pipeline='germline',
|
|
|
|
|
|
output_dir=output_dir,
|
|
|
|
|
|
}
|
|
|
|
|
|
call mutation_sum as mutation_sum_tissue {
|
|
|
|
|
|
input:
|
|
|
|
|
|
name=tumor,
|
|
|
|
|
|
output_dir=output_dir,
|
|
|
|
|
|
somatic_txt=filter_somatic_tissue.snvindel_filtered,
|
|
|
|
|
|
germline_txt=filter_germline_tissue.snvindel_filtered,
|
|
|
|
|
|
hotspot_txt=filter_hotspot_tissue.snvindel_filtered,
|
|
|
|
|
|
cancer=cancer
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
# 双样本
|
|
|
|
|
|
if (defined(normal)) {
|
|
|
|
|
|
if (umi) {
|
|
|
|
|
|
call mutation_calling_umi_control {
|
|
|
|
|
|
input:
|
|
|
|
|
|
name=tumor,
|
|
|
|
|
|
output_dir=output_dir,
|
|
|
|
|
|
ref=ref,
|
|
|
|
|
|
bed=bed,
|
|
|
|
|
|
tumor_rmdup_bam=tumor_rmdup_bam,
|
2023-12-21 10:22:54 +08:00
|
|
|
|
normal_rmdup_bam=normal_rmdup_bam,
|
|
|
|
|
|
probe=probe
|
2023-12-19 13:37:52 +08:00
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
call hotspot as hotspot_calling_umi_control {
|
|
|
|
|
|
input:
|
|
|
|
|
|
name=tumor,
|
|
|
|
|
|
output_dir=output_dir,
|
|
|
|
|
|
raw_vcf=mutation_calling_umi_control.raw_vcf,
|
|
|
|
|
|
threshold=0.1
|
|
|
|
|
|
}
|
|
|
|
|
|
call annovar as anno_somatic_umi_control {
|
|
|
|
|
|
input:
|
|
|
|
|
|
prefix="${tumor}.snp_indel.somatic",
|
|
|
|
|
|
output_dir=output_dir,
|
|
|
|
|
|
ref=ref,
|
|
|
|
|
|
vcf=mutation_calling_umi_control.somatic_vcf
|
|
|
|
|
|
}
|
|
|
|
|
|
call annovar as anno_germline_umi_control {
|
|
|
|
|
|
input:
|
|
|
|
|
|
prefix="${tumor}.snp_indel.germline",
|
|
|
|
|
|
output_dir=output_dir,
|
|
|
|
|
|
ref=ref,
|
|
|
|
|
|
vcf=mutation_calling_umi_control.germline_vcf
|
|
|
|
|
|
}
|
|
|
|
|
|
call annovar as anno_hotspot_umi_control {
|
|
|
|
|
|
input:
|
|
|
|
|
|
prefix="${tumor}.hotspot",
|
|
|
|
|
|
output_dir=output_dir,
|
|
|
|
|
|
ref=ref,
|
|
|
|
|
|
vcf=hotspot_calling_umi_control.hotspot_vcf
|
|
|
|
|
|
}
|
|
|
|
|
|
call filter_umi as filter_somatic_umi_control {
|
|
|
|
|
|
input:
|
|
|
|
|
|
name=tumor,
|
|
|
|
|
|
file=anno_somatic_umi_control.anno_txt,
|
|
|
|
|
|
project=project,
|
|
|
|
|
|
sample_type='c',
|
|
|
|
|
|
pipeline='somatic',
|
|
|
|
|
|
output_dir=output_dir,
|
|
|
|
|
|
tumor_rmdup_bam = tumor_rmdup_bam
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
call filter_umi as filter_hotspot_umi_control {
|
|
|
|
|
|
input:
|
|
|
|
|
|
name=tumor,
|
|
|
|
|
|
file=anno_hotspot_umi_control.anno_txt,
|
|
|
|
|
|
project=project,
|
|
|
|
|
|
sample_type='c',
|
|
|
|
|
|
pipeline='hotspot',
|
|
|
|
|
|
output_dir=output_dir,
|
|
|
|
|
|
tumor_rmdup_bam = tumor_rmdup_bam
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
call filter_umi as filter_germline_umi_control {
|
|
|
|
|
|
input:
|
|
|
|
|
|
name=tumor,
|
|
|
|
|
|
file=anno_germline_umi_control.anno_txt,
|
|
|
|
|
|
project=project,
|
|
|
|
|
|
sample_type='c',
|
|
|
|
|
|
pipeline='germline',
|
|
|
|
|
|
output_dir=output_dir,
|
|
|
|
|
|
tumor_rmdup_bam = tumor_rmdup_bam
|
|
|
|
|
|
}
|
|
|
|
|
|
call mutation_sum as mutation_sum_umi_control {
|
|
|
|
|
|
input:
|
|
|
|
|
|
name=tumor,
|
|
|
|
|
|
output_dir=output_dir,
|
|
|
|
|
|
somatic_txt=filter_somatic_umi_control.snvindel_filtered,
|
|
|
|
|
|
germline_txt=filter_germline_umi_control.snvindel_filtered,
|
|
|
|
|
|
hotspot_txt=filter_hotspot_umi_control.snvindel_filtered,
|
|
|
|
|
|
cancer=cancer
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2023-12-28 09:14:58 +08:00
|
|
|
|
|
2023-12-19 13:37:52 +08:00
|
|
|
|
if (!umi) {
|
|
|
|
|
|
call mutation_calling_tissue_control {
|
|
|
|
|
|
input:
|
|
|
|
|
|
name=tumor,
|
|
|
|
|
|
output_dir=output_dir,
|
|
|
|
|
|
ref=ref,
|
|
|
|
|
|
bed=bed,
|
|
|
|
|
|
tumor_rmdup_bam=tumor_rmdup_bam,
|
2023-12-21 10:22:54 +08:00
|
|
|
|
normal_rmdup_bam=normal_rmdup_bam,
|
|
|
|
|
|
probe=probe
|
2023-12-19 13:37:52 +08:00
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
call hotspot as hotspot_calling_tissue_control {
|
|
|
|
|
|
input:
|
|
|
|
|
|
name=tumor,
|
|
|
|
|
|
output_dir=output_dir,
|
|
|
|
|
|
raw_vcf=mutation_calling_tissue_control.raw_vcf,
|
|
|
|
|
|
threshold=0.1
|
|
|
|
|
|
}
|
|
|
|
|
|
call annovar as anno_somatic_tissue_control {
|
|
|
|
|
|
input:
|
|
|
|
|
|
prefix="${tumor}.snp_indel.somatic",
|
|
|
|
|
|
output_dir=output_dir,
|
|
|
|
|
|
ref=ref,
|
|
|
|
|
|
vcf=mutation_calling_tissue_control.somatic_vcf
|
|
|
|
|
|
}
|
|
|
|
|
|
call annovar as anno_germline_tissue_control {
|
|
|
|
|
|
input:
|
|
|
|
|
|
prefix="${tumor}.snp_indel.germline",
|
|
|
|
|
|
output_dir=output_dir,
|
|
|
|
|
|
ref=ref,
|
|
|
|
|
|
vcf=mutation_calling_tissue_control.germline_vcf
|
|
|
|
|
|
}
|
|
|
|
|
|
call annovar as anno_hotspot_tissue_control {
|
|
|
|
|
|
input:
|
|
|
|
|
|
prefix="${tumor}.hotspot",
|
|
|
|
|
|
output_dir=output_dir,
|
|
|
|
|
|
ref=ref,
|
|
|
|
|
|
vcf=hotspot_calling_tissue_control.hotspot_vcf
|
|
|
|
|
|
}
|
|
|
|
|
|
call filter_tissue as filter_somatic_tissue_control {
|
|
|
|
|
|
input:
|
|
|
|
|
|
name=tumor,
|
|
|
|
|
|
file=anno_somatic_tissue_control.anno_txt,
|
|
|
|
|
|
project=project,
|
|
|
|
|
|
sample_type='t',
|
|
|
|
|
|
pipeline='somatic',
|
|
|
|
|
|
output_dir=output_dir,
|
|
|
|
|
|
}
|
|
|
|
|
|
call filter_tissue as filter_hotspot_tissue_control {
|
|
|
|
|
|
input:
|
|
|
|
|
|
name=tumor,
|
|
|
|
|
|
file=anno_hotspot_tissue_control.anno_txt,
|
|
|
|
|
|
project=project,
|
|
|
|
|
|
sample_type='t',
|
|
|
|
|
|
pipeline='hotspot',
|
|
|
|
|
|
output_dir=output_dir,
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
call filter_tissue as filter_germline_tissue_control {
|
|
|
|
|
|
input:
|
|
|
|
|
|
name=tumor,
|
|
|
|
|
|
file=anno_germline_tissue_control.anno_txt,
|
|
|
|
|
|
project=project,
|
|
|
|
|
|
sample_type='t',
|
|
|
|
|
|
pipeline='germline',
|
|
|
|
|
|
output_dir=output_dir,
|
|
|
|
|
|
}
|
|
|
|
|
|
call mutation_sum as mutation_sum_tissue_control {
|
|
|
|
|
|
input:
|
|
|
|
|
|
name=tumor,
|
|
|
|
|
|
output_dir=output_dir,
|
|
|
|
|
|
somatic_txt=filter_somatic_tissue_control.snvindel_filtered,
|
|
|
|
|
|
germline_txt=filter_germline_tissue_control.snvindel_filtered,
|
|
|
|
|
|
hotspot_txt=filter_hotspot_tissue_control.snvindel_filtered,
|
|
|
|
|
|
cancer=cancer
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
output {
|
|
|
|
|
|
String raw_vcf = "${output_dir}/mutation/${tumor}.raw.snp_indel.vcf"
|
|
|
|
|
|
String somatic_vcf = "${output_dir}/mutation/${tumor}.snp_indel.somatic.vcf"
|
|
|
|
|
|
String germline_vcf = "${output_dir}/mutation/${tumor}.snp_indel.germline.vcf"
|
|
|
|
|
|
String hotspot_vcf = "${output_dir}/mutation/${tumor}.hotspot.vcf"
|
|
|
|
|
|
String somatic_anno_txt = "${output_dir}/mutation/${tumor}.snp_indel.somatic.hg19_multianno.txt"
|
|
|
|
|
|
String somatic_filter = "${output_dir}/mutation/${tumor}.snp_indel.somatic.hg19_multianno.filter.txt"
|
|
|
|
|
|
String germline_filter = "${output_dir}/mutation/${tumor}.snp_indel.germline.hg19_multianno.filter.txt"
|
|
|
|
|
|
String hotspot_filter = "${output_dir}/mutation/${tumor}.snp_indel.hotspot.hg19_multianno.filter.txt"
|
|
|
|
|
|
}
|
2023-09-27 10:47:03 +08:00
|
|
|
|
}
|