Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Singularity GATK4 permission problem error #1557

Closed
Tintest opened this issue May 18, 2018 · 5 comments
Closed

Singularity GATK4 permission problem error #1557

Tintest opened this issue May 18, 2018 · 5 comments

Comments

@Tintest
Copy link

Tintest commented May 18, 2018

Hello,

I'm trying to use a Singularity container from a Docker image of the GATK4 , a Bioinformatic tool for "Genome" analysis (processing of genetic data).

I got an error which is directly related to Singularity permissions to create a directory ('/root/.theano/compiledir_Linux-4.10--generic-x86_64-with-debian-stretch-sid-x86_64-3.6.2-64'). It's running fine with Singularity when I'm root and Docker (without root). So it's not really a GATK4 problem but more a Singularity-GATK4 related problem.

Do you have any idea make it run properly ? Change my building command ? I need to do not be root when I'm running this tool.

Version of softwares:

Singularity : 2.5.1, GATK : 4.0.4.0

Command

Singularity :
singularity build gatk-4.0.4.0.img docker://broadinstitute/gatk:4.0.4.0

GATK4 :
java -Dsamjdk.use_async_io_read_samtools=false -Dsamjdk.use_async_io_write_samtools=true -Dsamjdk.use_async_io_write_tribble=false -Dsamjdk.compression_level=2 -jar /gatk/build/libs/gatk-package-4.0.4.0-local.jar DetermineGermlineContigPloidy --input 2044098202-8046_S5_sample.counts.hdf5 --input 2045946179-9076_S2_sample.counts.hdf5 --input 2045946166-9075_S1_sample.counts.hdf5 --input 2048220927-11022_S4_sample.counts.hdf5 --input 2045599261-9046ci_S1_sample.counts.hdf5 --input 2046745668-1007_S5_sample.counts.hdf5 --input 2044098101-8043_S2_sample.counts.hdf5 --input 2044098168-8044_S3_sample.counts.hdf5 --input 2046746598-1012_S4_sample.counts.hdf5 --input 2044395763-8064ci_S4_sample.counts.hdf5 --input 2044395647-8061ci_S1_sample.counts.hdf5 --input 70-20-CI_S3_sample.counts.hdf5 --input 70-18-CI_S1_sample.counts.hdf5 --input 2044395782-8065ci_S5_sample.counts.hdf5 --input 2048222393-11027_S3_sample.counts.hdf5 --input 2048220452-11020_S2_sample.counts.hdf5 --input 2048222667-11031_S7_sample.counts.hdf5 --input 2044395678-8062ci_S2_sample.counts.hdf5 --input 2044395611-8060_S6_sample.counts.hdf5 --input 2048221956-11025_S1_sample.counts.hdf5 --input 2045946131-9071ci_S6_sample.counts.hdf5 --input 2045599349-9047ci_S2_sample.counts.hdf5 --input 2045599158-9045ci_S6_sample.counts.hdf5 --input 2045946149-9073ci_S5_sample.counts.hdf5 --input 2048220431-11019_S1_sample.counts.hdf5 --input 2045946141-9072ci_S4_sample.counts.hdf5 --input 2046746758-1013_S5_sample.counts.hdf5 --input 2045598958-9043ci_S4_sample.counts.hdf5 --input 2046745451-1006_S4_sample.counts.hdf5 --input 2048220997-11023_S5_sample.counts.hdf5 --input 2044097928-8042_S1_sample.counts.hdf5 --input 2045598560-9041ci_S2_sample.counts.hdf5 --input 70-21-CI_S4_sample.counts.hdf5 --input 70-19-CI_S2_sample.counts.hdf5 --input 2046745923-1008_S6_sample.counts.hdf5 --input 2045598771-9042ci_S3_sample.counts.hdf5 --input 2048220861-11021_S3_sample.counts.hdf5 --input 204409765380-40Ci_S6_sample.counts.hdf5 --input 2048221977-11026_S2_sample.counts.hdf5 --input 2048222584-11029_S5_sample.counts.hdf5 --input 2046746353-1010_S2_sample.counts.hdf5 --input 2045946158-9074ci_S6_sample.counts.hdf5 --input 2045946119-9070ci_S5_sample.counts.hdf5 --input 2045599063-9044ci_S5_sample.counts.hdf5 --input 2046746482-1011_S3_sample.counts.hdf5 --input 204409784980-41ci_S7_sample.counts.hdf5 --input 2048222477-11028_S4_sample.counts.hdf5 --input 2045598355-9040ci_S1_sample.counts.hdf5 --input 2048221935-11024_S6_sample.counts.hdf5 --input 2044098183-8045_S4_sample.counts.hdf5 --input 2045946104-9069ci_S4_sample.counts.hdf5 --input 2048222618-11030_S6_sample.counts.hdf5 --input 2046747002-1014_S6_sample.counts.hdf5 --input 2044395737-8063ci_S3_sample.counts.hdf5 --input 2045946189-9077_S3_sample.counts.hdf5 --input 2045599415-9048ci_S3_sample.counts.hdf5 --input 2046746162-1009_S1_sample.counts.hdf5 --contig-ploidy-priors /home/qtestard/PROJECTS/aurexome/REF/common/prior_contig_diploidy.tsv --output /home/qtestard/PROJECTS/aurexome/SAMPLE/CNV_calling/CNV/CNV_calling_NaiveDetermineGermlineContigPloidy --output-prefix CNV_calling_NaiveDetermineGermlineContigPloidy

Actual behavior

PermissionError: [Errno 13] Permission denied: '/root/.theano'

  During handling of the above exception, another exception occurred:

  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/opt/miniconda/envs/gatk/lib/python3.6/site-packages/gcnvkernel/__init__.py", line 1, in <module>
      from pymc3 import __version__ as pymc3_version
    File "/opt/miniconda/envs/gatk/lib/python3.6/site-packages/pymc3/__init__.py", line 5, in <module>
      from .distributions import *
    File "/opt/miniconda/envs/gatk/lib/python3.6/site-packages/pymc3/distributions/__init__.py", line 1, in <module>
      from . import timeseries
    File "/opt/miniconda/envs/gatk/lib/python3.6/site-packages/pymc3/distributions/timeseries.py", line 1, in <module>
      import theano.tensor as tt
    File "/opt/miniconda/envs/gatk/lib/python3.6/site-packages/theano/__init__.py", line 66, in <module>
      from theano.compile import (
    File "/opt/miniconda/envs/gatk/lib/python3.6/site-packages/theano/compile/__init__.py", line 10, in <module>
      from theano.compile.function_module import *
    File "/opt/miniconda/envs/gatk/lib/python3.6/site-packages/theano/compile/function_module.py", line 21, in <module>
      import theano.compile.mode
    File "/opt/miniconda/envs/gatk/lib/python3.6/site-packages/theano/compile/mode.py", line 10, in <module>
      import theano.gof.vm
    File "/opt/miniconda/envs/gatk/lib/python3.6/site-packages/theano/gof/vm.py", line 662, in <module>
      from . import lazylinker_c
    File "/opt/miniconda/envs/gatk/lib/python3.6/site-packages/theano/gof/lazylinker_c.py", line 42, in <module>
      location = os.path.join(config.compiledir, 'lazylinker_ext')
    File "/opt/miniconda/envs/gatk/lib/python3.6/site-packages/theano/confith.join(config.compiledir, 'lazylinker_ext')
    File "/opt/miniconda/envs/gatk/lib/python3.6/site-packages/theano/configparser.py", line 333, in __get__
      self.__set__(cls, val_str)
    File "/opt/miniconda/envs/gatk/lib/python3.6/site-packages/theano/configparser.py", line 344, in __set__
      self.val = self.filter(val)
    File "/opt/miniconda/envs/gatk/lib/python3.6/site-packages/theano/configdefaults.py", line 1745, in filter_compiledir
      " '%s'. Check the permissions." % path)
  ValueError: Unable to create the compiledir directory '/root/.theano/compiledir_Linux-4.10--generic-x86_64-with-debian-stretch-sid-x86_64-3.6.2-64'. Check the permissions.

        at org.broadinstitute.hellbender.utils.python.PythonExecutorBase.getScriptException(PythonExecutorBase.java:75)
        at org.broadinstitute.hellbender.utils.runtime.ScriptExecutor.executeCuratedArgs(ScriptExecutor.java:126)
        at org.broadinstitute.hellbender.utils.python.PythonScriptExecutor.executeArgs(PythonScriptExecutor.java:170)
        at org.broadinstitute.hellbender.utils.python.PythonScriptExecutor.executeCommand(PythonScriptExecutor.java:79)
        at org.broadinstitute.hellbender.utils.python.PythonScriptExecutor.checkPythonEnvironmentForPackage(PythonScriptExecutor.java:192)
        at org.broadinstitute.hellbender.tools.copynumber.DetermineGermlineContigPloidy.onStartup(DetermineGermlineContigPloidy.java:240)
        at org.broadinstitute.hellbender.cmdline.CommandLineProgram.runTool(CommandLineProgram.java:132)
        at org.broadinstitute.hellbender.cmdline.CommandLineProgram.instanceMainPostParseArgs(CommandLineProgram.java:179)
        at org.broadinstitute.hellbender.cmdline.CommandLineProgram.instanceMain(CommandLineProgram.java:198)
        at org.broadinstitute.hellbender.Main.runCommandLineProgram(Main.java:160)
        at org.broadinstitute.hellbender.Main.mainEntry(Main.java:203)
        at org.broadinstitute.hellbender.Main.main(Main.java:289)

Steps to reproduce behavior

Quite difficult to do for you, because I assume your are not familiar with this kind of data / tools. I cannot share you my datasets because they are quite heavy and they are from patient for clinical diagnostic.

If you really need to investigate in real conditions with test files, I could try to find some public available files close to mine.

Thank you.

My thread on GATK4 Github #4782

@jmstover
Copy link
Contributor

jmstover commented May 18, 2018

Is there some configuration that's looking for the /root/.theano directory? If it's running as your user... I would expect it to be trying to use the directory: /home/qtestard/.theano

@Tintest
Copy link
Author

Tintest commented May 18, 2018

Thank you for your answer.

Honestly I have no idea what's happening in this directory, because before the command and does not exist and after it seems to doesn't exist anymore. I tried to run the container one time in sudo and writable mode with my command hoping it will create all the necessary directories (it worked for severall tools), but when I rerun it, no difference, still the same permission error in the /root directory.

I agree, it would be better to use the /home/qtestard/.theano, but maybe it is a limit of the theano software and so the GATK4 software itself.

@jmstover
Copy link
Contributor

Right. As your user you should not be able to write to the /root directory. If you run the container as root, the host /root is getting mounted writable inside the container. So, if you were to look, there should be a /root/.theano directory on the host.

That's where I'm getting confused. It looks like there's some configuration that has the /root/.theano path hard coded, so when it's ran as a normal user, it's still trying to use that path you don't have access to.

@Tintest
Copy link
Author

Tintest commented May 18, 2018

Indeed it seems quite logical. I will ask the GATK4 devs if looking in the /root directory is a normal behavior and if they could change it.

Thank you :)

@jmstover
Copy link
Contributor

Sounds good. I'm going to close this here. Go a head and re-open it, or start a new issue, if you later run into the same/or similar issue.

-J

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants