基因组学的nextflow流水线汇编程序。选择你的模块。把他们集合起来。运行管道。
assemblerflow的Python项目详细描述
汇编流:whale2::包:
nextflow基因组学流水线汇编程序。 选择你的模块。把他们集合起来。运行管道。
前提
建立管道
如果建立自己的基因组学管道简单到:
assemblerflow.py build -t "trimmomatic fastqc skesa pilon" -o my_pipeline.nf
看起来很简单对吧?如果我们可以利用 NextFlow和Docker的奇异性。 不需要安装任何管道依赖项的容器?
运行管道
nextflow run my_pipeline.nf --fastq path/to/fastq
N E X T F L O W ~ version 0.28.0
Launching `my_pipeline` [prickly_mcnulty] - revision: 041b7b793f
============================================================
M Y P I P E L I N E
============================================================
Built using assemblerflow v1.0.2
Input FastQ : 2
Input samples : 1
Reports are found in : ./reports
Results are found in : ./results
Profile : standard
Starting pipeline at Sun Apr 08 18:22:24 WEST 2018
[warm up] executor > local
[7c/eb5f2f] Submitted process > integrity_coverage_1_1 (02AR0553)
(...)
[31/7d90a1] Submitted process > compile_pilon_report_1_6
Completed at: Sun Apr 08 18:43:41 WEST 2018
Duration : 21m 17s
Success : true
Exit status : 0
nextflow run my_pipeline.nf --fastq path/to/fastq
N E X T F L O W ~ version 0.28.0
Launching `my_pipeline` [prickly_mcnulty] - revision: 041b7b793f
============================================================
M Y P I P E L I N E
============================================================
Built using assemblerflow v1.0.2
Input FastQ : 2
Input samples : 1
Reports are found in : ./reports
Results are found in : ./results
Profile : standard
Starting pipeline at Sun Apr 08 18:22:24 WEST 2018
[warm up] executor > local
[7c/eb5f2f] Submitted process > integrity_coverage_1_1 (02AR0553)
(...)
[31/7d90a1] Submitted process > compile_pilon_report_1_6
Completed at: Sun Apr 08 18:43:41 WEST 2018
Duration : 21m 17s
Success : true
Exit status : 0
恭喜你!你刚刚建立并执行了自己的管道 只有两个命令!塔达:
安装
AssemblerFlow作为Bioconda包提供,它已经带来了 下一个流量:
conda install assemblerflow
集装箱发动机
使用AssemblerFlow构建的管道至少需要一个容器
要安装的引擎,位于docker
、singularity
或shifter
之间。
如果你已经安装了其中任何一个,你就可以走了。
如果没有,我们建议安装singularity,它也有一个bioconda
包装:
conda install singularity
如何使用
有关AssemblerFlow的完整用户指南,请访问阅读docs.org。 有关快速而不干净的演示,请参见下文。
快速指南
修建管道
assemblerflow附带了许多准备使用组件构建
拥有管道。遵循一些基本规则,例如一个进程的输出类型
必须与下一个进程的输入类型匹配,则完成管道的装配
使用build
模式和-t
选项:
assemblerflow build -t "trimmomatic spades abricate" -o my_pipeline.nf -n "assembly pipe"
此命令将生成运行
管道自动执行,但主管道可执行
文件将是my_pipeline.nf
。此文件将包含下一个流管道
对于基因组组装,从三聚体开始,到抗微生物结束
使用缩写进行基因注释
管道中的每个组件都有自己的一组参数,可以是
在执行管道之前或执行管道时修改。这些参数是
在每个过程的文档中描述,您可以检查选项
使用帮助
选项:
nextflow my_pipeline.nf --help
N E X T F L O W ~ version 0.28.0
Launching `my_pipeline.nf` [prickly_keller] - revision: 1b3fec5658
============================================================
A S S E M B L Y P I P E
============================================================
Built using assemblerflow v1.0.2
Usage:
nextflow run my_pipeline.nf
--fastq Path expression to paired-end fastq files. (default: fastq/*_{1,2}.*) (integrity_coverage)
--genomeSize Genome size estimate for the samples. It is used to estimate the coverage and other assembly parameters andchecks (default: 2.1) (integrity_coverage)
--minCoverage Minimum coverage for a sample to proceed. Can be set to0 to allow any coverage (default: 15) (integrity_coverage)
--adapters Path to adapters files, if any (default: None) (trimmomatic)
--trimSlidingWindow Perform sliding window trimming, cutting once the average quality within the window falls below a threshold (default: 5:20) (trimmomatic)
--trimLeading Cut bases off the start of a read, if below a threshold quality (default: 3 (trimmomatic)
--trimTrailing Cut bases of the end of a read, if below a threshold quality (default: 3) (trimmomatic)
--trimMinLength Drop the read if it is below a specified length (default: 55) (trimmomatic)
--spadesMinCoverage The minimum number of reads to consider an edge in the de Bruijn graph during the assembly (default: 2) (spades)
--spadesMinKmerCoverage Minimum contigs K-mer coverage. After assembly only keep contigs with reported k-mer coverage equal or above this value (default: 2) (spades)
--spadesKmers If 'auto' the SPAdes k-mer lengths will be determined from the maximum read length of each assembly. If 'default', SPAdes will use the default k-mer lengths. (default: auto) (spades)
--abricateDatabases Specify the databases for abricate. (abricate)
此帮助消息是根据您构建的管道动态生成的。
由于此管道以接收fastq文件作为输入的trimmomatic开头,
--fastq
是用于提供成对结束fastq文件的默认参数。
运行管道
现在我们已经建立了下一个流管道,我们准备通过
提供输入数据。默认情况下,AssemblerFlow管道将在本地运行并使用
奇点
运行每个组件的容器。这可以
以多种方式更改,但为了方便起见,AssemblerFlow已经定义
执行器
和容器
引擎的大多数配置的配置文件。
使用奇点在本地运行管道
可以使用:
# Pattern for paired-end fastq is '<sample>_1.fastq.gz <sample>_2.fastq.gz'
nextflow run my_pipeline --fastq "path/to/fastq/*_{1,2}.*"
如果您想在一个集群中运行一个带有slurm和singularity的管道,只需使用 相应的配置文件:
nextflow run my_pipeline --fastq "path/to/fastq/*_{1,2}.*" -profile slurm_sing
在管道执行期间,每个组件的结果和报告
分别连续保存到results
和reports
目录中。
为什么不直接编写下一个流管道呢?
在许多情况下,构建一个静态nextflow管道就足以实现我们的目标。 然而,当我们建立自己的管道时,我们常常感到需要增加活力 尤其是考虑到新工具的出现速度 而现有的改变。我们的生物学目标也会随着时间的推移而改变, 可能需要不同的管道来回答不同的问题。汇编流生成 这非常容易,因为有一套预先制作好并准备好使用的组件可以 自由组装。
例如,改变基因组组装管道中的组装软件 简单到:
# Use spades
trimmomatic spades pilon
# Use skesa
trimmomatic skesa pilon
0
1
因为nextflow处理大型数据集的并行性很好,简单的管道 两个组件中的一个组件也可用于构建:
assemblerflow.py build -t "trimmomatic fastqc skesa pilon" -o my_pipeline.nf
2
随着现有组件数量的增加,您可以自由地构建管道。
开发人员指南
添加新组件
是否有要包含的缺少组件?我们会喜欢的 扩大!你可以在我们的 问题跟踪程序
如果你想成为团队的一员,你也可以贡献代码。各组成部分 在AssemblerFlow中可以独立添加而不必担心 代码库的其余部分。你只需要掌握一些python的知识 下一个。查看开发人员文档以了解操作指南