瀏覽代碼

sort vcf

master
LUYAO REN 3 年之前
父節點
當前提交
bd092a2ed1
共有 1 個檔案被更改,包括 16 行新增12 行删除
  1. +16
    -12
      tasks/benchmark.wdl

+ 16
- 12
tasks/benchmark.wdl 查看文件

@@ -25,31 +25,35 @@ task benchmark {
echo -e "#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO\tFORMAT\tLCL7" > LCL7_name
echo -e "#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO\tFORMAT\tLCL8" > LCL8_name

cat ${vcf} | grep '#' > header_original
cat ${vcf} | grep -v '#' | sort -k1,1 -k2,2n > body_sorted
cat header_original body_sorted > sorted.vcf

if [[ ${sample} =~ "LCL5" ]];then
/opt/hap.py/bin/hap.py /cromwell_root/tmp/reference_datasets_v202103/LCL5.high.confidence.calls.vcf ${vcf} -f ${filtered_bed} --threads $nt -o ${sample} -r ${ref_dir}/${fasta}
cat ${vcf} | grep '##' > header
cat ${vcf} | grep -v '#' > body
/opt/hap.py/bin/hap.py /cromwell_root/tmp/reference_datasets_v202103/LCL5.high.confidence.calls.vcf sorted.vcf -f ${filtered_bed} --threads $nt -o ${sample} -r ${ref_dir}/${fasta}
cat sorted.vcf | grep '##' > header
cat sorted.vcf | grep -v '#' > body
cat header LCL5_name body > LCL5.vcf
/opt/rtg-tools/dist/rtg-tools-3.10.1-4d58ead/rtg bgzip LCL5.vcf -c > ${sample}.reformed.vcf.gz
/opt/rtg-tools/dist/rtg-tools-3.10.1-4d58ead/rtg index -f vcf ${sample}.reformed.vcf.gz
elif [[ ${sample} =~ "LCL6" ]]; then
/opt/hap.py/bin/hap.py /cromwell_root/tmp/reference_datasets_v202103/LCL6.high.confidence.calls.vcf ${vcf} -f ${filtered_bed} --threads $nt -o ${sample} -r ${ref_dir}/${fasta}
cat ${vcf} | grep '##' > header
cat ${vcf} | grep -v '#' > body
/opt/hap.py/bin/hap.py /cromwell_root/tmp/reference_datasets_v202103/LCL6.high.confidence.calls.vcf sorted.vcf -f ${filtered_bed} --threads $nt -o ${sample} -r ${ref_dir}/${fasta}
cat sorted.vcf | grep '##' > header
cat sorted.vcf | grep -v '#' > body
cat header LCL6_name body > LCL6.vcf
/opt/rtg-tools/dist/rtg-tools-3.10.1-4d58ead/rtg bgzip LCL6.vcf -c > ${sample}.reformed.vcf.gz
/opt/rtg-tools/dist/rtg-tools-3.10.1-4d58ead/rtg index -f vcf ${sample}.reformed.vcf.gz
elif [[ ${sample} =~ "LCL7" ]]; then
/opt/hap.py/bin/hap.py /cromwell_root/tmp/reference_datasets_v202103/LCL7.high.confidence.calls.vcf ${vcf} -f ${filtered_bed} --threads $nt -o ${sample} -r ${ref_dir}/${fasta}
cat ${vcf} | grep '##' > header
cat ${vcf} | grep -v '#' > body
/opt/hap.py/bin/hap.py /cromwell_root/tmp/reference_datasets_v202103/LCL7.high.confidence.calls.vcf sorted.vcf -f ${filtered_bed} --threads $nt -o ${sample} -r ${ref_dir}/${fasta}
cat sorted.vcf | grep '##' > header
cat sorted.vcf | grep -v '#' > body
cat header LCL7_name body > LCL7.vcf
/opt/rtg-tools/dist/rtg-tools-3.10.1-4d58ead/rtg bgzip LCL7.vcf -c > ${sample}.reformed.vcf.gz
/opt/rtg-tools/dist/rtg-tools-3.10.1-4d58ead/rtg index -f vcf ${sample}.reformed.vcf.gz
elif [[ ${sample} =~ "LCL8" ]]; then
/opt/hap.py/bin/hap.py /cromwell_root/tmp/reference_datasets_v202103/LCL8.high.confidence.calls.vcf ${vcf} -f ${filtered_bed} --threads $nt -o ${sample} -r ${ref_dir}/${fasta}
cat ${vcf} | grep '##' > header
cat ${vcf} | grep -v '#' > body
/opt/hap.py/bin/hap.py /cromwell_root/tmp/reference_datasets_v202103/LCL8.high.confidence.calls.vcf sorted.vcf -f ${filtered_bed} --threads $nt -o ${sample} -r ${ref_dir}/${fasta}
cat sorted.vcf | grep '##' > header
cat sorted.vcf | grep -v '#' > body
cat header LCL8_name body > LCL8.vcf
/opt/rtg-tools/dist/rtg-tools-3.10.1-4d58ead/rtg bgzip LCL8.vcf -c > ${sample}.reformed.vcf.gz
/opt/rtg-tools/dist/rtg-tools-3.10.1-4d58ead/rtg index -f vcf ${sample}.reformed.vcf.gz

Loading…
取消
儲存