Browse Source

perf(CNVkit): call filter

master
YaqingLiu 2 years ago
parent
commit
cd964c05f3
1 changed files with 7 additions and 6 deletions
  1. +7
    -6
      tasks/CNVkit.wdl

+ 7
- 6
tasks/CNVkit.wdl View File

# Derive each segment's absolute integer copy number, ploidy must be int value # Derive each segment's absolute integer copy number, ploidy must be int value
PURITY=`awk -F'\t' '{print $6}' ${hrd} | sed -n '2p'` PURITY=`awk -F'\t' '{print $6}' ${hrd} | sed -n '2p'`
cnvkit.py call --drop-low-coverag --filter ci ${sample}.cns -y -m clonal --purity $PURITY -o ${sample}.call.cns
cnvkit.py call --drop-low-coverag --filter ci ${sample}.cnr -y -m clonal --purity $PURITY -o ${sample}.call.cnr
cnvkit.py ${sample}.cns --ci --sem -o ${sample}.segmetrics.cns
cnvkit.py call --drop-low-coverag --filter ci --filter sem ${sample}.segmetrics.cns -y -m clonal --purity $PURITY -o ${sample}.call.cns
# cnvkit.py call --drop-low-coverag ${sample}.cnr -y -m clonal --purity $PURITY -o ${sample}.cnr
# Plot the results # Plot the results
cnvkit.py scatter ${sample}.cnr -s ${sample}.call.cns -o ${sample}.scatter.pdf cnvkit.py scatter ${sample}.cnr -s ${sample}.call.cns -o ${sample}.scatter.pdf
# Genemetrics # Genemetrics
mkdir gainloss mkdir gainloss
cnvkit.py genemetrics ${sample}.call.cnr -t 0.2 -m 3 -o ${sample}.ratio_cnv.txt
cnvkit.py genemetrics ${sample}.call.cnr -s ${sample}.call.cns -t 0.2 -m 3 -o ${sample}.segment_cnv.txt
cnvkit.py genemetrics ${sample}.cnr -t 0.2 -m 3 -o ${sample}.ratio_cnv.txt
cnvkit.py genemetrics ${sample}.cnr -s ${sample}.call.cns -t 0.2 -m 3 -o ${sample}.segment_cnv.txt
# Filter genes # Filter genes
cat ${sample}.ratio_cnv.txt | tail -n+2 | cut -f1 | sort | uniq > ratio_cnv.txt cat ${sample}.ratio_cnv.txt | tail -n+2 | cut -f1 | sort | uniq > ratio_cnv.txt
cat ${sample}.segment_cnv.txt | tail -n+2 | cut -f1 | sort | uniq > segment_cnv.txt cat ${sample}.segment_cnv.txt | tail -n+2 | cut -f1 | sort | uniq > segment_cnv.txt
touch failed_genes.txt touch failed_genes.txt
# for gene in `cat ${sample}.trusted_genes.txt` # for gene in `cat ${sample}.trusted_genes.txt`
# do # do
# cnvkit.py scatter ${sample}.call.cnr -s ${sample}.call.cns -g $gene -o ./gainloss/${sample}.$gene.scatter.pdf || echo $gene >> failed_genes.txt
# cnvkit.py scatter ${sample}.cnr -s ${sample}.call.cns -g $gene -o ./gainloss/${sample}.$gene.scatter.pdf || echo $gene >> failed_genes.txt
# done # done
>>> >>>
File cnr = "${sample}.cnr" File cnr = "${sample}.cnr"
File cns = "${sample}.cns" File cns = "${sample}.cns"
File stats = "${sample}.stats" File stats = "${sample}.stats"
File call_cnr = "${sample}.call.cnr"
File call_cnr = "${sample}.cnr"
File call_cns = "${sample}.call.cns" File call_cns = "${sample}.call.cns"
File ratio_cnv = "${sample}.ratio_cnv.txt" File ratio_cnv = "${sample}.ratio_cnv.txt"
File segment_cnv = "${sample}.segment_cnv.txt" File segment_cnv = "${sample}.segment_cnv.txt"

Loading…
Cancel
Save