nextflow 问题记录
-
问题1. nextflow官方仓库下载的流程,nextflow.conf里配置文件中包含:
custom_config_base = "https://raw.githubusercontent.com/nf-core/configs/${params.custom_config_version}"
等网络路径,提交流程时会访问github获取配置,会因为网络问题等待很久,建议将配置提前下载到项目里,修改nextflow.conf的所有网络请路径依赖。 -
问题2:插件下载不下来,比如nf-validation
解决:先在服务器里面用命令行运行(命令行运行时会下载需要的插件),运行以后找到~/.nextflow/plugins,然后把plugins压缩打包,并在docker中映射此路径。
同时,需要在项目中的nextflow.config文件中指定插件的版本。如下:
// Nextflow plugins plugins { id 'nf-validation@1.1.3' // Validation of pipeline parameters and creation of an input channel from a sample sheet id 'nf-prov@1.2.1' // Provenance reports for pipeline runs } -
问题3 :上传到平台的nextflow流程需要dag.html文件
解决:由于nextflow23.10版本不会生成需要的文件,需要在nextflow23.04版本下运行
nextflow run main.nf -profile test,docker -with-dag dag.html -preview得到dag.html再上传即可 -
问题4 :fastqc版本报错(在版本号之前生成了一句警告,导致报错)
解决:在项目中【modules】-【nf-core】-【fastqc】-【main.nf】中把 fastqc的版本指定。
原来的代码
cat <<-END_VERSIONS > versions.yml "${task.process}": fastqc: \$( fastqc --version | sed -e "s/FastQC v//g" ) END_VERSIONS """修改后的代码
cat <<-END_VERSIONS > versions.yml "${task.process}": fastqc: 0.12.1 END_VERSIONS """ -
问题:sarek项目中strelka步骤中会生成文件有问题
解决:在【modules】-【nf-core】-【strelka】-【germline】-【main.nf】中删除错误文件
mv strelka/results/variants/genome.*.vcf.gz ${prefix}.genome.vcf.gz mv strelka/results/variants/genome.*.vcf.gz.tbi ${prefix}.genome.vcf.gz.tbi mv strelka/results/variants/variants.vcf.gz ${prefix}.variants.vcf.gz mv strelka/results/variants/variants.vcf.gz.tbi ${prefix}.variants.vcf.gz.tbi ## 添加这行代码 rm -rf strelka/results/variants/* -
插件问题处理:nextflow默认使用https://github.com/nextflow-io/plugins/blob/main/plugins.json,替换成https://file.genostack.com/public_resource/plugins.json,
将321个插件下载到r740服务器中, 后续nextflow调试安装不需要考虑nextflow插件下载失败问题 -
问题: 四个小时限制Process exceeded running time limit (4h)
解决: 在
genostack_core/nextflow/config/nextflow.conf里面加上process { cpus = 36 memory = 256.GB time = 500.h withLabel: sc_tiny { cpus = 20 memory = 200.GB time = 500.h } withLabel: sc_small { cpus = 20 memory = 200.GB time = 500.h } withLabel: sc_medium { cpus = 20 memory = 200.GB time = 500.h } withLabel: mc_small { cpus = 20 memory = 200.GB time = 500.h } withLabel: mc_medium { cpus = 20 memory = 200.GB time = 500.h } withLabel: mc_large { cpus = 20 memory = 200.GB time = 500.h } withLabel: mc_huge { cpus = 20 memory = 200.GB time = 500.h } } -
问题:流程默认调用nextflow22版本
解决:在nextflow.config文件中添加nextflowVersion
manifest { name = 'Pacbio' author = """Andreas Wilm, Alexander Peltzer""" homePage = 'https://github.com/PacificBiosciences/HiFi-16S-workflow' description = """Simple bacterial assembly and annotation""" mainScript = 'main.nf' nextflowVersion = '!>=23.04.0' version = '2.1.0' doi = '10.5281/zenodo.2669428' }添加完即可自动调用nextflow23版本
-
问题:Pacbio HIFI 16s流程跑
qiime diversity core-metrics-phylogenetic会报错解决: qiime diversity core-metrics-phylogenetic中有一个内容会自动检测GPU,然后调用GPU,如果检测到GPU,但是调用失败则会报错。
在跑命令之前先运行
export UNIFRAC_USE_GPU=N即可使用CPU而不用GPU