These are chat archives for nextflow-io/nextflow

15th
Oct 2016
Jacek Grzebyta
@jgrzebyta
Oct 15 2016 13:09
Hi, how can I pass original file name to the process? I have in my project where file names
Encodes the data. If I do traditional process
InFile=Channel.fromPath("experiment555433meta.xlsx")
process convert {
input: file InputFile from InFile
Than programme just see 'InputFile' as a name but not the original name.
Paolo Di Tommaso
@pditommaso
Oct 15 2016 17:09
Hi @jgrzebyta I guess you declared it as input: file 'InputFile' from InFile not as input: file InputFile from InFile
in a few words, when the file name is wrapped with quotes ' that is assumed to be the name of the file seen by the process
without quotes, the file is staged by using the original name and the specified in the input declaration can be used to reference that file as a variable handler, for example:
process foo {
   input: file 'InputFile' from InFile
   script: 
   """
   cat InputFile
   """ 
}
or
Paolo Di Tommaso
@pditommaso
Oct 15 2016 17:14
process foo {
   input: file InputFile from InFile
   script: 
   """
   cat $InputFile
   """ 
}
Jacek Grzebyta
@jgrzebyta
Oct 15 2016 17:18
@pditommaso Yes. I always do that (code I). Now I understand what is difference between both styles. Thanks a lot.
Paolo Di Tommaso
@pditommaso
Oct 15 2016 17:18
welcome
Jacek Grzebyta
@jgrzebyta
Oct 15 2016 17:26
@pditommaso Are you (nextflow team) planning to add kind of the include mechanism into nextflow? I mean link different .nf files into one bigger multibranch workflow.
Paolo Di Tommaso
@pditommaso
Oct 15 2016 17:28
yes, this is a feature we plan for the next year
Jacek Grzebyta
@jgrzebyta
Oct 15 2016 17:32
ok. Thanks.