Hello!
I am currently writing a Nextflow RNA-Seq alignment pipeline. I am new to nextflow and trying to learn about how the data is passed between channels in the workflow. My TRIMMOMATIC process runs perfectly and TRIMMOMATIC.out.fastq.view() shows the correct output (which is the path to six trimmed fastq files). However, once my STAR process begins running, it is only processing one of my trimmed fastq files, not all six. Can someone explain to me how to solve this and the conceptual part behind it?
process STAR {
publishDir params.aligned_bams, mode: 'copy'
input:
path trimmed_fqs
path star_idx
output:
path "${trimmed_fqs.simpleName}.Aligned.sortedByCoord.out.bam", emit: bam
script:
"""
STAR --runThreadN 4 --genomeDir $star_idx --readFilesIn $trimmed_fqs --outSAMtype BAM SortedByCoordinate --outFileNamePrefix "${trimmed_fqs.simpleName}."
"""
}
workflow {
// run fastqc
fastqs = channel.fromPath(params.fastq_dir)
FASTQC(fastqs)
// run index_fa
genome_fa = channel.fromPath(params.genome_fa)
genome_gtf = channel.fromPath(params.genome_gtf)
INDEX_FA(genome_fa, genome_gtf)
// run trimmomatic
TRIMMOMATIC(fastqs)
// run alignment
STAR(TRIMMOMATIC.out.fastq, INDEX_FA.out.star_index)
// index bams
INDEX_BAM(STAR.out.bam)
// generate the counts matrix
FEATURECOUNTS(STAR.out.bam.collect())
}
can you please show us the output of
and the hidden file '.command.sh' generated by the process STAR in the STAR workfing directory