nf-core快速开发流程
安装
pip install nf-core
Creating a new pipeline
╭─ Options ────────────────────────────────────────────────────────────────────────────────────────╮
│ --name -n TEXT The name of your new pipeline │
│ --description -d TEXT A short description of your pipeline │
│ --author -a TEXT Name of the main author(s) │
│ --version TEXT The initial version number to use │
│ --no-git Do not initialise pipeline as new git repository │
│ --force -f Overwrite output directory if it already exists │
│ --outdir -o TEXT Output directory for new pipeline (default: pipeline name) │
│ --template-yaml -t TEXT Pass a YAML file to customize the template │
│ --plain Use the standard nf-core template │
│ --help -h Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
nf-core create -n demo -d 'This is demo.' -a 'author' --plain
module
模块的本地仓库~/.config/nfcore/nf-core/modules
查看本地模块
nf-core modules --git-remote https://gitee.com/minebiome/modules.git list local
install module
nf-core modules --git-remote https://gitee.com/minebiome/modules.git install fastp
update module
nf-core modules --git-remote https://gitee.com/minebiome/modules.git update
remove module
nf-core modules --git-remote https://gitee.com/minebiome/modules.git remove fastp
自定义函数
ch_multiqc_custom_methods_description = params.multiqc_methods_description ?
file(params.multiqc_methods_description, checkIfExists: true) :
file("$projectDir/assets/methods_description_template.yml", checkIfExists: true)
methods_description = WorkflowTest.methodsDescriptionText(workflow, ch_multiqc_custom_methods_description)
ch_methods_description = Channel.value(methods_description)
WorkflowTest.methodsDescriptionText
public static String methodsDescriptionText(run_workflow, mqc_methods_yaml) {
// Convert to a named map so can be used as with familar NXF ${workflow} variable syntax in the MultiQC YML file
def meta = [:]
meta.workflow = run_workflow.toMap()
meta["manifest_map"] = run_workflow.manifest.toMap()
meta["doi_text"] = meta.manifest_map.doi ? "(doi: <a href=\'https://doi.org/${meta.manifest_map.doi}\'>${meta.manifest_map.doi}</a>)" : ""
meta["nodoi_text"] = meta.manifest_map.doi ? "": "<li>If available, make sure to update the text to include the Zenodo DOI of version of the pipeline used. </li>"
def methods_text = mqc_methods_yaml.text
def engine = new SimpleTemplateEngine()
def description_html = engine.createTemplate(methods_text).make(meta)
return description_html
}