These are chat archives for nextflow-io/nextflow

26th
Jan 2018
Karin Lagesen
@karinlag
Jan 26 2018 16:18
hi! If I inside of a process want to just print whatever is coming in on my channel, how do I do that?
Paolo Di Tommaso
@pditommaso
Jan 26 2018 16:19
do you mean an input value ?
Karin Lagesen
@karinlag
Jan 26 2018 16:19
Let's say I have an input like this:
set pair_id, file(reads) from read_pairs
is there a way to print the values of pair_id and reads inside the process?
Paolo Di Tommaso
@pditommaso
Jan 26 2018 16:20
you can do
Karin Lagesen
@karinlag
Jan 26 2018 16:20
I\m trying to clean up my pipeline, and thus I'm trying to clean up my input and output channel naming
Paolo Di Tommaso
@pditommaso
Jan 26 2018 16:20
    set pair_id, file(reads) from read_pairs.view()
Karin Lagesen
@karinlag
Jan 26 2018 16:22
ok, I got it to run, but nothing output to screen....?
Paolo Di Tommaso
@pditommaso
Jan 26 2018 16:22
hence there's no data .. :)
is it running that process ?
Karin Lagesen
@karinlag
Jan 26 2018 16:23
yes
Paolo Di Tommaso
@pditommaso
Jan 26 2018 16:24
mum, this sounds weird
that's supposed to print the channel content, I don't what could be wrong
Karin Lagesen
@karinlag
Jan 26 2018 16:26
hm
this is odd, seems like I get outoput before the process???
Paolo Di Tommaso
@pditommaso
Jan 26 2018 16:27
that's fine
Karin Lagesen
@karinlag
Jan 26 2018 16:27

Channel
.fromFilePairs("*R{1,2}_001.short.fastq.gz")
.ifEmpty { error "Cannot find any reads matching reads" }
.set{ read_pairs }

process collate_data {
input:
set pair_id, file(reads) from read_pairs.view()

"""
sleep 1

"""

}

sorry, couldn\t get it to put it into a nice chunk
Paolo Di Tommaso
@pditommaso
Jan 26 2018 16:28
triple `
Karin Lagesen
@karinlag
Jan 26 2018 16:28
Launching testvarname.nf [naughty_ardinghelli] - revision: 30b0636b48
[Angen-bacDNA2-78-2013-01-4718_S29_L001, [/home/karinlag/tmp/Angen-bacDNA2-78-2013-01-4718_S29_L001_R1_001.short.fastq.gz, /home/karinlag/tmp/Angen-bacDNA2-78-2013-01-4718_S29_L001_R2_001.short.fastq.gz]]
[warm up] executor > local
[d8/1fec33] Submitted process > collate_data (1)
Paolo Di Tommaso
@pditommaso
Jan 26 2018 16:28
new line
code
triple `
Karin Lagesen
@karinlag
Jan 26 2018 16:28
ah, of course :)
Paolo Di Tommaso
@pditommaso
Jan 26 2018 16:28
:)
anyhow you have it
Karin Lagesen
@karinlag
Jan 26 2018 16:29
thanks!
then I can finally get my input and output names sorted :)
Paolo Di Tommaso
@pditommaso
Jan 26 2018 16:29
:+1:
Friday pipeline cleaning ;)
Karin Lagesen
@karinlag
Jan 26 2018 16:30
yep
I think I understood about half of what I read the first time around designing this thing, now I understand more
Paolo Di Tommaso
@pditommaso
Jan 26 2018 16:30
nice
Karin Lagesen
@karinlag
Jan 26 2018 16:31
I actually think I'm close to understanding the difference between "$var", "${var}", "var", $var and var :)
Paolo Di Tommaso
@pditommaso
Jan 26 2018 16:32
if you don't manage if you can join NF course next fall :)
Karin Lagesen
@karinlag
Jan 26 2018 16:32
:)
Karin Lagesen
@karinlag
Jan 26 2018 17:13
I'm trying out one of the examples from the multiple input section, the one with the buffer(count:3)
and it's throwing an error
fasta = Channel.fromPath( "/some/path/*.fa" ).buffer(count:3)

process blastThemAll {
    input:
    file 'seq' from fasta

    "echo seq*"

}
Paolo Di Tommaso
@pditommaso
Jan 26 2018 17:14
are you using docker to run it ?
Karin Lagesen
@karinlag
Jan 26 2018 17:15
nope
karinlag@enki:~/tmp$ nextflow ntset.nf 
N E X T F L O W  ~  version 0.25.6
Launching `ntset.nf` [voluptuous_babbage] - revision: 0d7c637be9
ERROR ~ Unknown argument 'count' for operator 'buffer'. Did you mean one of these?
  size
  skip
  remainder

 -- Check script 'ntset.nf' at line: 1 or see '.nextflow.log' file for more details
karinlag@enki:~/tmp$
Paolo Di Tommaso
@pditommaso
Jan 26 2018 17:21
where is the script ?
Karin Lagesen
@karinlag
Jan 26 2018 17:21
...not sure I understand your question_
?
doh
Paolo Di Tommaso
@pditommaso
Jan 26 2018 17:21
you said that's one of the examples, which one?
Karin Lagesen
@karinlag
Jan 26 2018 17:21
my apologies, I need to fix the path before I complain :)
Paolo Di Tommaso
@pditommaso
Jan 26 2018 17:22
:+1:
it\s in the multiple inputs section
I fixed the path and it still gives the same error, so now I'm comfortable with complaining :)
Paolo Di Tommaso
@pditommaso
Jan 26 2018 17:23
what snippet are you running ?
(copy and paste the code)
Karin Lagesen
@karinlag
Jan 26 2018 17:24
see above
and I looked and it should probably say size instead of count
yep, the snippet works with size instead of count
Paolo Di Tommaso
@pditommaso
Jan 26 2018 17:26
nice spot, you may want to fix it in the docs :)
Karin Lagesen
@karinlag
Jan 26 2018 17:26
:D you're just trying to recruit me :)
Paolo Di Tommaso
@pditommaso
Jan 26 2018 17:27
ahahah