Nextflow 错误:进程中缺少输出文件

问题描述 投票:0回答:1

我的脚本遇到了另一个奇怪的问题,想知道是否可以获得更多帮助。 您好,我正在尝试使用多种工具和以下脚本进行基因组组装:

  /*
 * Define the default parameters
 */ 

params.podsF = '/home/staukobong/pod5/'
pods_ch = Channel.fromPath(params.podsF, checkIfExists: true)


/*
 * Basecalling PORE5 files using Dorado
 */


process BASECALL {

    module 'dorado'
    debug true

    input:
    path sample_id

    output:
    path 'sample_id.bam' , emit: bamfiles_complete

    script:
    """
    dorado basecaller /home/staukobong/[email protected] $sample_id > sample_id.bam
    """
}


/*
 * Convert fastq files to bam files and concatenate the files
 */


process CONVERT {

    debug true

    input:
    path sample_id

    output:
    path 'sample_id.fastq', emit: fastq_files

    script:
    """
    samtools bam2fq $sample_id > sample_id.fastq
    """
}


/*
 * Check quality of sequencing reads using FASTQC
 */

process FASTQC1 {

    module 'FastQC'
    debug true

    input:
    path sample_id

    output:
    path 'sample_id_fastqc.html', emit: fastqc_files

    script:
    """
    fastqc $sample_id -t 4
    """

}


/*
 * Trim fastq files after base calling using Nanofilt
 */

process TRIM {

    module 'nanofilt'
    debug true

    input:
    path sample_id

    output:
    path 'sample_id.trimmed.fastq', emit: trimmed_fastq

    script:
    """
    NanoFilt -l 200 -q 20 --headcrop 50 --tailcrop 6000 $sample_id > sample_id.trimmed.fastq
    """
}


/*
 * Check quality of sequencing reads using FASTQC
 */

process FASTQC2 {

    module 'FastQC'
    debug true

    input:
    path sample_id2

    output:
    path 'sample_id2_fastqc.html', emit: fastqc_files2

    script:
    """
    fastqc $sample_id2 -t 4
    """

}


/*
 * Assemble the reads using FLYE
 */

process ASSEMBLY {

    module 'flye/2.9'
    debug true

    input:
    path sample_id

    output:
    path '*', emit: Assembly_files

    script:
    """
    flye --nano-raw $sample_id -i 3 -t 4
    """

}

/*
 * Mapping the reads using minimap2
 */

process MAPPINGS {

    module 'minimap2'
    debug true

    input:
    path sample_id

    output:
    path 'sample_id.sam', emit: Mapped_files

    script:
    """
    minimap2 -a -t 4 ${sample_id}.trimmed.fastq ${sample_id}.fasta > sample_id.sam
    """

}


/*
========================================================================================
                                Create default workflow
========================================================================================
*/

workflow {
    BASECALL(pods_ch)
    CONVERT(BASECALL.out.bamfiles_complete)
    FASTQC1(CONVERT.out.fastq_files)
    TRIM(CONVERT.out.fastq_files)
    FASTQC2(TRIM.out.trimmed_fastq)
    ASSEMBLY(TRIM.out.trimmed_fastq)
    MAPPINGS(TRIM.out.trimmed_fastq.combine(ASSEMBLY.out.Assembly_files))


}

该脚本可以工作,但是一旦到达第五个进程(FASTQC2),即使生成了输出文件,但脚本也停止运行,它仍然给出以下错误:

    `ERROR ~ Error executing process > 'FASTQC2 (1)'

Caused by:
Missing output file(s) sample_id2_fastqc.html expected by process FASTQC2 (1)

Command executed:

fastqc sample_id.trimmed.fastq -t 4

Command exit status:
0

Command output:
Analysis complete for sample_id.trimmed.fastq

Command error:
Started analysis of sample_id.trimmed.fastq
Approx 5% complete for sample_id.trimmed.fastq
Approx 10% complete for sample_id.trimmed.fastq
Approx 20% complete for sample_id.trimmed.fastq
Approx 25% complete for sample_id.trimmed.fastq
Approx 35% complete for sample_id.trimmed.fastq
Approx 40% complete for sample_id.trimmed.fastq
Approx 50% complete for sample_id.trimmed.fastq
Approx 55% complete for sample_id.trimmed.fastq
Approx 65% complete for sample_id.trimmed.fastq
Approx 70% complete for sample_id.trimmed.fastq
Approx 80% complete for sample_id.trimmed.fastq
Approx 85% complete for sample_id.trimmed.fastq
Approx 95% complete for sample_id.trimmed.fastq
Work dir:
/home/staukobong/work/89/9ecd8124e69bdb6ad772d423711c87

Tip: when you have fixed the problem you can continue the execution adding the option -resume to the run command line

-- Check '.nextflow.log' file for details`

不确定问题可能是什么,因为第一个 fastqc 和其他进程都有效。我能否就此获得一些帮助,我将不胜感激。谢谢你。

bash bioinformatics nextflow genome
1个回答
0
投票

Fastqc 将去掉 .fastq 扩展名,其输出文件将以此作为基本名称。因此,当您喂它

sample_id.trimmed.fastq
时,基本名称将为
sample_id.trimmed
,您的 html 报告将发送至
sample_id.trimmed_fastqc.html

您已经告诉 fastqc2 进程期望生成一个名为

sample_id2_fastqc.html 
的文件:

原因: 缺少进程 FASTQC2 所需的输出文件sample_id2_fastqc.html (1)

更改 FASTQC2 进程的

output:
以与 fastqc 生成的文件名完全匹配。

© www.soinside.com 2019 - 2024. All rights reserved.