kraken icon indicating copy to clipboard operation
kraken copied to clipboard

Kraken-translate error

Open Sanrrone opened this issue 8 years ago • 9 comments

Hi, I did a custom databate, search with kraken, but when i try to translate kraken.sequence (kraken-translate --db myKrakenDB --mpa-format sequences.kraken ), i get the following output:

Use of uninitialized value $_ in string eq at /Users/castrolab01/programs/kraken/kraken-translate line 116, <> line 1. Use of uninitialized value $_ in string eq at /Users/castrolab01/programs/kraken/kraken-translate line 117, <> line 1. Use of uninitialized value $_ in string eq at /Users/castrolab01/programs/kraken/kraken-translate line 118, <> line 1. Use of uninitialized value $_ in string eq at /Users/castrolab01/programs/kraken/kraken-translate line 119, <> line 1. Use of uninitialized value $_ in string eq at /Users/castrolab01/programs/kraken/kraken-translate line 120, <> line 1. Use of uninitialized value $_ in string eq at /Users/castrolab01/programs/kraken/kraken-translate line 121, <> line 1. Use of uninitialized value $_ in string eq at /Users/castrolab01/programs/kraken/kraken-translate line 122, <> line 1. Use of uninitialized value $_ in string eq at /Users/castrolab01/programs/kraken/kraken-translate line 123, <> line 1. Use of uninitialized value in transliteration (tr///) at /Users/castrolab01/programs/kraken/kraken-translate line 95, <> line 1. Use of uninitialized value $taxid in numeric gt (>) at /Users/castrolab01/programs/kraken/kraken-translate line 101, <> line 1. Use of uninitialized value $taxid in hash element at /Users/castrolab01/programs/kraken/kraken-translate line 104, <> line 1. Use of uninitialized value $taxid in hash element at /Users/castrolab01/programs/kraken/kraken-translate line 110, <> line 1. r1 root

Sanrrone avatar Mar 22 '16 18:03 Sanrrone

Hey @Sanrrone I am having the same issue, did you ever figure out how to fix this problem?

pjtorres avatar May 25 '17 19:05 pjtorres

No, I don't, just I change kraken for pathoscope2, kraken looks like have no more support

Sanrrone avatar May 26 '17 14:05 Sanrrone

ill take a look at this this week. Apologies for the late updates. I only recently started working on maintaining Kraken.

jenniferlu717 avatar Oct 23 '17 19:10 jenniferlu717

Good night,

I don't know if this issue has been resolved and I know it has been some time since the original comments. But I've had similar errors and think I've managed to solve them. The type of output initially presented in the first comment has appeared in following situations:

  • The taxid being searched during kraken-translate script does not exist in names.dmp &/or nodes.dmp (output translation for the given sequence/s with that taxid will only consist of the sequence header).
  • The names.dmp &/or nodes.dmp are not well formatted. The files must have perfect formatting like the original NCBI ftp files. If the files are altered or new files are created, the formatting must be perfect concerning spacing with tabs and '|' characters.
  • The relation between the information in names.dmp and nodes.dmp isn't correct. The names.dmp file has to have all the names with correct identifiers and so on. The nodes.dmp file has to have the same identifiers as present in the names.dmp file and the relation between children and parent taxids has to be spot on. If there aren't any missing levels it shoulf be just fine.

Hope this helps since it applies to several situations, mainly when altering or creating new files :)

rfm-targa avatar Jan 05 '18 00:01 rfm-targa

I've just hit this bug myself using Kraken v1.0, while trying to put together a minimal test case for a larger pipeline.

In this case, names.dmp and nodes.dmp existed as empty files (zero bytes) - which ought to make this easy to reproduce for testing any fix.

peterjc avatar Feb 09 '18 10:02 peterjc

Hi. I have the exact same issue. Do you know if this issue solved or not?

emrahkirdok avatar Mar 10 '18 19:03 emrahkirdok

I'm unsure about a fix but based on previous comments, it looks like the best suggestion is just to redownload the kraken taxonomy files. Are you having this issue with the most updated files?

jenniferlu717 avatar Mar 11 '18 04:03 jenniferlu717

For me, the wget-based download process of the taxonomy failed randomly. The rsync-based download of the reference sequences does work correctly if your proxy supports rsync connections (see #114 )

your-highness avatar Mar 19 '18 11:03 your-highness

I have a similar issue. It happened a day after downloading and settup of the kraken database. I used the script giving here https://github.com/sejmodha/MiscScripts/blob/master/UpdateKrakenDatabases.py

vappiah avatar Jan 28 '21 10:01 vappiah