Fixing error: FastQ file for reads 1 must be provided, cannot contain spaces and must have extension

I have a samplesheet that starts like this:

sample,fastq_1,fastq_2,strandedness
PSC001_Blood,/netfiles02/mbsr2/AGTC_SingularG4/250213_GAR-0032_0075_2_3B0605T/demux_corrected/Moonshot/PSC001BloodRNA_S1_L001_R1_001.fastq.gz,/netfiles02/mbsr2/AGTC_SingularG4/250213_GAR-0032_0075_2_3B0605T/demux_corrected/Moonshot/PSC001BloodRNA_S1_L001_R2_001.fastq.gz,auto

I even simplified it:

sample,fastq_1,fastq_2,strandedness
PSC001_Blood,PSC001BloodRNA_S1_L001_R1_001.fastq.gz,PSC001BloodRNA_S1_L001_R2_001.fastq.gz,auto
PSC001_Tumor,PSC001FFPERNA_S1_L001_R1_001.fastq.gz,PSC001FFPERNA_S1_L001_R2_001.fastq.gz,auto

But when I try to run rnaseq I get:

nextflow run nf-core/rnaseq -r 3.18.0 -profile apptainer --input rnaseq_samplesheet.csv
–outdir ./rnaseq_output/ --fasta Homo_sapiens_assembly38_renamedHLAContigs.fasta --gtf Homo_sapiens.GRCh38.113.chr.gtf.gz

  • –input (./PSC001/PSC001_rnaseq_samplesheet.csv): Validation of f
    ile failed:
    → Entry 2: Error for field ‘fastq_2’ (/netfiles02/mbsr2/AGTC_SingularG4/250213_GAR-0032_0075_2_3B0605T/demux_corrected/Moonshot/PSC001FFPERNA_S1_L001_R2_001.fastq.gz): FastQ file for reads 2 cannot contain spaces and must have extension ‘.fq.gz’ or ‘.fastq.gz’
    → Entry 2: Error for field ‘fastq_1’ (/netfiles02/mbsr2/AGTC_SingularG4/250213_GAR-0032_0075_2_3B0605T/demux_corrected/Moonshot/PSC001FFPERNA_S1_L001_R1_001.fastq.gz): FastQ file for reads 1 must be provided, cannot contain spaces and must have extension ‘.fq.gz’ or ‘.fastq.gz’

How can I fix this? I think this has happened before with other nextflow versions but I am using the latest (24.10.4)

I can’t see any spaces on the entry you provided, but try to open the samplesheet on a text editor that is capable of showing hidden or special characters in the file paths.

My personal preference is to simplify samplesheets by creating symbolic links to the FQ files on the run directory, that way the samplesheet can be much more simple and legible.

You can also try to wrap the paths on single quotes, that should scape special characters in the path (but I think the path should not have special characters to begin with!).

Best of luck with solving this issue!

1 Like

Thank you @ctuni!! Thank you very much for taking the time to answer. Unfortunately, neither of those things solved the issue, no special character and I also simplified the samplesheet

It’s running now!! The issue was actually that the filename was incorrect. The error message was misleading of course, but the answer was simple. Again @ctuni, thank you very much as your prompt motivated me to look at the names more closely.

Happy to hear that is working now!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.