我制作了我的管道,我想在每个过程之前打印一份关于所执行的内容的小描述。
我基本上试着在脚本中的每个进程之前添加一个“打印”。当我运行管道时,它首先打印出所有的描述,然后进程开始执行。
我所做的:
// Trimming
println 'Trimming reads with AlienTrimmer'
process Trimming {
...
}
// Convert to fasta
println 'Convert files from fastq to fasta'
process Fastq2Fasta {
...
}
// Concatenate files
println 'Combine all fasta files'
reads_fasta.collectFile()
// Dereplication
if (params.prefixdrep) println 'Dereplication using prefixes'
else println 'Dereplication using full reads lentgh'
process Dereplication {
...
}我得到的是:
* Trimming reads with AlienTrimmer
* Convert files from fastq to fasta
* Combine all fasta files
* Dereplication using full reads lentgh
[74/ee63b8] Cached process > Trimming (MOBIO2-16S)
[d7/9b16c3] Cached process > Trimming (IHMS1-16S)
[e8/821f96] Cached process > Trimming (IHMS2-16S)
[2d/bfe805] Cached process > Trimming (MOBIO1-16S)
[a0/6702b3] Cached process > Fastq2Fasta (IHMS1-16S)
[c0/044dcd] Cached process > Fastq2Fasta (MOBIO2-16S)
[84/344d52] Cached process > Fastq2Fasta (MOBIO1-16S)
[7f/20caee] Cached process > Fastq2Fasta (IHMS2-16S)
[aa/ea78e8] Cached process > Dereplication (mycobiote_16S)我想要的:
* Trimming reads with AlienTrimmer
[74/ee63b8] Cached process > Trimming (MOBIO2-16S)
[d7/9b16c3] Cached process > Trimming (IHMS1-16S)
[e8/821f96] Cached process > Trimming (IHMS2-16S)
[2d/bfe805] Cached process > Trimming (MOBIO1-16S)
* Convert files from fastq to fasta
[a0/6702b3] Cached process > Fastq2Fasta (IHMS1-16S)
[c0/044dcd] Cached process > Fastq2Fasta (MOBIO2-16S)
[84/344d52] Cached process > Fastq2Fasta (MOBIO1-16S)
[7f/20caee] Cached process > Fastq2Fasta (IHMS2-16S)
* Combine all fasta files
* Dereplication using full reads lentgh
[aa/ea78e8] Cached process > Dereplication (mycobiote_16S)发布于 2019-01-07 12:37:56
快回答这是不可能的。如果您真的需要,可以在脚本部分使用print,例如:
process foo {
script:
println 'Hello'
"""
your_command_here
"""
}但是,您还需要编写代码才能只在第一次编写该消息。
https://stackoverflow.com/questions/54074033
复制相似问题