tseemann / prokka

:zap: :aquarius: Rapid prokaryotic genome annotation
843 stars 226 forks source link

Ubuntu issues loading fasta file "not a readable non-empty FASTA" #419

Closed beherrm closed 5 years ago

beherrm commented 5 years ago

Hi, new user here,

I just loaded prokka on Ubuntu with linuxbrew. When I call on my file.. $ prokka 784contig.fasta

I get the error message: [19:08:59] This is prokka 1.14.0 [19:08:59] Written by Torsten Seemann torsten.seemann@gmail.com [19:08:59] Homepage is https://github.com/tseemann/prokka [19:08:59] Local time is Wed Oct 2 19:08:59 2019 [19:08:59] You are beherrm [19:08:59] Operating system is linux [19:08:59] You have BioPerl 1.007002 [19:08:59] System has 8 cores. [19:08:59] Will use maximum of 8 cores. [19:08:59] Annotating as >>> Bacteria <<< [19:08:59] '784.fasta' is not a readable non-empty FASTA file

My filesize is not zero and I believe is a FASTA file. Could the issue be permissions or something in the script by using the WSL?

Thank you for your help

tseemann commented 5 years ago

I assume WSL = Windows Subsystem Linux?

  1. Your command line says 784contig.fasta but the log says 784.fasta ?
  2. Do you have any spaces in the full path to the file?
  3. What does ls -lsa 784contig.fasta say?
  4. What does which prokka say?
beherrm commented 5 years ago
  1. I have been trying two files with different names so I have a 784contig.fasta and 784.fasta
  2. I don't believe I have spaces to the path... but by spaces do you mean in the file name or...?
  3. this is my command beherrm@DESKTOP-SS8I52E:~$ ls -lsa 784contig.fasta ls: cannot access '784contig.fasta': No such file or directory beherrm@DESKTOP-SS8I52E:~$ ls -lsa 784.fasta total 0 0 drwxrwxrwx 1 beherrm beherrm 4096 Oct 2 19:08 . 0 drwxr-xr-x 1 beherrm beherrm 4096 Oct 2 19:08 .. 0 lrwxrwxrwx 1 beherrm beherrm 28 Oct 2 19:08 genome.fa -> /home/beherrm/home/genome.fa

Both files are in my windows Download folder

On Wed, Oct 2, 2019 at 8:17 PM Torsten Seemann notifications@github.com wrote:

I assume WSL = Windows Subsystem Linux?

  1. Your command line says 784contig.fasta but the log says 784.fasta ?
  2. Do you have spaces int he full path to the file?
  3. What does ls -lsa 784contig.fasta say?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/tseemann/prokka/issues/419?email_source=notifications&email_token=ANLIV3WI3OYMXQSUXRNCLUDQMU2YHA5CNFSM4I44QYCKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEAGSOHY#issuecomment-537732895, or mute the thread https://github.com/notifications/unsubscribe-auth/ANLIV3U7GJR7MVAN6UFFZPTQMU2YHANCNFSM4I44QYCA .

tseemann commented 5 years ago

I mean spaces in the full path to your file.

It seems to be a "link"; not sure how windows links work in WSL.

You forgot to run 4.

  1. What does head 784.fasta say?
  2. What does head /home/beherrm/home/genome.fa say?
beherrm commented 5 years ago

No there aren't any spaces to the full path. (C:\Users\Beatrice\Desktop\784.fasta) is what the windows path is

Could you send 4 again, I do not have 4. in your original email.

beherrm@DESKTOP-SS8I52E:~$ ls -lsa 784contig.fasta ls: cannot access '784contig.fasta': No such file or directory beherrm@DESKTOP-SS8I52E:~$ prokka 784contig.fasta [10:51:24] This is prokka 1.14.0 [10:51:24] Written by Torsten Seemann torsten.seemann@gmail.com [10:51:24] Homepage is https://github.com/tseemann/prokka [10:51:24] Local time is Thu Oct 3 10:51:24 2019 [10:51:24] You are beherrm [10:51:24] Operating system is linux [10:51:24] You have BioPerl 1.007002 [10:51:24] System has 8 cores. [10:51:24] Will use maximum of 8 cores. [10:51:24] Annotating as >>> Bacteria <<< [10:51:24] '784contig.fasta' is not a readable non-empty FASTA file beherrm@DESKTOP-SS8I52E:~$ head 784.fasta head: error reading '784.fasta': Is a directory beherrm@DESKTOP-SS8I52E:~$ head 784contig.fasta head: cannot open '784contig.fasta' for reading: No such file or directory beherrm@DESKTOP-SS8I52E:~$ head home/beherrm/home/genome.fa head: cannot open 'home/beherrm/home/genome.fa' for reading: No such file or directory beherrm@DESKTOP-SS8I52E:~$ head home/beherrm/home/784contig.fasta head: cannot open 'home/beherrm/home/784contig.fasta' for reading: No such file or directory beherrm@DESKTOP-SS8I52E:~$ head home/beherrm/Desktop/784contig.fasta head: cannot open 'home/beherrm/Desktop/784contig.fasta' for reading: No such file or directory beherrm@DESKTOP-SS8I52E:~$

Thank you for your help again!

On Thu, Oct 3, 2019 at 1:40 AM Torsten Seemann notifications@github.com wrote:

I mean spaces in the full path to your file.

It seems to be a "link"; not sure how windows links work in WSL.

You forgot to run 4.

  1. What does head 784.fasta say?
  2. What does head /home/beherrm/home/genome.fa say?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/tseemann/prokka/issues/419?email_source=notifications&email_token=ANLIV3VISVJ7S3Q76KUSMCTQMWAUXA5CNFSM4I44QYCKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEAHB2NA#issuecomment-537795892, or mute the thread https://github.com/notifications/unsubscribe-auth/ANLIV3UBGANWUPPX4MKU323QMWAUXANCNFSM4I44QYCA .

jflucier commented 5 years ago

I have exact same problem. It is not a permission problem:

` (roary) |17:40:01|jflucier@ip29:[roary]> prokka --outdir gff 2112 test.newheaders.fna [17:40:11] This is prokka 1.14.0 [17:40:11] Written by Torsten Seemann torsten.seemann@gmail.com [17:40:11] Homepage is https://github.com/tseemann/prokka [17:40:11] Local time is Thu Oct 3 17:40:11 2019 [17:40:11] You are jflucier [17:40:11] Operating system is linux [17:40:11] You have BioPerl 1.007002 [17:40:11] System has 48 cores. [17:40:11] Will use maximum of 8 cores. [17:40:11] Annotating as >>> Bacteria <<< [17:40:11] '2112' is not a readable non-empty FASTA file (roary) |17:40:11|jflucier@ip29:[roary]> head test.newheaders.fna

contig00001 ATAATCATCATTACTTAATTGAAATTTAGCAGAATAAGTAGGTGCTTCTGCGTTATATGA ATAATCACCATTTTGATAATTCTTTAATCCTTTAAAATCACCATATTGTGAGAAAAACTT AAAGATTTCAATTTCTTTTTTTATGCCTTCGTCATTAATTGGACCAATCGGTATTATTTT ATTATTTACCATCTTTACTGGATAACGCTTTTCTTTATCTTCTGTCTTTTTTAATGTATC GTTACTTGTTACATCTACAATAAAATATCCTTTTGCCGTTCTTGTATTTCTATTTAAAAA TAGATACATACCTCTTGACCTCATAATTTTACCTTTTGGCTGTTTAACCATTGCTGAACT GATAACCCAAGTCCCCTTATCACCCTTTTTAAATTCGCCATCTCGATATCCTTCTTTGTC ATATAAGTCCTCGAGATTCTTAATTGGGTACATATCTAACGTTTTCGCAAAACTCTTTTT AATTTGTTCTTCTTTGGAACCTTCTTTTGTTTCATCACTTTTGCCACAACCTGCTACAAT (roary) |17:40:24|jflucier@ip29:[roary]> `

thank you very much for your help JF

tseemann commented 5 years ago

I don't think you are invoking prokka correctly.

prokka --outdir gff 2112 test.newheaders.fna

This means you want to annotate a file called 2112 and put the result in a folder gff. I don't think you have a FASTA file called 2112. That's what it is telling you. Do you mean this:

prokka --outdir prokka_out test.newheaders.fna
beherrm commented 5 years ago

WHat could my issue be, am I also not invoking prokka correctly?

On Thu, Oct 3, 2019 at 7:49 PM Torsten Seemann notifications@github.com wrote:

I don't think you are invoking prokka correctly.

prokka --outdir gff 2112 test.newheaders.fna

This means you want to annotate a file called 2112 and put the result in a folder gff. I don't think you have a FASTA file called 2112. That's what it is telling you.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/tseemann/prokka/issues/419?email_source=notifications&email_token=ANLIV3TL6YCSJYNDTQACWBLQM2AH5A5CNFSM4I44QYCKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEAJ5RRQ#issuecomment-538171590, or mute the thread https://github.com/notifications/unsubscribe-auth/ANLIV3XOSIJSTIM7BUQ37LTQM2AH5ANCNFSM4I44QYCA .

jflucier commented 5 years ago

tks tseemann, changing command to this did the trick:

(roary) |13:01:30|jflucier@ip29:[roary]> prokka --outdir gff --prefix 2112_ ../contigs/2112__large_contigs.fna

tseemann commented 5 years ago

Good news!

beherrm commented 5 years ago

I still have my issue! Any suggestions?

On Sun, Oct 6, 2019, 4:21 AM Torsten Seemann notifications@github.com wrote:

Good news!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/tseemann/prokka/issues/419?email_source=notifications&email_token=ANLIV3XJELNR45B32FBLLD3QNGU25A5CNFSM4I44QYCKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEAOEFAI#issuecomment-538722945, or mute the thread https://github.com/notifications/unsubscribe-auth/ANLIV3WHQHAQNCQEIU6R7ATQNGU25ANCNFSM4I44QYCA .

tseemann commented 5 years ago

@beherrm no i don't have any suggestions. i don't have experience with WSL on Win10. Earlier i asked you to run some command for me head ... but you didn't.

beherrm commented 5 years ago

Ah I see. I only have win10 and thought that WSL was the only way I could run prokka on windows.

I ran head (see above before jlucifer came into thread) I've copied it again here for convenience.

beherrm@DESKTOP-SS8I52E:~$ head 784.fasta head: error reading '784.fasta': Is a directory beherrm@DESKTOP-SS8I52E:~$ head 784contig.fasta head: cannot open '784contig.fasta' for reading: No such file or directory beherrm@DESKTOP-SS8I52E:~$ head home/beherrm/home/genome.fa head: cannot open 'home/beherrm/home/genome.fa' for reading: No such file or directory beherrm@DESKTOP-SS8I52E:~$ head home/beherrm/home/784contig.fasta head: cannot open 'home/beherrm/home/784contig.fasta' for reading: No such file or directory beherrm@DESKTOP-SS8I52E:~$ head home/beherrm/Desktop/784contig.fasta head: cannot open 'home/beherrm/Desktop/784contig.fasta' for reading: No such file or directory beherrm@DESKTOP-SS8I52E:~$

On Mon, Oct 7, 2019, 12:22 AM Torsten Seemann notifications@github.com wrote:

@beherrm https://github.com/beherrm no i don't have any suggestions. i don't have experience with WSL on Win10. Earlier i asked you to run some command for me head ... but you didn't.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/tseemann/prokka/issues/419?email_source=notifications&email_token=ANLIV3XIOLWFUGZRN4JYAX3QNK2QXA5CNFSM4I44QYCKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEAO7KWA#issuecomment-538834264, or mute the thread https://github.com/notifications/unsubscribe-auth/ANLIV3RCTTK66AQW3YT4HDDQNK2QXANCNFSM4I44QYCA .

ahmedmagds commented 5 years ago

@beherrm I think this is an issue of accessing your windows files from WSL. You can access your files directly and run prokka on them in WSL using a command like: $prokka /mnt/c/Users/username/path_to_folder/file.fasta OR you can copy them to your WSL home directory $cd $cp /mnt/c/Users/username/path_to_folder/file.fasta ./ In the above commands just change: 1- username to your username on the computer 2- path_to_folder to the path for the folder of interest on your computer 3- file.fasta to the fasta file name or any other file name.

beherrm commented 5 years ago

Thank you! :) worked very well

tseemann commented 5 years ago

@ahmedmagds thank you for helping! so it seems C:\Users\ gets mapped to /mnt/c/Users/ in WSL. Good to know!

nhungdoan1905 commented 5 years ago

@ahmedmagds when I run command to rename contigs file in directory which has fast file it worked. However, I get another error: Please rename your contigs or use --centre XXX to generate clean contig names I don't understand, I renamed file and it showed problem that I need to rename file?

maesaar commented 5 years ago

@nhungdoan1905 Perhaps information in #135 could be useful regarding solving your problem

beherrm commented 5 years ago

Thank you! Worked like a charm

On Wed, Oct 9, 2019, 12:05 AM Torsten Seemann notifications@github.com wrote:

@ahmedmagds https://github.com/ahmedmagds thank you for helping! so it seems C:\Users\ gets mapped to /mnt/c/Users/ in WSL. Good to know!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/tseemann/prokka/issues/419?email_source=notifications&email_token=ANLIV3SZMMLJG3JESGTROOLQNVJ7DA5CNFSM4I44QYCKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEAWPH4Y#issuecomment-539816947, or mute the thread https://github.com/notifications/unsubscribe-auth/ANLIV3SHDJINQU7B5MIIR7DQNVJ7DANCNFSM4I44QYCA .

sausin91 commented 1 year ago

I had a similar issue . so i did this. suppose your file name is xyz.fasta open the file in text editor or word page. just put the same name after this sign '>' example before >1..... after >xyz than run the command $ prokka xyz.fasta or which ever you following. Thanx