OptiType: OSError: [Errno 13] Permission denied: '/local'

Hi

I know somebody down here had the same problem.

I’m trying to use optotype in docker: docker run -v /local/pVACtools/:/data/ -t fred2/optitype --input SRR2672972_1.fastq SRR2672972_2.fastq --rna -o /local/pVACtools/Optitype/RNA_control

And I get this:

Traceback (most recent call last):
  File "/usr/local/bin/OptiType/OptiTypePipeline.py", line 235, in <module>
    os.makedirs(args.outdir)        
  File "/usr/lib/python2.7/os.py", line 150, in makedirs
    makedirs(head, mode)
  File "/usr/lib/python2.7/os.py", line 150, in makedirs
    makedirs(head, mode)
  File "/usr/lib/python2.7/os.py", line 150, in makedirs
    makedirs(head, mode)
  File "/usr/lib/python2.7/os.py", line 150, in makedirs
    makedirs(head, mode)
  File "/usr/lib/python2.7/os.py", line 157, in makedirs
    mkdir(name, mode)
OSError: [Errno 13] Permission denied: '/local'

I assume that python 2.7is also in the docker. I’ve tried to run this as sudo and ik keeps showing the same errors.

Thanks

About this issue

  • Original URL
  • State: open
  • Created 6 years ago
  • Comments: 19 (5 by maintainers)

Most upvoted comments

Actually I did this, however the solution in my case was to give 777 permissions to the mounted, local folder. I guess this is all related to the lack of experience with docker, but the next issue I ran into was then

sudo docker run -v /local/directory:/data/ -t fred2/optitype -i x_1.fastq.gz x_2.fastq.gz -d -o /data/

[E::hts_open_format] Failed to open file /data/2018_03_20_15_06_37/2018_03_20_15_06_37_1.bam Traceback (most recent call last): File "/usr/local/bin/OptiType/OptiTypePipeline.py", line 299, in <module> pos, read_details = ht.pysam_to_hdf(bam_paths[0]) File "/usr/local/bin/OptiType/hlatyper.py", line 186, in pysam_to_hdf sam = pysam.AlignmentFile(samfile, sam_or_bam) File "pysam/libcalignmentfile.pyx", line 444, in pysam.libcalignmentfile.AlignmentFile.__cinit__ File "pysam/libcalignmentfile.pyx", line 621, in pysam.libcalignmentfile.AlignmentFile._open IOError: [Errno 2] could not open alignment file /data/2018_03_20_15_06_37/2018_03_20_15_06_37_1.bam: No such file or directory

Any idea?

I had the same permission errors (Ubuntu server). I did the following and so far optitype is running: sudo adduser biodocker sudo chown -R :users /work/Projects sudo chmod -R 777 /work/Projects sudo docker run -v /work/Projects:/data -t fred2/optitype -i EA005_001_1.fq EA005_001_2.fq -d -o /data

Update: Optitype finished without errors 😃