Germline & Somatic short variant discovery (SNVs + Indels) for WGS & WES.
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. task pindel {
  2. String sample_id
  3. File bam
  4. File bam_index
  5. File ref_dir
  6. String fasta
  7. String docker
  8. String cluster
  9. String disk_size
  10. command <<<
  11. set -o pipefail
  12. set -e
  13. mkdir ./pindel_result/
  14. mkdir ./input
  15. cp ${bam} ./input
  16. bam_file_name=`echo ${bam}|awk -F "/" '{print $NF}'`
  17. samtools index -@ 4 ./input/$bam_file_name
  18. java "-Xmx16G" -jar /software/picard/picard.jar CollectInsertSizeMetrics \
  19. -H ./pindel_result/${sample_id}_picard.pdf \
  20. -I ./input/$bam_file_name \
  21. -O ./pindel_result/${sample_id}_picard.txt
  22. mean_insert_size=`cat pindel_result/${sample_id}_picard.txt|sed -n '8p'|cut -f 6|cut -d . -f 1`
  23. bam_file_name=`echo ${bam}|awk -F "/" '{print $NF}'`
  24. echo -e "./input/$bam_file_name\t$mean_insert_size\t${sample_id}" > ${sample_id}_config.txt
  25. pindel -i ${sample_id}_config.txt \
  26. -f $${ref_dir}/${fasta} \
  27. -o ./pindel_result/${sample_id} \
  28. -c all \
  29. -T 4 \
  30. -x 4 \
  31. -l \
  32. -B 0 \
  33. -M 3 \
  34. -J /software/picard/hg38_ucsc_centromere.bed
  35. grep "ChrID" pindel_result/${sample_id}_SI > pindel_result/${sample_id}_all_indel
  36. grep "ChrID" pindel_result/${sample_id}_D >> pindel_result/${sample_id}_all_indel
  37. awk -v chrID="chr1" '$8==chrID {print}' pindel_result/${sample_id}_all_indel > pindel_result/${sample_id}_indel
  38. for i in `seq 2 22` X Y M
  39. do
  40. awk -v chrID=chr$i '$8==chrID {print}' pindel_result/${sample_id}_all_indel >> pindel_result/${sample_id}_indel
  41. done
  42. pindel2vcf -r ${ref_dir}/${fasta} \
  43. -R GRCh38.d1.vd1 \
  44. -d GDC \
  45. -p pindel_result/${sample_id}_indel \
  46. -v pindel_result/${sample_id}.pindel.indel.vcf
  47. >>>
  48. runtime {
  49. docker: docker
  50. cluster: cluster
  51. systemDisk: "cloud_ssd 40"
  52. dataDisk: "cloud_ssd " + disk_size + " /cromwell_root/"
  53. }
  54. output {
  55. Array[File] pindel_result = glob("./pindel_result/${sample_id}*")
  56. }
  57. }