#突变的数目统计 | |||||
> Author: Run Luyao | |||||
> | |||||
> E-mail:18110700050@fudan.edu.cn | |||||
> | |||||
> Git: http://choppy.3steps.cn/renluyao/VCFstat.git | |||||
> | |||||
> Last Updates: 2020/03/02 | |||||
## 安装指南 | |||||
``` | |||||
# 激活choppy环境 | |||||
source activate choppy | |||||
# 安装app | |||||
choppy install renluyao/VCFstat | |||||
``` | |||||
## App概述 | |||||
用于统计VCF的突变数目等基本情况。用的软件是RTGtools vcfstats | |||||
## 流程与参数 | |||||
## App输入变量与输入文件 | |||||
## App输出文件 | |||||
## 结果展示与解读 | |||||
## CHANGELOG | |||||
## FAQ |
{ | |||||
"{{ project_name }}.vcfstat.docker": "registry-vpc.cn-shanghai.aliyuncs.com/pgx-docker-registry/rtg-hap:latest", | |||||
"{{ project_name }}.vcfstat.disk_size": "100", | |||||
"{{ project_name }}.inputSamplesFile": "{{ inputSamplesFile }}", | |||||
"{{ project_name }}.mergeNum.docker": "registry.cn-shanghai.aliyuncs.com/pgx-docker-registry/gatk:v2019.01", | |||||
"{{ project_name }}.mergeNum.disk_size": "100", | |||||
"{{ project_name }}.mergeNum.cluster_config": "OnDemand bcs.a2.large img-ubuntu-vpc", | |||||
"{{ project_name }}.vcfstat.cluster_config": "OnDemand bcs.a2.large img-ubuntu-vpc" | |||||
} |
task mergeNum { | |||||
Array[File] vcfnumber | |||||
String docker | |||||
String cluster_config | |||||
String disk_size | |||||
command <<< | |||||
set -o pipefail | |||||
set -e | |||||
for i in ${sep=" " vcfnumber} | |||||
do | |||||
cat $i | cut -d':' -f2 | tr '\n' '\t' | sed s'/\t$/\n/g' >> vcfstats | |||||
done | |||||
sed '1i\File\tFailed Filters\tPassed Filters\tSNPs\tMNPs\tInsertions\tDeletions\tIndels\tSame as reference\tSNP Transitions/Transversions\tTotal Het/Hom ratio\tSNP Het/Hom ratio\tMNP Het/Hom ratio\tInsertion Het/Hom ratio\tDeletion Het/Hom ratio\tIndel Het/Hom ratio\tInsertion/Deletion ratio\tIndel/SNP+MNP ratio' vcfstats > vcfstats.txt | |||||
>>> | |||||
runtime { | |||||
docker:docker | |||||
cluster:cluster_config | |||||
systemDisk:"cloud_ssd 40" | |||||
dataDisk:"cloud_ssd " + disk_size + " /cromwell_root/" | |||||
} | |||||
output { | |||||
File vcfstat="vcfstats.txt" | |||||
} | |||||
} |
task vcfstat { | |||||
File vcf | |||||
String sampleName | |||||
String docker | |||||
String cluster_config | |||||
String disk_size | |||||
command <<< | |||||
set -o pipefail | |||||
set -e | |||||
/opt/rtg-tools/dist/rtg-tools-3.10.1-4d58ead/rtg bgzip ${vcf} -c > ${sampleName}.vcf.gz | |||||
/opt/rtg-tools/dist/rtg-tools-3.10.1-4d58ead/rtg index -f vcf ${sampleName}.vcf.gz | |||||
/opt/rtg-tools/dist/rtg-tools-3.10.1-4d58ead/rtg vcfstats ${sampleName}.vcf.gz > ${sampleName}_onestats.txt | |||||
>>> | |||||
runtime { | |||||
docker:docker | |||||
cluster:cluster_config | |||||
systemDisk:"cloud_ssd 40" | |||||
dataDisk:"cloud_ssd " + disk_size + " /cromwell_root/" | |||||
} | |||||
output { | |||||
File vcfnumber="${sampleName}_onestats.txt" | |||||
} | |||||
} |
import "./tasks/vcfstat.wdl" as vcfstat | |||||
import "./tasks/mergeNum.wdl" as mergeNum | |||||
workflow {{ project_name }} { | |||||
File inputSamplesFile | |||||
Array[Array[File]] inputSamples = read_tsv(inputSamplesFile) | |||||
scatter (sample in inputSamples) { | |||||
call vcfstat.vcfstat as vcfstat { | |||||
input: | |||||
vcf=sample[1], | |||||
sampleName=sample[0] | |||||
} | |||||
} | |||||
call mergeNum.mergeNum as mergeNum { | |||||
input: | |||||
vcfnumber=vcfstat.vcfnumber | |||||
} | |||||
} |