|
|
@@ -19,10 +19,6 @@ task CNVkit { |
|
|
|
set -e |
|
|
|
nt=$(nproc) |
|
|
|
|
|
|
|
CNV_ANALYSIS_PATH=/cromwell_root/tmp/cnvkit |
|
|
|
mkdir -p $CNV_ANALYSIS_PATH |
|
|
|
cd $CNV_ANALYSIS_PATH |
|
|
|
|
|
|
|
cnvkit.py access ${ref_dir}/${fasta} -o access.bed |
|
|
|
# Prepare the target bed |
|
|
|
cnvkit.py target ${regions} --annotate ${ref_flat} --split --short-names -o my_baits.bed |
|
|
@@ -69,8 +65,8 @@ task CNVkit { |
|
|
|
cnvkit.py genemetrics ${sample}.cnr -s ${sample}.call.cns -t 0.2 -m 3 -o ${sample}.segment-genes.txt |
|
|
|
cat ${sample}.ratio-genes.txt | tail -n+2 | cut -f1 | sort | uniq > ratio-genes.txt |
|
|
|
cat ${sample}.segment-genes.txt | tail -n+2 | cut -f1 | sort | uniq > segment-genes.txt |
|
|
|
comm -12 ratio-genes.txt segment-genes.txt > trusted_cnv_genes.txt |
|
|
|
for gene in `cat trusted_cnv_genes.txt` |
|
|
|
comm -12 ratio-genes.txt segment-genes.txt > ${sample}.trusted_cnv_genes.txt |
|
|
|
for gene in `cat ${sample}.trusted_cnv_genes.txt` |
|
|
|
do |
|
|
|
cnvkit.py scatter ${sample}.cnr -s ${sample}.call.cns -g $gene -o ./gainloss/${sample}.$gene.scatter.pdf |
|
|
|
done |
|
|
@@ -92,7 +88,7 @@ task CNVkit { |
|
|
|
File stats = "${sample}.stats" |
|
|
|
File call_cns = "${sample}.call.cns" |
|
|
|
File genemetrics = "${sample}.cnv.txt" |
|
|
|
File gainloss_genes = "/cromwell_root/tmp/cnvkit/trusted_cnv_genes.txt" |
|
|
|
Array[File] gainloss = glob("/cromwell_root/tmp/cnvkit/gainloss/*") |
|
|
|
File gainloss_genes = "${sample}.trusted_cnv_genes.txt" |
|
|
|
Array[File] gainloss = glob("./gainloss/*") |
|
|
|
} |
|
|
|
} |