These are chat archives for nextflow-io/nextflow

6th
Mar 2018
Vladimir Kiselev
@wikiselev
Mar 06 2018 09:31
@pditommaso , in the above script when using foo_ch.flatMap{ it.readLines() } it gets the number of lines correctly, so it starts a correct number of jobs, however looks like it does not read the file names correctly… so in the .command.sh I have this:
id_run="$(echo input.1 | cut -d'_' -f 1)"
maybe I need to add some additional formatting to foo_ch.flatMap{ it.readLines() }?
Paolo Di Tommaso
@pditommaso
Mar 06 2018 09:37
Check the generated command scripts
Vladimir Kiselev
@wikiselev
Mar 06 2018 09:57
isn’t .command.sh a generated script?
Paolo Di Tommaso
@pditommaso
Mar 06 2018 09:58
oops sorry , I've missed
yes
ok, I've got it
the problem is the input declaration
it should be val not file
ie:
  input: 
  val cram_file from foo_ch.flatMap{ it.readLines() }
sorry it was my fault . .
to explain a bit more
when you put file NF will stage the input as a file whatever the content is,
therefore if it's a pile object will you that file path
if it's just a string value, like in your example
it will create a file with that string as content
hope it makes sense
Vladimir Kiselev
@wikiselev
Mar 06 2018 10:13
cool, thanks for the explanation, worked now! I definitely need to learn some Java syntax...
Paolo Di Tommaso
@pditommaso
Mar 06 2018 10:14
this is a good quick start https://dzone.com/refcardz/groovy
Vladimir Kiselev
@wikiselev
Mar 06 2018 10:15
thanks!
Paolo Di Tommaso
@pditommaso
Mar 06 2018 10:15
:+1:
Rickard Hammarén
@Hammarn
Mar 06 2018 10:23
How can I see at runtime if singularity is enabled or not?
I tried to do log.info workflow.singularity and log.info singularity and a few others
Paolo Di Tommaso
@pditommaso
Mar 06 2018 10:25
I fear that information is not exposed
Rickard Hammarén
@Hammarn
Mar 06 2018 10:26
I see
Can I get at it by some proxy then? I suppose setting it and another variable at the same time is the easiest?
Paolo Di Tommaso
@pditommaso
Mar 06 2018 10:28
eventually, but should not make your workflow depend on the container engine (ideally)
Rickard Hammarén
@Hammarn
Mar 06 2018 10:29
well, this is all for testing/debugging
Paolo Di Tommaso
@pditommaso
Mar 06 2018 10:30
I see