|
123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- task split_gvcf_files {
- File filtered_gvcf
- String project
- String docker
- String cluster_config
- String disk_size
-
- command <<<
-
- cat ${filtered_gvcf} | grep '#CHROM' | sed s'/\t/\n/g' > name
-
- ncol=`cat name | wc -l`
-
- sed -i '1,9d' name
-
- for i in $(seq 10 $ncol); do cat ${filtered_gvcf} | cut -f1-9,$i > $i.splited.vcf; done
-
- ls *splited.vcf | sort -n | paste - name > rename
-
- cat rename | while read a b
- do
- mv $a $b.splited.vcf
- sample=$(echo $b | cut -f6 -d_)
- rep=$(echo $b | cut -f7 -d_)
- echo $sample >> quartet_sample
- echo $rep >> quartet_rep
- done
-
- python /opt/how_many_samples.py -sample quartet_sample -rep quartet_rep
-
-
- >>>
-
- runtime {
- docker:docker
- cluster: cluster_config
- systemDisk: "cloud_ssd 40"
- dataDisk: "cloud_ssd " + disk_size + " /cromwell_root/"
- }
- output {
- Array[File] splited_vcf = glob("*.splited.vcf")
- File sister_tag = "sister_tag"
- File quartet_tag = "quartet_tag"
- }
- }
|