@@ -0,0 +1,40 @@ | |||
# Extract BAM for IGV | |||
> Author: Ren Luyao | |||
> | |||
> E-mail:18110700050@fudan.edu.cn | |||
> | |||
> Git: http://choppy.3steps.cn/renluyao/IGV_get_bam.git | |||
> | |||
> Last Updates: 2020/0705 | |||
## 安装指南 | |||
``` | |||
# 激活choppy环境 | |||
source activate choppy | |||
# 安装app | |||
choppy install renluyao/IGV_get_bam | |||
``` | |||
## App概述 | |||
为了IGV验证突变,截取其中一段bam文件 | |||
## 流程与参数 | |||
```bash | |||
samtools view -b ${bam} "${region}" > ${region}.${sample}.bam | |||
samtools index ${region}.${sample}.bam | |||
``` | |||
samples文件中的region格式如下: | |||
```bash | |||
#chromo:start-end | |||
chr6:73900000-73920000 | |||
``` | |||
## App输出文件 | |||
输出结果为截取的bam文件和相应的bam索引文件 |
@@ -0,0 +1,9 @@ | |||
{ | |||
"{{ project_name }}.bam_idx": "{{ bam_idx }}", | |||
"{{ project_name }}.disk_size": "100", | |||
"{{ 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 }}.bed": {{ bed }}, | |||
"{{ project_name }}.sample": "{{ sample }}" | |||
} |
@@ -0,0 +1,24 @@ | |||
task getBam { | |||
File bam | |||
File bam_idx | |||
String sample | |||
File bed | |||
String docker | |||
String cluster_config | |||
String disk_size | |||
command <<< | |||
/opt/conda/bin/samtools view -bS -L ${bed} ${bam} > ${sample}.bam | |||
>>> | |||
runtime { | |||
docker:docker | |||
cluster: cluster_config | |||
systemDisk: "cloud_ssd 40" | |||
dataDisk: "cloud_ssd " + disk_size + " /cromwell_root/" | |||
} | |||
output { | |||
File sub_bam = "${sample}.bam" | |||
} | |||
} | |||
@@ -0,0 +1,25 @@ | |||
import "./tasks/getBam.wdl" as getBam | |||
workflow {{ project_name }} { | |||
File bam | |||
File bam_idx | |||
File bed | |||
String sample | |||
String docker | |||
String cluster_config | |||
String disk_size | |||
call getBam.getBam as getBam { | |||
input: | |||
bam=bam, | |||
bam_idx=bam_idx, | |||
sample=sample, | |||
bed=bed, | |||
docker=docker, | |||
cluster_config=cluster_config, | |||
disk_size=disk_size | |||
} | |||
} | |||