diff --git a/src/nf_modules/FastQC/fastqc.nf b/src/nf_modules/FastQC/fastqc.nf
index 2a725f40ce3b7ea59edd4e058282fe657d3352d5..6e90d454d8b2da66882af7c5c99e537aca0cebd8 100644
--- a/src/nf_modules/FastQC/fastqc.nf
+++ b/src/nf_modules/FastQC/fastqc.nf
@@ -18,15 +18,16 @@ log.info "fastq files : ${params.fastq}"
 Channel
   .fromPath( params.fastq )
   .ifEmpty { error "Cannot find any fastq files matching: ${params.fastq}" }
+  .map { it -> [(it.baseName =~ /([^\.]*)/)[0][1], it]}
   .set { fastq_files }
 
 process fastqc_fastq {
-  tag "$reads.baseName"
+  tag "$file_id"
   publishDir "results/fastq/fastqc/", mode: 'copy'
   cpus = 1
 
   input:
-    file reads from fastq_files
+  set file_id, file(reads) from fastq_files
 
   output:
     file "*.{zip,html}" into fastqc_report
diff --git a/src/nf_modules/FastQC/tests/fastqc_single.nf b/src/nf_modules/FastQC/tests/fastqc_single.nf
index 318d20c71b6d6c795fd616ba3ed41267247b6702..459841651ec85102f38a980bc621d0ca1c8626bb 100644
--- a/src/nf_modules/FastQC/tests/fastqc_single.nf
+++ b/src/nf_modules/FastQC/tests/fastqc_single.nf
@@ -5,15 +5,16 @@ log.info "fastq files : ${params.fastq}"
 Channel
   .fromPath( params.fastq )
   .ifEmpty { error "Cannot find any fastq files matching: ${params.fastq}" }
+  .map { it -> [(it.baseName =~ /([^\.]*)/)[0][1], it]}
   .set { fastq_files }
 
 process fastqc_fastq {
-  tag "$reads.baseName"
+  tag "$file_id"
   publishDir "results/fastq/fastqc/", mode: 'copy'
   cpus = 1
 
   input:
-    file reads from fastq_files
+  set file_id, file(reads) from fastq_files
 
   output:
     file "*.{zip,html}" into fastqc_report