These are chat archives for nextflow-io/nextflow

11th
Jul 2017
V-Catherine
@V-Catherine
Jul 11 2017 07:53
Hello everybody! I have an error message while trying to get the result of a bash command into a variable. Could someone help me to solve the problem ?
shell:
'''
list_files=ls -dm *.gvcf | sed -e 's/, / -V /g' | sed -e 's/^/-V /g'
echo !{list_files}
!{params.java17} -jar !{params.gatk}GenomeAnalysisTK.jar -T GenotypeGVCFs -nt 24 -R !{params.genome_ref} !{list_files} -o All_samples.gvcf
'''
The error message is ~ Error executing process > 'creation_joint (1) - Caused by: No such property: list_files for class: Script09F0B6EDC629DE363C80C4F5A5E2BA8C
I also tried with list_files=${ls -dm *.gvcf | sed -e 's/, / -V /g' | sed -e 's/^/-V /g'} but I got the same error
Thanks
Paolo Di Tommaso
@pditommaso
Jul 11 2017 07:56
Gitter tip: you can use triple ` character at the begin and the end of a text to delimit a code block
if list_files is a BASH var you should replace !{list_files} with ${list_files}
V-Catherine
@V-Catherine
Jul 11 2017 08:53
Thanks for the tip and the solution :-)
Paolo Di Tommaso
@pditommaso
Jul 11 2017 08:53
;)
Mike Smoot
@mes5k
Jul 11 2017 18:45
Hi @pditommaso is there any way to use the each modifier on the tuple that results from calling groupTuple? So, the input to my process is a channel where elements look like [1, ["a","b","c"]] and I'd like my process to run once for a, b, and c. I know I can flatMap that element, but I'm trying to avoid calling groupTuple after my process as an optimization.
Paolo Di Tommaso
@pditommaso
Jul 11 2017 18:50
no, I think the only way is to use a flatMap
Mike Smoot
@mes5k
Jul 11 2017 18:54
thanks, just wanted to check.
Félix C. Morency
@fmorency
Jul 11 2017 20:17
Can one groupTuple using two by:?
Awww yes
I jsut had to scroll to find it in the doc
Carry on