Skip to content

Commit

Permalink
REF: kaiju
Browse files Browse the repository at this point in the history
  • Loading branch information
ebolyen committed Jul 24, 2024
1 parent 6f7cdb8 commit 9586682
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 18 deletions.
1 change: 0 additions & 1 deletion q2_types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,5 @@
importlib.import_module('q2_types.metadata')
importlib.import_module('q2_types.multiplexed_sequences')
importlib.import_module('q2_types.kraken2')
importlib.import_module('q2_types.kaiju')
importlib.import_module('q2_types.reference_db')
importlib.import_module('q2_types.profile_hmms')
9 changes: 2 additions & 7 deletions q2_types/kaiju/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,7 @@
# The full license is in the file LICENSE, distributed with this software.
# ----------------------------------------------------------------------------

import importlib

from ._format import KaijuIndexFormat, KaijuDBDirectoryFormat
from ._type import KaijuDB
from ._formats import KaijuIndexFormat, KaijuDBDirectoryFormat
from ._types import KaijuDB

__all__ = ["KaijuIndexFormat", "KaijuDBDirectoryFormat", "KaijuDB"]

importlib.import_module('q2_types.kaiju._format')
importlib.import_module('q2_types.kaiju._type')
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@
#
# The full license is in the file LICENSE, distributed with this software.
# ----------------------------------------------------------------------------
from qiime2.plugin import SemanticType

from . import KaijuDBDirectoryFormat
from ..plugin_setup import plugin
from .. import KaijuIndexFormat, KaijuDBDirectoryFormat, KaijuDB

from ...plugin_setup import plugin

KaijuDB = SemanticType("KaijuDB")
plugin.register_formats(KaijuDBDirectoryFormat, KaijuIndexFormat)

plugin.register_semantic_types(KaijuDB)

Expand Down
6 changes: 1 addition & 5 deletions q2_types/kaiju/_format.py → q2_types/kaiju/_formats.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@
# The full license is in the file LICENSE, distributed with this software.
# ----------------------------------------------------------------------------
from qiime2.plugin import model
from q2_types.reference_db._format import (
from q2_types.reference_db import (
NCBITaxonomyNamesFormat, NCBITaxonomyNodesFormat
)
from ..plugin_setup import plugin


class KaijuIndexFormat(model.BinaryFileFormat):
Expand All @@ -24,6 +23,3 @@ class KaijuDBDirectoryFormat(model.DirectoryFormat):
nodes = model.File(r"nodes.dmp", format=NCBITaxonomyNodesFormat)
names = model.File(r"names.dmp", format=NCBITaxonomyNamesFormat)
index = model.File(r"kaiju_db.+\.fmi", format=KaijuIndexFormat)


plugin.register_formats(KaijuDBDirectoryFormat)
11 changes: 11 additions & 0 deletions q2_types/kaiju/_types.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# ----------------------------------------------------------------------------
# Copyright (c) 2023, QIIME 2 development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file LICENSE, distributed with this software.
# ----------------------------------------------------------------------------
from qiime2.plugin import SemanticType


KaijuDB = SemanticType("KaijuDB")
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import unittest
from qiime2.plugin.testing import TestPluginBase

from q2_types.kaiju._format import KaijuDBDirectoryFormat
from q2_types.kaiju import KaijuDBDirectoryFormat


class TestFormats(TestPluginBase):
Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions q2_types/plugin_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,6 @@
importlib.import_module('q2_types.feature_map._deferred_setup')
importlib.import_module('q2_types.feature_table._deferred_setup')
importlib.import_module('q2_types.genome_data._deferred_setup')
importlib.import_module('q2_types.kaiju._deferred_setup')

importlib.import_module('q2_types.per_sample_sequences._deferred_setup')
3 changes: 3 additions & 0 deletions q2_types/reference_db/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,15 @@
DiamondDatabaseFileFmt,
DiamondDatabaseDirFmt,
NCBITaxonomyDirFmt,
NCBITaxonomyNamesFormat,
NCBITaxonomyNodesFormat,
EggnogProteinSequencesDirFmt
)

__all__ = ['ReferenceDB', 'Diamond', 'Eggnog', 'DiamondDatabaseFileFmt',
'DiamondDatabaseDirFmt', 'EggnogRefDirFmt', 'EggnogRefTextFileFmt',
'EggnogRefBinFileFmt', 'NCBITaxonomyDirFmt', 'NCBITaxonomy',
'NCBITaxonomyNamesFormat', 'NCBITaxonomyNodesFormat',
'EggnogProteinSequencesDirFmt', 'EggnogProteinSequences']

importlib.import_module('q2_types.reference_db._format')
Expand Down

0 comments on commit 9586682

Please sign in to comment.