These are chat archives for nextflow-io/nextflow

21st
May 2015
Michael L Heuer
@heuermh
May 21 2015 20:11

hello, kind of a best-practice question:

If I want to refer to data in my repository from my script I need to use file("$baseDir/..."), but then if I'm using docker $baseDir may or may not be accessible inside the docker container.

See e.g.
nmdp-bioinformatics/flow#18

In practice this isn't a problem, since we're using external data mounted via NFS or S3, but for example/demo/ci purposes, it'd be nice if I could run everything self-contained from the repo with or without docker
Paolo Di Tommaso
@pditommaso
May 21 2015 20:15
actually it should work, it is meant exactly for that
let me to give a look at the code
ok, files should always declared in the process input: block
otherwise the process won't be aware of it and won't be mounted in the docker container
for example at line 99 and 101 you are accessing the ref(genome) file
Michael L Heuer
@heuermh
May 21 2015 20:20
ok I think this is something I was trying to figure out before . . . all my other file references are pulled from channels, whereas this specific one is always the same and is referred to several times by different processes
Paolo Di Tommaso
@pditommaso
May 21 2015 20:21
you don't need a channel
Michael L Heuer
@heuermh
May 21 2015 20:21
Paolo Di Tommaso
@pditommaso
May 21 2015 20:22
you only need to add a file ref in the input block
Michael L Heuer
@heuermh
May 21 2015 20:22
maybe I was having a problem with the params.reference value inside a process?
ok, keep line 88 and include file ref in each process that needs it
Paolo Di Tommaso
@pditommaso
May 21 2015 20:22
yes!
Michael L Heuer
@heuermh
May 21 2015 20:22
will give that a try . . .
Paolo Di Tommaso
@pditommaso
May 21 2015 20:23
the line ref = file("${params.reference}") given a string create a (java) Path object
then you need to tell the process to manage it as an input file
that includes to create the docker mounts
I think you may have a similar problem here
that path will be created in the container and you will lost the result
Michael L Heuer
@heuermh
May 21 2015 20:29
yes, that is true, am fixing those too