66 lines
1.5 KiB
Plaintext
Executable File
66 lines
1.5 KiB
Plaintext
Executable File
|
|
task run_pollution {
|
|
String name
|
|
String output_dir
|
|
String probe
|
|
String vcf
|
|
String? vcf2
|
|
|
|
command <<<
|
|
|
|
if [ ! -d ${output_dir}/pollution ];then
|
|
mkdir ${output_dir}/pollution
|
|
fi
|
|
pollution.py -n ${name} \
|
|
-v ${vcf} \
|
|
-v2 ${vcf2} \
|
|
-o ${output_dir}/pollution \
|
|
-p ${probe} \
|
|
-b $PUBLIC/pollution/${probe}_contaminate_ref.bed \
|
|
-c $PUBLIC/pollution/${probe}_contaminate_cnvkit.bed
|
|
>>>
|
|
|
|
output {
|
|
String run_pollution_res = "${output_dir}/pollution/${name}_pollution.csv"
|
|
}
|
|
}
|
|
|
|
workflow call_pollution {
|
|
|
|
Boolean run=true
|
|
|
|
String tumor
|
|
String? normal
|
|
String output_dir
|
|
String probe
|
|
String raw_vcf
|
|
String somatic_vcf
|
|
String germline_vcf
|
|
|
|
if (run) {
|
|
if (defined(normal)) {
|
|
call run_pollution as run_pollution_paired {
|
|
input:
|
|
name=tumor,
|
|
output_dir=output_dir,
|
|
probe=probe,
|
|
vcf=somatic_vcf,
|
|
vcf2=germline_vcf
|
|
}
|
|
}
|
|
|
|
if (!defined(normal)) {
|
|
call run_pollution as run_pollution_single {
|
|
input:
|
|
name=tumor,
|
|
output_dir=output_dir,
|
|
probe=probe,
|
|
vcf=raw_vcf
|
|
}
|
|
}
|
|
}
|
|
|
|
output {
|
|
String pollution_res = "${output_dir}/pollution/${tumor}_pollution.csv"
|
|
}
|
|
} |