These are chat archives for nextflow-io/nextflow

2nd
Feb 2018
Maxime Borry
@maxibor
Feb 02 2018 13:47
Similar question @pditommaso , I'm struggling with using my conda environement for a specific process.
Paolo Di Tommaso
@pditommaso
Feb 02 2018 13:47
similar to what ?
Maxime Borry
@maxibor
Feb 02 2018 13:49
to @wikiselev
Here is what I do
process visual_results {

    beforeScript "source activate py27"
    afterScript "source deactivate py27"

    input:
        set val(name), file(myvar) from previous_step

    script:
        """
        #do something
        """
}
However, I get an error saying
/home/maxime/anaconda3/bin/deactivate: line 55: CONDA_PATH_BACKUP: unbound variable
Vladimir Kiselev
@wikiselev
Feb 02 2018 13:52
thanks, Maxime! I checked it yesterday and did source activate before running NF (instead of putting it in the pipeline script) and everything worked fine. Would it be a solution for you? Or, probably Paolo has something in mind about it.
Paolo Di Tommaso
@pditommaso
Feb 02 2018 13:52
yes, I would suggest this approach
you may try to put a set +u; before source activate/deactivate
Maxime Borry
@maxibor
Feb 02 2018 14:00
That worked @pditommaso , thanks !
Paolo Di Tommaso
@pditommaso
Feb 02 2018 14:00
:+1:
Maxime Borry
@maxibor
Feb 02 2018 14:02
As curiosity, what does set +u does ?
(google search results are quite sparse on this query)
:)
allows the usage of undfined env var (that's the default)
Maxime Borry
@maxibor
Feb 02 2018 14:04
Maybe you could add the set+u trick to the Nextflow documentation @pditommaso ? I think many people would like to use conda with nextflow :)
Paolo Di Tommaso
@pditommaso
Feb 02 2018 14:05
Maxime Borry
@maxibor
Feb 02 2018 14:21
Change submitted.
Thanks for your help @pditommaso !
Paolo Di Tommaso
@pditommaso
Feb 02 2018 14:21
:clap: :clap: :clap:
you are welcome