Is there a semantic type for an OTU map input? (not BIOM table)

Is there a semantic type for OTU maps? I do not see one, but I figure this is likely in the works or already there. If not I can create/register one like in the dummy_types example. Thanks!

Hi @Jennifer_Fouquier, we currently don’t have that type/format supported. I created an issue to track this. In the meantime, defining the type/format in the ghost-tree plugin should work. If you have any questions along the way get in touch!

1 Like

Hmm, so it looks pretty straight forward (I think I understand how it’s checking the file and doing the transformers), but even after registering the new semantic type on the q2-ghost-tree plugin it is saying “OtuMap is not a semantic type” despite registering it like it is in the q2-dummy-types. Because I’m keeping this associated with ghost-tree only for now, I figured I’d just define it in the plugin_setup.py. Thoughts? Thanks!

Traceback (most recent call last):
File “/Users/jenniferfouquier/miniconda3/envs/qiime2/bin/qiime”, line 6, in
sys.exit(q2cli.main.qiime())
File “/Users/jenniferfouquier/miniconda3/envs/qiime2/lib/python3.5/site-packages/click/core.py”, line 716, in call
return self.main(*args, **kwargs)
File “/Users/jenniferfouquier/miniconda3/envs/qiime2/lib/python3.5/site-packages/click/core.py”, line 696, in main
rv = self.invoke(ctx)
File “/Users/jenniferfouquier/miniconda3/envs/qiime2/lib/python3.5/site-packages/click/core.py”, line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/Users/jenniferfouquier/miniconda3/envs/qiime2/lib/python3.5/site-packages/click/core.py”, line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/Users/jenniferfouquier/miniconda3/envs/qiime2/lib/python3.5/site-packages/click/core.py”, line 889, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/Users/jenniferfouquier/miniconda3/envs/qiime2/lib/python3.5/site-packages/click/core.py”, line 534, in invoke
return callback(*args, **kwargs)
File “/Users/jenniferfouquier/miniconda3/envs/qiime2/lib/python3.5/site-packages/q2cli-0.0.6-py3.5.egg/q2cli/dev.py”, line 55, in refresh_cache
File “/Users/jenniferfouquier/miniconda3/envs/qiime2/lib/python3.5/site-packages/q2cli-0.0.6-py3.5.egg/q2cli/cache.py”, line 76, in refresh
File “/Users/jenniferfouquier/miniconda3/envs/qiime2/lib/python3.5/site-packages/q2cli-0.0.6-py3.5.egg/q2cli/cache.py”, line 103, in _get_cached_state
File “/Users/jenniferfouquier/miniconda3/envs/qiime2/lib/python3.5/site-packages/q2cli-0.0.6-py3.5.egg/q2cli/cache.py”, line 205, in _cache_current_state
File “/Users/jenniferfouquier/miniconda3/envs/qiime2/lib/python3.5/site-packages/q2cli-0.0.6-py3.5.egg/q2cli/cache.py”, line 229, in _get_current_state
File “/Users/jenniferfouquier/miniconda3/envs/qiime2/lib/python3.5/site-packages/qiime-2.0.6-py3.5.egg/qiime/sdk/plugin_manager.py”, line 32, in new
self._init()
File “/Users/jenniferfouquier/miniconda3/envs/qiime2/lib/python3.5/site-packages/qiime-2.0.6-py3.5.egg/qiime/sdk/plugin_manager.py”, line 46, in _init
plugin = entry_point.load()
File “/Users/jenniferfouquier/miniconda3/envs/qiime2/lib/python3.5/site-packages/setuptools-27.2.0-py3.5.egg/pkg_resources/init.py”, line 2258, in load
File “/Users/jenniferfouquier/miniconda3/envs/qiime2/lib/python3.5/site-packages/setuptools-27.2.0-py3.5.egg/pkg_resources/init.py”, line 2264, in resolve
File “/Users/jenniferfouquier/repos/q2-ghost-tree/q2_ghost_tree/plugin_setup.py”, line 41, in
plugin.register_semantic_types(‘OtuMap’)
File “/Users/jenniferfouquier/miniconda3/envs/qiime2/lib/python3.5/site-packages/qiime-2.0.6-py3.5.egg/qiime/plugin/plugin.py”, line 144, in register_semantic_types
raise TypeError("%r is not a semantic type." % semantic_type)
TypeError: ‘OtuMap’ is not a semantic type.

On line 41 of plugin_setup.py, you’ll need to register the semantic type you created instead of providing the type’s name as a string.

Change the current code:

plugin.register_semantic_types('OtuMap')

to:

plugin.register_semantic_types(OtuMap)
1 Like

Ah! Thanks @jairideout!

2 Likes