瀏覽代碼

first commit

master
biolcl 4 年之前
當前提交
cae3be9187
共有 5 個檔案被更改,包括 118 行新增0 行删除
  1. +0
    -0
      README.md
  2. +7
    -0
      defaults
  3. +9
    -0
      inputs
  4. +80
    -0
      tasks/pindel.wdl
  5. +22
    -0
      workflow.wdl

+ 0
- 0
README.md 查看文件


+ 7
- 0
defaults 查看文件

@@ -0,0 +1,7 @@
{
"reference":"oss://pgx-reference-data/reference/pindel/GRCh38.d1.vd1.fa",
"reference_fai":"oss://pgx-reference-data/reference/pindel/GRCh38.d1.vd1.fa.fai"
"pindel_docker":"registry.cn-shanghai.aliyuncs.com/pgx-docker-registry/pindel:0.2.5b9_3",
"pindel_cluster":"OnDemand bcs.a2.3xlarge img-ubuntu-vpc",
"disk_size":"200"
}

+ 9
- 0
inputs 查看文件

@@ -0,0 +1,9 @@
{
"{{ project_name }}.sample_id": "{{ sample_id }}",
"{{ project_name }}.bam": "{{ bam }}",
"{{ project_name }}.reference": "{{ reference }}",
"{{ project_name }}.reference_fai": "{{ reference_fai }}",
"{{ project_name }}.pindel_docker": "{{ pindel_docker }}",
"{{ project_name }}.pindel_cluster": "{{ pindel_cluster }}",
"{{ project_name }}.disk_size": "{{ disk_size }
}

+ 80
- 0
tasks/pindel.wdl 查看文件

@@ -0,0 +1,80 @@
task pindel{
String sample_id
File bam
File reference
File reference_fai

String docker
String cluster
String disk_size


command <<<
set -o pipefail
set -e

mkdir ./pindel_result/
mkdir ./input

cp ${bam} ./input

bam_file_name=`echo ${bam}|awk -F "/" '{print $NF}'`
samtools index -@ 4 ./input/$bam_file_name
java "-Xmx16G" -jar /software/picard/picard.jar CollectInsertSizeMetrics \
-H ./pindel_result/${sample_id}_picard.pdf \
-I ./input/$bam_file_name \
-O ./pindel_result/${sample_id}_picard.txt

mean_insert_size=`cat pindel_result/${sample_id}_picard.txt|sed -n '8p'|cut -f 6|cut -d . -f 1`
bam_file_name=`echo ${bam}|awk -F "/" '{print $NF}'`

echo -e "./input/$bam_file_name\t$mean_insert_size\t${sample_id}" > ${sample_id}_config.txt

pindel -i ${sample_id}_config.txt \
-f ${reference} \
-o ./pindel_result/${sample_id} \
-c all \
-T 4 \
-x 4 \
-l \
-B 0 \
-M 3 \
-J /software/picard/hg38_ucsc_centromere.bed

grep "ChrID" pindel_result/${sample_id}_SI > pindel_result/${sample_id}_all_indel
grep "ChrID" pindel_result/${sample_id}_D >> pindel_result/${sample_id}_all_indel

awk -v chrID="chr1" '$8==chrID {print}' pindel_result/${sample_id}_all_indel > pindel_result/${sample_id}_indel
for i in `seq 2 22` X Y M
do
awk -v chrID=chr$i '$8==chrID {print}' pindel_result/${sample_id}_all_indel >> pindel_result/${sample_id}_indel
done

pindel2vcf -r ${reference} \
-R GRCh38.d1.vd1 \
-d GDC \
-p pindel_result/${sample_id}_indel \
-v pindel_result/${sample_id}.pindel.indel.vcf


>>>
runtime {
docker : docker
cluster : cluster
systemDisk: "cloud_ssd 40"
dataDisk: "cloud_ssd " + disk_size + " /cromwell_root/
}

output {
Array[File] pindel_result=glob("./pindel_result/${sample_id}*")
}

}



+ 22
- 0
workflow.wdl 查看文件

@@ -0,0 +1,22 @@
import "./tasks/pindel.wdl" as pindel

workflow run_pindel {
String sample_id
File bam
File reference
File reference_fai

String pindel_docker

call pindel.pindel as pindel {
input:
sample_id=sample_id,
bam=bam,
reference=reference,
reference_fai=reference_fai,
docker=pindel_docker
}


}


Loading…
取消
儲存