These are chat archives for nextflow-io/nextflow

22nd
May 2018
Bioninbo
@Bioninbo
May 22 2018 10:01
Hello everyone.
I have a probably very silly question: is it possible for a process to output a bash variable as a nextflow variable? something like this:
process process1 {
  output:
    val BASH_VAR into output_channel
  script:
  """
      BASH_VAR="1"
  """
}
Bioninbo
@Bioninbo
May 22 2018 10:13
So far I saved them to files that I read in the next process, but this is not very efficient
Paolo Di Tommaso
@pditommaso
May 22 2018 10:14
nothing better at this time
output the variable as a file name
then you don't have to read the file
Bioninbo
@Bioninbo
May 22 2018 10:17
I see, nice trick, I'll try thanks.
Maxime Garcia
@MaxUlysse
May 22 2018 10:19
good luck
Luca Cozzuto
@lucacozzuto
May 22 2018 15:34

Dear all I just noticed that this

    file "iso_tpm.txt" into iso_tpm_file_for_PSIcalc, iso_tpm_file_for_splitting, iso_tpm_file_for_isoforms

is ok while this is giving me error...

    file ("iso_tpm.txt") into iso_tpm_file_for_PSIcalc, iso_tpm_file_for_splitting, iso_tpm_file_for_isoforms

I'm wondering why...

Paolo Di Tommaso
@pditommaso
May 22 2018 16:05
TL;DR nextflow-io/nextflow#141
Luca Cozzuto
@lucacozzuto
May 22 2018 16:53
Thanks Paolo! Will be nice to have such example in the documentation (the right one ;) ) so that people can avoid guessing!