Error assigning emm cluster
ramirma opened this issue · 1 comments
ramirma commented
I was running the tool to classify some Streptococcus dysgalactiae subs equisimilis (SDSE) and I got the error below. I suspect this is because the emm type found does not have a corresponding EMM cluster (these were defined only for GAS emm types) and there is no catch for this error. I am leaving also the contents of the tmp file.
Error in Stdout:
Traceback (most recent call last):
File "/home/ramirez/miniconda3/envs/GAStools/bin/emmtyper", line 11, in <module>
sys.exit(main())
File "/home/ramirez/miniconda3/envs/GAStools/lib/python3.7/site-packages/click/core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "/home/ramirez/miniconda3/envs/GAStools/lib/python3.7/site-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/home/ramirez/miniconda3/envs/GAStools/lib/python3.7/site-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/ramirez/miniconda3/envs/GAStools/lib/python3.7/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/home/ramirez/miniconda3/envs/GAStools/lib/python3.7/site-packages/emmtyper/bin/run_emmtyper.py", line 193, in main
clusterer()
File "/home/ramirez/miniconda3/envs/GAStools/lib/python3.7/site-packages/emmtyper/objects/clusterer.py", line 428, in __call__
final_result = self.produce_final_result()
File "/home/ramirez/miniconda3/envs/GAStools/lib/python3.7/site-packages/emmtyper/objects/clusterer.py", line 196, in produce_final_result
return self.verbose_stringer()
File "/home/ramirez/miniconda3/envs/GAStools/lib/python3.7/site-packages/emmtyper/objects/clusterer.py", line 153, in verbose_stringer
self.list_to_string_emm_clusters(self.answers),
File "/home/ramirez/miniconda3/envs/GAStools/lib/python3.7/site-packages/emmtyper/objects/clusterer.py", line 113, in list_to_string_emm_clusters
string += emm.EMM(answer.type).emm_cluster
File "/home/ramirez/miniconda3/envs/GAStools/lib/python3.7/site-packages/emmtyper/objects/emm.py", line 27, in __init__
self.emm_cluster = self.translate_to_cluster()
File "/home/ramirez/miniconda3/envs/GAStools/lib/python3.7/site-packages/emmtyper/objects/emm.py", line 31, in translate_to_cluster
return cluster_translations[self.number]
KeyError: '220'
Temp file contents:
SH10487_NODE_9_length_71711_cov_24.168984_pilon EMM220.0 100.000 180 0 0 24903 25082 1 180 9.37e-91 333 180
SH10487_NODE_9_length_71711_cov_24.168984_pilon STC36.4 99.444 180 1 0 24903 25082 1 180 4.36e-89 327 180
SH10487_NODE_9_length_71711_cov_24.168984_pilon STC36.0 99.444 180 1 0 24903 25082 1 180 4.36e-89 327 180
SH10487_NODE_9_length_71711_cov_24.168984_pilon STC36.11 98.889 180 2 0 24903 25082 1 180 2.03e-87 322 180
SH10487_NODE_9_length_71711_cov_24.168984_pilon STC36.10 98.889 180 2 0 24903 25082 1 180 2.03e-87 322 180
andersgs commented
Thank you! I’ll check it out. Any chance you can share the genome with me so I can try to reproduce the error? It would be a good test case. You can just share the relevant section too. You can reach me on Slack if you wish to share privately. I am on leave this week, but will try to get to it ASAP.
Cheers. A.