donovan-h-parks / RefineM

A toolbox for improving metagenome-assembled genomes.
GNU General Public License v3.0
63 stars 9 forks source link

KeyError in taxon_profile #54

Open estebangongora opened 3 years ago

estebangongora commented 3 years ago

Hi Donovan,

I am going through the RefineM pipeline and I encountered an error while performing the gene classification in the taxon_profile script.

Command: refinem taxon_profile refinem/called/ refinem/scaffold_stats.tsv /home/whyte/refinem_referencedatabases/gtdb_r95_protein_db.2020-07-30.faa /home/whyte/refinem_referencedatabases/gtdb_r95_taxonomy.2020-07-30.tsv refinem/tax_profile -c 45

Error: [2021-04-21 17:13:25] INFO: Writing taxonomic profile for each genome.

Unexpected error: <type 'exceptions.KeyError'> Traceback (most recent call last): File "/home/whyte/.local/bin/refinem", line 396, in parser.parse_options(args) File "/home/whyte/.local/lib/python2.7/site-packages/refinem/main.py", line 680, in parse_options self.taxon_profile(options) File "/home/whyte/.local/lib/python2.7/site-packages/refinem/main.py", line 230, in taxon_profile options.tmpdir) File "/home/whyte/.local/lib/python2.7/site-packages/refinem/taxon_profile.py", line 524, in run profile.write_scaffold_summary(scaffold_stats, scaffold_summary_out) File "/home/whyte/.local/lib/python2.7/site-packages/refinem/taxon_profile.py", line 1130, in write_scaffold_summary scaffold_stats.print_stats(seq_id), File "/home/whyte/.local/lib/python2.7/site-packages/refinem/scaffold_stats.py", line 354, in print_stats stats = self.stats[scaffold_id] KeyError: 'NODE_1724_length_2651_cov_2.198382'

It seems to be an error that someone else already had (issue #33) but hasn't been solved. And based on an issue for the ssu_erroneous script (issue #47), it appears it could be because some file was moved or the file name has changed. However, I have not moved or changed the name of any files while going through the pipeline so I am not sure what could be causing this error.

Any ideas of what it could be or how to deal with it?

Thanks!!

donovan-h-parks commented 3 years ago

Sorry - not sure. Unfortunately RefineM development is halted at this point. Perhaps MAGpurify would address your needs: https://github.com/snayfach/MAGpurify

TomasaSbaffi commented 2 years ago

Hi @estebangongora did you solve this? I am having a similar issue! I am trying to solve it ... if I won't be able, I will use MAGpurify!