This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Prokka "not a readable non-empty FASTA file"

Hi!

I'm really new to bioinformatics so please bear with me. I am trying to use prokka to annotate three different assemblies I've run. I created a new directory and copied my three assembly fasta files into it. I use the following code

$ prokka contigs.fasta

the script starts running with some info but ends with

'contigs.fasta' is not a readable non-empty FASTA file 

I know for certain that these are the correct fasta files, I have used them in Quast etc. without issues. On github, the creator says there are only three reasons this might flag up ((1) have read permissions (2) be a real file not a folder (3) have a size greater than 0 bytes) and I don't think any of these apply. Any suggestions as to what might be going on? Many thanks!

fasta prokka

The response you got covers all the possibilities that are consistent with that error message. Why do you think that none of them apply? What is the folder structure, and what is the output of these commands?

pwd
ls -al contigs.fasta

Okay, I've checked and I think it's an access issue?

$ pwd
/mnt/rdw/01/bio3019/data/2022/bio3051/Staroveska/Assessement_1/annotation/
$ ls -al contigs.fasta
- rwxrwx - - -. 1 512065 10000 5123133 Apr 10 15:48 contigs.fasta

The same command returned similar results for all three files. I didn't have to specify permission with these files when I used them in other capacities. I've not come across access issues before, how can I fix it? Again so sorry, I've only been using Linux for the last two weeks!

(also I'm aware of the spelling mistake in Assessement_1, I just didn't bother changing it)

With this we have eliminated #2 and #3 above. This is a file and not a folder, and its size is greater than 0. The problem is about file permission and ownership, and you can read about it here. Here is what the ls -al command returns for one of my files:

-rw-rw-r-- 1 mensur mensur  15499688 Sep 28  2020 contigs.fasta

You can see clearly the owner and their group for this file (mensur & mensur), and that everyone can read this file (the three rs in -rw-rw-r--). For your file the owner and the group are 512065 and 10000, respectively, which makes me think that this file was not created under Linux. Also, a general user of the system can't read this file (the third "r" is missing), which may be you (depending on how you logged in).

A short answer is that you may not be able to read this file, unless this command works (it changes file permissions so that all system users can read it):

chmod a+r contigs.fasta

If that command fails, you can't read the file, which is why prokka couldn't work with it either. If it works, the ls -al command should be showing the -rwxrwxr-- permission string, and prokka may work afterwards.

check the file with following commands:

  1. file contigs.fasta
  2. du -ah contigs.fasta
  3. seqkit stats contigs.fasta
  4. dos2unix contigs.fasta

0 answers

No answers yet.

Log in to answer this question.