These are chat archives for nextflow-io/nextflow

14th
Nov 2018
micans
@micans
Nov 14 2018 11:55
Hello, I have a pipeline that has different branches. One of the branches is, simplistically, rnaseq, where I may use one of three aligners. I want to be able to deactivate this branch, but ideally without having a when directive in all three alignment processes. I imagine this will work, but it is a hack; is there a better way? ( @pditommaso ):
ch_reads
    .until{ skip_align_step }
    .into { ch_star; ch_hisat2; ch_salmon }
micans
@micans
Nov 14 2018 12:04
I realise my example is broken, as I want to send ch_reads into other channels as well ... Thanks @evanfloden , I'm considering your example ...

Mmmm. My more realistic example is this:

ch_fastqs_cram
  .mix(ch_fastqs_dir)
  .into{ ch_rnaseq; ch_fastqc; ch_mixcr }

ch_rnaseq
  .until{ skip_align_step } 
  .into { ch_star; ch_hisat2; ch_salmon }

I haven't tested it, but if it works it is pretty short and expressive .. in that sense I really like it.

If there are no performance considerations ...
Paolo Di Tommaso
@pditommaso
Nov 14 2018 13:04
it looks a nice idea the use of until
Evan Floden
@evanfloden
Nov 14 2018 13:05
New pattern!
Paolo Di Tommaso
@pditommaso
Nov 14 2018 13:05
:)
micans
@micans
Nov 14 2018 13:17
Wahey!
jeremygnfsk
@jeremygnfsk
Nov 14 2018 13:52
hi, I launched a nextflow pipeline and it ran two weeks. I interrupted it to correct some problems in the last process but when I launch it again with the -resume option it's start again from the beginning . I got from nextflow log the name of the previous run and I tried to resume with the name after the -resume and it's didn't work also. Do you have an idea to use the cache for not start from the beginning?
Edgar
@edgano
Nov 14 2018 13:57
If i'm not wrong... if NF is interrupted, -resume its not working bc it's not possible to know if the task were finished in a correct way or not... (but not sure 100%)
Paolo Di Tommaso
@pditommaso
Nov 14 2018 14:10
the nextflow log command should print list of runs
$ nextflow log
TIMESTAMP              DURATION    RUN NAME               STATUS    REVISION ID    SESSION ID                              COMMAND                       
2018-11-11 19:20:35    46.2s       jolly_ritchie          OK        d6bb54555b     93b5a6ad-168f-4b53-82f6-7c3ad245fe7a    nextflow -remote-debug t.nf
2018-11-11 22:03:17    1.3s        sick_khorana           OK        7aa9fbc2c0     da597ec9-e942-4a4e-80cc-8b37d021abae    nextflow run t.nf             
2018-11-11 22:10:16    969ms       agitated_volta         OK        7aa9fbc2c0     53173891-6e8c-445c-9928-de48ace7d529    nextflow run t.nf          
2018-11-11 22:13:33    1.4s        stupefied_fourier      OK        7aa9fbc2c0     42a2e6e5-6b1d-4db9-91bb-a4978c78393f    nextflow run t.nf          
2018-11-11 22:16:15    996ms       extravagant_picasso    OK        7aa9fbc2c0     c75dc5d4-dbee-43aa-8627-a784f971a950    nextflow run t.nf          
2018-11-11 22:19:27    4.8s        peaceful_booth         ERR       b4fee1bc71     95366a29-c5cc-456a-8b28-d1e4df27c5ac    nextflow run t.nf
pick the session of the run you want to resume and specify it as -resume option, i.e
nextflow run <script> ... -resume c75dc5d4-dbee-43aa-8627-a784f971a950
jeremygnfsk
@jeremygnfsk
Nov 14 2018 14:14
thank you, i will try
it didn't work
Paolo Di Tommaso
@pditommaso
Nov 14 2018 14:18
were you able to resume to previous executions ?
jeremygnfsk
@jeremygnfsk
Nov 14 2018 14:20
I did it few times previously but this time it didn't work
Paolo Di Tommaso
@pditommaso
Nov 14 2018 14:20
somethings must be changed ..
jeremygnfsk
@jeremygnfsk
Nov 14 2018 14:32
I'm pretty sure I change nothing
Paolo Di Tommaso
@pditommaso
Nov 14 2018 14:33
hash codes do not lie
jeremygnfsk
@jeremygnfsk
Nov 14 2018 14:34
is there a way to verify the hash code?
Paolo Di Tommaso
@pditommaso
Nov 14 2018 14:34
-dump-hashes
not very friendly tho
jeremygnfsk
@jeremygnfsk
Nov 14 2018 14:38
thanks anyway
Toni Hermoso Pulido
@toniher
Nov 14 2018 15:15
Hello, I'm normally running all different processes associated to containers, however I want one specific process to be run not run under a container... how could this be done? Something such as container=false within process ... withLabel: nocontainer would work?
Edgar
@edgano
Nov 14 2018 15:17
process foo1 {
  container false
  '''
 scriptfoo ...
  '''
}
https://www.nextflow.io/docs/latest/docker.html
Toni Hermoso Pulido
@toniher
Nov 14 2018 15:29
thanks @edgano I will try that way
Riccardo Giannico
@giannicorik_twitter
Nov 14 2018 17:17
Hi, I noticed method .splitText()creates a list from each line but each element still have the "newline" character. How can I get rid of it? I tried with some ch_file.splitText().map{it.replaceAll(\n,'')} but "replaceAll" seems not to be an applicable method .. any solution?
micans
@micans
Nov 14 2018 17:17
stick a trim() in there I believe. Hold on ...
.map { it.trim() }
Riccardo Giannico
@giannicorik_twitter
Nov 14 2018 17:18
lol thanks, fastest solution ever XD it works great!
micans
@micans
Nov 14 2018 17:18
:+1:
micans
@micans
Nov 14 2018 18:08
I have a case where I want to publish 7K files (this will probably grow). Maybe it would be useful to have an md5sum type structure, say based on filename. I can program this, but could it be something natively supported by publishDir? With argument depth, indicating the number of subdirectories.
Paolo Di Tommaso
@pditommaso
Nov 14 2018 18:27
sounds like a feature request ! ;)
micans
@micans
Nov 14 2018 18:27
Coming up!
maybe tomorrow, almost dinner time
Paolo Di Tommaso
@pditommaso
Nov 14 2018 18:28
ah, England.. :satisfied:
micans
@micans
Nov 14 2018 18:28
today I got all my code out of if branches, using channel.Empty(), until, and when. Happy :-)
Paolo Di Tommaso
@pditommaso
Nov 14 2018 18:29
wow, achievement unlock ! :tada: :tada: :tada:
micans
@micans
Nov 14 2018 18:29
hehe :+1: