-
Hello everyone, #!/usr/bin/env nextflow
nextflow.enable.dsl =2
reads_ch = Channel.fromFilePairs( '/home/data/*_R{1,2}.fastq' )
process foo {
input:
tuple val(sample_id) file(reads)
script:
"""
echo $sample_id
echo ${reads[0]}
echo ${reads[1]}
"""
workflow {
reads_ch.view()
foo(reads_ch)
} If I only run with
I want to make sure I can access the file name before going for further analysis. However, I was stuck for this issue for a while. Any suggestions or solutions are appreciated. Many thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I realize I have made an obvious mistake in the input field. I missed a comma between input:
tuple val(sample_id), file(reads) I don't know why missing a comma will produce the "Process 'foo' has been already used" error. However, adding the comma fix my problem. Thanks to anyone who might have started reading my question. I also hope my post can help others who encounter the same situation. |
Beta Was this translation helpful? Give feedback.
I realize I have made an obvious mistake in the input field. I missed a comma between
val()
andfile()
using the tuple input qualifier.It should be:
I don't know why missing a comma will produce the "Process 'foo' has been already used" error. However, adding the comma fix my problem. Thanks to anyone who might have started reading my question. I also hope my post can help others who encounter the same situation.