瀏覽代碼

multiple pos at the same time

master
LUYAO REN 4 年之前
父節點
當前提交
cb638de638
共有 3 個檔案被更改,包括 11 行新增12 行删除
  1. +2
    -2
      inputs
  2. +6
    -8
      tasks/getBam.wdl
  3. +3
    -2
      workflow.wdl

+ 2
- 2
inputs 查看文件

@@ -4,6 +4,6 @@
"{{ project_name }}.docker": "registry-vpc.cn-shanghai.aliyuncs.com/pgx-docker-registry/samtools:v1.3.1",
"{{ project_name }}.cluster_config": "OnDemand bcs.a2.large img-ubuntu-vpc",
"{{ project_name }}.bam": "{{ bam }}",
"{{ project_name }}.region": "{{ region }}",
"{{ project_name }}.pos": "{{ pos_list.split(";") | tojson }}",
"{{ project_name }}.sample": "{{ sample }}"
}
}

+ 6
- 8
tasks/getBam.wdl 查看文件

@@ -2,17 +2,14 @@ task getBam {
File bam
File bam_idx
String sample
File region
File pos
String docker
String cluster_config
String disk_size
command <<<
cat ${region} | while read a
do
/opt/conda/bin/samtools view -b ${bam} "$a" > $a.${sample}.bam
/opt/conda/bin/samtools index $a.${sample}.bam
done
/opt/conda/bin/samtools view ${bam} -H ${sep=" " pos} | /opt/conda/bin/samtools view -bS - | /opt/conda/bin/samtools sort > ${sample}.bam
/opt/conda/bin/samtools index ${sample}.bam
>>>

runtime {
@@ -22,7 +19,8 @@ task getBam {
dataDisk: "cloud_ssd " + disk_size + " /cromwell_root/"
}
output {
Array[File] region_bam = glob("*.bam")
Array[File] region_bai = glob("*.bam.bai")
File sub_bam = "${sample}.bam"
File sub_bai = "${sample}.bam.bai"
}
}


+ 3
- 2
workflow.wdl 查看文件

@@ -2,9 +2,10 @@ import "./tasks/getBam.wdl" as getBam


workflow {{ project_name }} {
File region
File bam
File bam_idx
Array[String] pos
String sample
String docker
String cluster_config
@@ -15,7 +16,7 @@ workflow {{ project_name }} {
bam=bam,
bam_idx=bam_idx,
sample=sample,
region=region,
pos=pos,
docker=docker,
cluster_config=cluster_config,
disk_size=disk_size

Loading…
取消
儲存