소스 검색

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…
취소
저장