Sorry yet another question. I build my initial cha...
# nostupidquestions
l
Sorry yet another question. I build my initial channel this way:
Copy code
ch_blast_in = ch_samplesheet.map { meta, fasta, tree -> tuple(meta, file(fasta)) }
and when I view it, it properly shows me all the samples I have in my samplesheet (subset example):
Copy code
[[id:DTX3], /path/to/DTX3_aa_seq.fasta]
[[id:DTX3L], /path/to/DTX3L_aa_seq.fasta]
[[id:PARP9], /path/to/PARP9_aa_seq.fasta]
but when I run my pipeline, it only runs on DTX3 and ignores the following lines. Is it because of the way I initialize the channel? The process I use on this channel is either BLAST_BLASTN or (in this case) BLAST_TBLASTN, and they both take as input:
Copy code
input:
    tuple val(meta) , path(fasta)
    tuple val(meta2), path(db)
my ch_blastdb is built beforehand and contains tuple(metadb, path/to/dir/of/db). I can run the whole downstream processes without trouble on the first sample, it just won't start on the following ones.
a
Classic Nextflow problem! Your process has two or more input channels. One of them has only one entry. If this channel is a queue channel, this single entry will be consumed by the first invokation of the process and the process won't run for the other entries in
ch_blast_in
. So you need to make sure that all other input channels either have the same number of entries as
ch_blast_in
or are single entry value channels.
Long story short:
ch_blastdb.first()
l
ha, thanks, that makes sense! I need to use first() in the process call, is that right? And do so in every process that uses this channel?
a
No, the
first
operator just returns a value channel with the first entry of a queue channel. You are free to assign that to a variable. Or you create the db channel directly as a value channel.
Channel.value([[id: 'blast_db'], file(/path/to/db)])
l
Thanks, I'll try that out