Open dr-joe-wirth opened 1 year ago
Thank you for the comment! I also encountered similar issues while using singularity. Your comment saved me! For other people who might be interested in using singularity: you also need to "bind" the path for singularity prokka to recognize your local files. Here is the adjusted code I used for singularity:
singularity exec --bind /local/path/fasta:/mydata prokka.sif prokka --outdir /mydata/filename.fasta /mydata/filename.fasta
The /local/path/fasta
would be where your filename.fasta file is stored on your local environment, so change accordingly, and it has to be absolute path. The /mydata
is the path within singularity and can be arbitrary, as long as it's consistent throughout the code above. Hope this helps for singularity users.
I was working with the docker image, and kept getting the error
contig.fa is not a readable non-empty FASTA file
. I was using the following command as it is described in the readme:docker run staphb/prokka:latest prokka contigs.fa
but this always failed to read the file. I checked, and sure enough
./contigs.fa
existed and was 3.2MB in size. I ranchmod a+r contigs.fa
but this did not resolve the issue.After a little sleuthing, I realized this bug was occurring because I was not mounting a drive when invoking docker. I suggest adding the following details to the readme so that others do not repeat the same mistake:
docker run -v <absolute path to folder containing contigs.fa>:/mydata staphb/prokka:latest prokka --outdir /mydata/annotation /mydata/contigs.fa
Mounting the folder as a volume (
-v
) and then specifying the path from the mounted volume within the docker container resolves the issue of prokka not finding the file. The flag--outdir
is absolutely necessary or the results will not be written to the user's local machine.