FRED-2 / OptiType

Precision HLA typing from next-generation sequencing data

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

IOError: [Errno 2] could not open alignment file `result/2020_07_08_14_33_58/2020_07_08_14_33_58_1.bam`: No such file or directory

frankligy opened this issue · comments

I know someone put a similar error before, but my case is a little bit different:

Since our cluster doesn't have docker, I have to use another container-based software Singularity, theoretically it is nothing new from docker, first I build the image from docker hub:

singularity build my_software.sif docker://fred2/optitype

Then run it with the same command:

singularity run -B /a/folder/in/my/host/system:/result my_software.sif -i input1 [input2] (-r|-d) -o /result

It generated the error:

IOError: [Errno 2] could not open alignment file result/2020_07_08_14_33_58/2020_07_08_14_33_58_1.bam: No such file or directory

In the instruction:
docker run -v /path/to/data/folder:/data/ -t fred2/optitype -i input1 [input2] (-r|-d) -o /data/

So hoping to get some clarification, /path/to/data/folder is the absolute path for a folder in our host system that we want to mount to the container, and /data/ is an internal folder that exists in the container itself, is it correct?

I know it might related to the way I use singularity, so I also posted an issue on their GitHub page, but I'd be appreciated if you could provide me any input about the error I got, since I do make sure the output folder /result/ present on the mounting options and they are the same.

Thank you,
Frank

@frankligy I encountered similar error when I pulled the image and ran it in my MacOS laptop. I had to rebuild an image by commenting out the "USER biodocker" at the end of the dockerfile. In addition, I had to correct an error "Non-ASCII character '\xc3' in file /usr/local/bin/OptiType/OptiTypePipeline.py on line 12", which basically complained about the letter "á" in one of the authors' name. After these two changes, the docker image works. Hope this helps.

@cuiping Thanks a lot for reply, I finally get it work by changing the directory from /data to /mnt, the possible reason is that Optitype is using /data folder during running time, so it will cause confiction(well, just my guess), change it to another folder solve the problem.

Hi all,
I also faced with this issue, I also tried to change mount folder name, but it is not working for me. Do you all have any update for this issue, please share your experience to me. Thank you.

I fixed this issue. My mistake is putting relative path to the docker mount option insead the absolute one.

Hi, I received a similar error. My line of code is:

singularity run -B path/to/folder:/mnt/ path/to/folder/optitype_latest.sif -i path/to/folder/CL11R_R2.fastq --rna -o /path/to/folder/mnt/

Can someone advise on how to fix it?

Dear all,

I'm trying to run the tool with singularity but I'm facing the same issue as many others.
singularity run -B /path/to/folder:/result my_software.sif -i /path/to/folder/data/sample1_R1.fastq.gz /path/to/folder/data/sample1_R2.fastq.gz --rna -o /result

any hint on how to fix it easily?