These are chat archives for nextflow-io/nextflow

25th
May 2018
senthil10
@senthil10
May 25 2018 06:59

@senthil10 def someValue = myChannel.getVal(), but remember that this is blocking

Thank you @pditommaso thats exactly what I was looking for and yes, I will use it with caution :+1:

Luca Cozzuto
@lucacozzuto
May 25 2018 07:36
@pditommaso I'll try to explain myself better (btw it would be nice to have a crystal ball in the next NF release :smile: )
Luca Cozzuto
@lucacozzuto
May 25 2018 07:40
So I have a channel containing a given structure and I want to reshape it and assign to a new channel
is this possible?
Paolo Di Tommaso
@pditommaso
May 25 2018 07:47
yes, how have made above
Luca Cozzuto
@lucacozzuto
May 25 2018 07:50
reads_for_mapping = trimmed_reads_for_mapping.flatten().collate(3)

reads_for_mapping.println()

[sim1, /nfs/software/bi/biocore_tools/git/nextflow/isoExpression/work/7f/fa315a77e82e8f54bee5099a552614/sim1-trimmed-pair1.fastq.gz, /nfs/software/bi/biocore_tools/git/nextflow/isoExpression/work/7f/fa315a77e82e8f54bee5099a552614/sim1-trimmed-pair2.fastq.gz]
[sim2, /nfs/software/bi/biocore_tools/git/nextflow/isoExpression/work/ca/2792855f536f5111cafd5140895bfc/sim2-trimmed-pair1.fastq.gz, /nfs/software/bi/biocore_tools/git/nextflow/isoExpression/work/ca/2792855f536f5111cafd5140895bfc/sim2-trimmed-pair2.fastq.gz]
[test2, /nfs/software/bi/biocore_tools/git/nextflow/isoExpression/work/b9/38189c15e726ddfb9f08a25f56ab74/test2-trimmed-pair1.fastq.gz, /nfs/software/bi/biocore_tools/git/nextflow/isoExpression/work/b9/38189c15e726ddfb9f08a25f56ab74/test2-trimmed-pair2.fastq.gz]
[test1, /nfs/software/bi/biocore_tools/git/nextflow/isoExpression/work/7b/d73bc2e4430a6f8e3659caf8aea40b/test1-trimmed-pair1.fastq.gz, /nfs/software/bi/biocore_tools/git/nextflow/isoExpression/work/7b/d73bc2e4430a6f8e3659caf8aea40b/test1-trimmed-pair2.fastq.gz]
reads_for_mapping = trimmed_reads_for_mapping

reads_for_mapping.println()


[sim1, /nfs/software/bi/biocore_tools/git/nextflow/isoExpression/work/7f/fa315a77e82e8f54bee5099a552614/sim1-trimmed-pair1.fastq.gz, /nfs/software/bi/biocore_tools/git/nextflow/isoExpression/work/7f/fa315a77e82e8f54bee5099a552614/sim1-trimmed-pair2.fastq.gz]
[sim2, /nfs/software/bi/biocore_tools/git/nextflow/isoExpression/work/ca/2792855f536f5111cafd5140895bfc/sim2-trimmed-pair1.fastq.gz, /nfs/software/bi/biocore_tools/git/nextflow/isoExpression/work/ca/2792855f536f5111cafd5140895bfc/sim2-trimmed-pair2.fastq.gz]
[test2, /nfs/software/bi/biocore_tools/git/nextflow/isoExpression/work/b9/38189c15e726ddfb9f08a25f56ab74/test2-trimmed-pair1.fastq.gz, /nfs/software/bi/biocore_tools/git/nextflow/isoExpression/work/b9/38189c15e726ddfb9f08a25f56ab74/test2-trimmed-pair2.fastq.gz]
[test1, /nfs/software/bi/biocore_tools/git/nextflow/isoExpression/work/7b/d73bc2e4430a6f8e3659caf8aea40b/test1-trimmed-pair1.fastq.gz, /nfs/software/bi/biocore_tools/git/nextflow/isoExpression/work/7b/d73bc2e4430a6f8e3659caf8aea40b/test1-trimmed-pair2.fastq.gz]
Paolo Di Tommaso
@pditommaso
May 25 2018 07:51
(i'm joining a call, let's continue later)
Luca Cozzuto
@lucacozzuto
May 25 2018 07:51
thanks! I'll post more stuff and stop :+1:
Luca Cozzuto
@lucacozzuto
May 25 2018 09:08
well I think I solved :)
senthil10
@senthil10
May 25 2018 12:09
@pditommaso I wish to re-use your MemoryUnit, but seems like only way to do that is to import it first (correct me if I am wrong ?). Is it OK to do so, i mean if it is not bad practice ?
import nextflow.util.MemoryUnit
Paolo Di Tommaso
@pditommaso
May 25 2018 12:11
I wish to re-use your MemoryUnit
in what meaning ?
senthil10
@senthil10
May 25 2018 12:25
It is for attaching a file after workflow is done, file will be attached only if it is lesser than given threshold (as params). I am using getSize() of File class to get the file size (which will return in bytes). So I would like the params to be flexible i.e. it can accept anything like "20MB" or "2000000" or "25000 KB" etc instead of only accepting it as bytes
Paolo Di Tommaso
@pditommaso
May 25 2018 12:26
I see
the import is fine, you can also do x = parms.foo as nextflow.util.MemoryUnit
senthil10
@senthil10
May 25 2018 12:28
That is just pure awesome :smiley: :clap: and exactly what I need
Thank you again @pditommaso
Paolo Di Tommaso
@pditommaso
May 25 2018 12:31
:v:
senthil10
@senthil10
May 25 2018 13:00
Just now realized that nextflow interpolates anything defined <number>.<unit> (20.MB, 150.KB) as MemoryUnit automatically, that is really convenient.
Paolo Di Tommaso
@pditommaso
May 25 2018 13:01
yes
Brad Langhorst
@bwlang
May 25 2018 13:38
what’s the best way to organize run reports for nextflow? seems like valuable data for comparison over time. Anybody worked on this question?
Paolo Di Tommaso
@pditommaso
May 25 2018 13:46
personally I organise my experiments in separate folders and keep everything there
micans
@micans
May 25 2018 14:31
we have scripts in a git module shared between projects as a submodule (showing up as a 'utils' folder). What is the best way to make them visible -- create symlinks in the bin folder?
Paolo Di Tommaso
@pditommaso
May 25 2018 14:46
yes, that should work
micans
@micans
May 25 2018 14:55
It would be great if there were a way this did not require to make symlinks (as this will require a lot of updating across projects), but rather be able to do something like add $NFROOT/utils to a $NFPATH variable, or if subfolders of bin were also added to PATH (automatically). Might something like this be on the horizon?
Paolo Di Tommaso
@pditommaso
May 25 2018 14:57
well, you could modify the PATH to include that folder
env.PATH = "$baseDir/scripts:$PATH'
micans
@micans
May 25 2018 14:58
aha, great, fab
Paolo Di Tommaso
@pditommaso
May 25 2018 14:58
tho sure it works with k8s, you need to check
micans
@micans
May 25 2018 14:59
I'm still in the early days of groovy and NF, hopefully my questions will become less basic over time.
Will keep k8s in mind
Paolo Di Tommaso
@pditommaso
May 25 2018 14:59
we are all beginners .. ;)
micans
@micans
May 25 2018 15:02
But some more than others ...
Firas
@FirasSadiyah
May 25 2018 15:26
I am setting down this weekend to learn NF and groovy, I will start here https://www.nextflow.io/docs/latest/script.html#pipeline-page. Wish me good luck and expect some beginner questions.. :)
Paolo Di Tommaso
@pditommaso
May 25 2018 15:27
I'm sure you will have fun
;)
Venkat Malladi
@vsmalladi
May 25 2018 16:06
Does anyone have a good example of an automatic docker build using travis-ci?
Paolo Di Tommaso
@pditommaso
May 25 2018 16:07
sure
Venkat Malladi
@vsmalladi
May 25 2018 16:18
@pditommaso great thanks
Paolo Di Tommaso
@pditommaso
May 25 2018 16:19
:+1:
Felix Kokocinski
@fkokocinski
May 25 2018 17:06
Actually - I'll have another look and get back to you on Monday...
Many thanks, Felix