-
Notifications
You must be signed in to change notification settings - Fork 27
Description
When running without docker ENTRYPOINT mode, when below command is used:
cd [some_dir]
python [path_to_neoantigen-vaccine-pipeline]/run_snakemake.py
The current working directory is some_dir
And this line:
neoantigen-vaccine-pipeline/run_snakemake.py
Line 274 in d2af22c
'pipeline/Snakefile', |
It will interpret the relative path from
some_dir
and think pipeline/reference_Snakefile
is in[some_dir]/pipeline/reference_Snakefile
, but in fact it is in [path_to_neoantigen-vaccine-pipeline]/pipeline/reference_Snakefile
It's not appropriate to assume people will run run_snakemake.py
from the [path_to_neoantigen-vaccine-pipeline]
all the time.
This is critical when running in singularity because you need to be able to run python [path_to_neoantigen-vaccine-pipeline]
outside of the singularity container to for example submit a singularity job.
I purpose the following change which won't change any current behavior but at the same time fix the issue:
from os.path import dirname, isfile, join, basename, splitext, exists |
Change to:
from os.path import dirname, isfile, join, basename, splitext, exists, realpath
neoantigen-vaccine-pipeline/run_snakemake.py
Line 274 in d2af22c
'pipeline/Snakefile', |
Change to:
dirname(realpath(__file__))+'/'+'pipeline/reference_Snakefile',
neoantigen-vaccine-pipeline/run_snakemake.py
Line 305 in d2af22c
'pipeline/reference_Snakefile', |
Change to:
dirname(realpath(__file__))+'/'+'pipeline/reference_Snakefile',