GATK 软件分析流程由阿里云和 Broad Institute 合作提供。Broad Institute 提供的 GATK 流程最佳实践用 工作流定义语言(WDL) 编写,通过批量计算集成的 Cromwell 工作流引擎解析执行。用户将为作业运行时实际消耗的计算和存储资源付费,不需要支付资源之外的附加费用。
Broad Institute GATK 网站和论坛为 GATK 工具和 WDL 提供了更完整的背景信息,文档和支持。
如果需要执行用 WDL 编写的通用工作流程,请参考 cromwell 工作流引擎和 WDL 支持的 APP 。
要在批量计算上运行 GATK,输入、输出文件都需要保存在 OSS。所以,需要先开通 OSS 并创建好 Bucket。
注意:创建 Bucket 的区域,需要和运行批量计算的 GATK 区域一致。
pip install batchcompute-cli
安装完成后,还需要 配置 。
注意:当前最佳实践中使用的 GATK 相关软件版本信息如下:
- GATK: 4.0.0.0
- picard: 2.13.2
- genomes-in-the-cloud: 2.3.0-1501082129
本示例中,运行 Broad Institute 提供的 GATK4 版本全基因分析流程,该流程分为两步:
在配置好 bcs 工具后,执行如下命令:
bcs gen ./demo -t gatk
cd demo/gatk4-data-processing
sh main.sh # 运行gatk4-data-processing 流程
cd ../gatk4-germline-snps-indels
sh main.sh # 运行gatk4-germline-snps-indels 流程
这样您就在批量计算上运行了以上两个 GATK4 流程。
执行如下命令生成示例:
bcs gen ./demo -t gatk
它将生成以下目录结构:
demo
|-- Readme.md
|-- gatk4-data-processing
| |-- main.sh
| |-- src
| |-- LICENSE
| |-- README.md
| |-- generic.batchcompute-papi.options.json
| |-- processing-for-variant-discovery-gatk4.hg38.wgs.inputs.json
| |-- processing-for-variant-discovery-gatk4.hg38.wgs.inputs.30x.json
| |-- processing-for-variant-discovery-gatk4.wdl
|-- gatk4-germline-snps-indels
|-- main.sh
|-- src
|-- LICENSE
|-- README.md
|-- generic.batchcompute-papi.options.json
|-- haplotypecaller-gvcf-gatk4.hg38.wgs.inputs.json
|-- haplotypecaller-gvcf-gatk4.hg38.wgs.inputs.30x.json
|-- haplotypecaller-gvcf-gatk4.wdl
进入 demo/gatk4-data-processing 目录,运行 main.sh,该文件内容如下:
#!/bin/bash
# bcs asub cromwell -h for more
bcs asub cromwell gatk-job\
--config ClassicNetwork=false\
--input_from_file_WDL src/processing-for-variant-discovery-gatk4.wdl\
--input_from_file_WORKFLOW_INPUTS src/processing-for-variant-discovery-gatk4.hg38.wgs.inputs.json\
--input_from_file_WORKFLOW_OPTIONS src/generic.batchcompute-papi.options.json\
--input_WORKING_DIR oss://demo-bucket/cli/gatk4_worker_dir/\
--output_OUTPUTS_DIR oss://demo-bucket/cli/gatk4_outputs/\
-t ecs.sn1.large -d cloud_efficiency
其中,部分参数描述为:
其他参数,请参考 bcs asub -h
命令。
如果希望使用此流程来运行自己的数据,需要修改 src/processing-for-variant-discovery-gatk4.hg38.wgs.inputs.json 文件中的 PreProcessingForVariantDiscovery_GATK4.flowcell_unmapped_bams_list 参数,指定存储在 OSS 上的 ubam 文件。
注意:该示例中的流程输入文件不是 FASTQ 格式,而是 unaligned BAM 文件。
该流程的运行与 gatk4-data-processing 流程类似,参考上述章节。
在提交作业后,如果看到以下信息,说明提交成功
Job created: job-0000000059DC658400006822000001E3
job-0000000059DC658400006822000001E3 即是当次提交作业的 ID。
查看作业状态:
bcs j # 获取作业列表
bcs j job-0000000059DC658400006822000001E3 # 查看作业详情
查看作业日志:
bcs log job-0000000059DC658400006822000001E3
查看 OSS 空间中的输出数据:
bcs o ls oss://demo-bucket/cli/gatk4_worker_dir/
查看 metadata 文件:
bcs o ls oss://demo-bucket/cli/gatk4_outputs/
执行上述步骤生成本示例时,会同时生成一个适用 30X 全基因组数据分析的配置:
为分析 30X 样本,需要将 processing-for-variant-discovery-gatk4.hg38.wgs.inputs.30x.json
文件中的PreProcessingForVariantDiscovery_GATK4.flowcell_unmapped_bams_lis
t 参数改为OSS 文件路径,该文件包括了需要分析的 30X 样本在 OSS 上的路径列表。
注意,30X 数据样本,格式为 unaligned BAM 文件。
找到 gatk4-data-processing
流程的 main.sh
文件,将其中的 --input_from_file_WORKFLOW_INPUTS
参数,修改为 src/processing-for-variant-discovery-gatk4.hg38.wgs.inputs.30x.json
,加上 --timeout 172800
参数,并提交作业。
haplotypecaller-gvcf-gatk4.hg38.wgs.inputs.30x.json
中的 HaplotypeCallerGvcf_GATK4.input_bam
参数修改为gatk4-data-processing
流程输出的 bam 文件路径。HaplotypeCallerGvcf_GATK4.input_bam_index
参数修改为相应的索引文件路径。找到 gatk4-germline-snps-indels
流程的 main.sh
,将其中的 --input_from_file_WORKFLOW_INPUTS
参数修改为 src/haplotypecaller-gvcf-gatk4.hg38.wgs.inputs.30x.json
,加上 --timeout 172800
参数,并最后提交作业。
如遇到 QuotaExhausted 错误,请通过工单调整 Quota。
近日,阿里云物联网操作系统AliOS Things时隔一年,新版本AliOS Things 3.3.0正...
代码中的很多操作都是Eager的,比如在发生方法调用的时候,参数会立即被求值。总...
【51CTO.com快译】数十年来,PHP一直是全球最受欢迎的编程语言之一。PHP开发具有...
引子 作为一名程序员,设计程序架构、优化算法已经是一件很头疼的事了,然而,还...
问题描述 网站的访问与云服务器的网络配置、端口通信、防火墙配置、安全组配置等...
PactGlobal首席执行官MarkSeddon讨论了边缘计算如何补充云以解决延迟,安全性和...
如果你是一个数据科学的求职者,那么你一定想知道在你的简历上应该写些什么技能...
购买须知 在购买腾讯云 GPU 云服务器前,请确保已了解 腾讯云 GPU 云服务器,且...
JuiceFS 是一个云原生的企业级分布式文件系统,广泛应用于大数据、企业级数据共...
虚拟化技术的分类主要有服务器虚拟化、存储虚拟化、网络虚拟化、应用虚拟化。 服...