|
- task SepSnvIndel {
- File vcf
- String sampleName
- String docker
- String cluster_config
- String disk_size
-
- command <<<
-
- cat ${vcf} | grep '#' > header
- cat ${vcf} | sed '/^#/d' | awk '$5!~/,/' > removed.body
- cat ${vcf} | sed '/^#/d' | awk '$5~/,/' > MNP.body
- cat header removed.body > ${sampleName}.MNPremoved.vcf
- cat header MNP.body > ${sampleName}.MNP.vcf
-
- rtg bgzip ${sampleName}.MNPremoved.vcf
- rtg index -f vcf ${sampleName}.MNPremoved.vcf.gz
-
- rtg vcffilter -i ${sampleName}.MNPremoved.vcf.gz -o ${sampleName}.normed.snv.vcf.gz --snps-only
-
- rtg vcffilter -i ${sampleName}.MNPremoved.vcf.gz -o ${sampleName}.normed.indel.vcf.gz --non-snps-only
-
-
- gzip -d ${sampleName}.normed.snv.vcf.gz -c > ${sampleName}.normed.snv.vcf
- gzip -d ${sampleName}.normed.indel.vcf.gz -c > ${sampleName}.normed.indel.vcf
- >>>
-
- runtime {
- docker:docker
- cluster: cluster_config
- systemDisk: "cloud_ssd 40"
- dataDisk: "cloud_ssd " + disk_size + " /cromwell_root/"
- }
-
- output {
- File MNP="${sampleName}.MNP.vcf"
- File nist_snv_gz="${sampleName}.normed.snv.vcf.gz"
- File nist_snv_gz_idx="${sampleName}.normed.snv.vcf.gz.tbi"
- File nist_indel_gz="${sampleName}.normed.indel.vcf.gz"
- File nist_indel_gz_idx="${sampleName}.normed.indel.vcf.gz.tbi"
- File nist_snv="${sampleName}.normed.snv.vcf"
- File nist_indel="${sampleName}.normed.indel.vcf"
- }
- }
|