Skip to content

Commit

Permalink
Merge branch 'main' into partition_seqs_iss_126
Browse files Browse the repository at this point in the history
  • Loading branch information
Sann5 committed Feb 20, 2024
2 parents df12a54 + 1677131 commit 15ad50e
Show file tree
Hide file tree
Showing 28 changed files with 53 additions and 54 deletions.
2 changes: 1 addition & 1 deletion ci/recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ requirements:
- kraken2
- metabat2
- qiime2 {{ qiime2_epoch }}.*
- q2-types-genomics {{ qiime2_epoch }}.*
- q2-types {{ qiime2_epoch }}.*
- q2templates {{ qiime2_epoch }}.*
- q2-assembly {{ qiime2_epoch }}.*
- eggnog-mapper >=2.1.10
Expand Down
2 changes: 1 addition & 1 deletion q2_moshpit/busco/busco.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
_render_html,
)
from q2_moshpit._utils import _process_common_input_params
from q2_types_genomics.per_sample_data._format import MultiMAGSequencesDirFmt
from q2_types.per_sample_sequences._format import MultiMAGSequencesDirFmt


def evaluate_busco(
Expand Down
2 changes: 1 addition & 1 deletion q2_moshpit/busco/tests/test_busco.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from q2_moshpit.busco.busco import evaluate_busco
from unittest.mock import patch, ANY
from qiime2.plugin.testing import TestPluginBase
from q2_types_genomics.per_sample_data._format import MultiMAGSequencesDirFmt
from q2_types.per_sample_sequences._format import MultiMAGSequencesDirFmt


class TestBUSCO(TestPluginBase):
Expand Down
2 changes: 1 addition & 1 deletion q2_moshpit/busco/tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
)
from unittest.mock import patch, call
from qiime2.plugin.testing import TestPluginBase
from q2_types_genomics.per_sample_data._format import MultiMAGSequencesDirFmt
from q2_types.per_sample_sequences._format import MultiMAGSequencesDirFmt


class TestBUSCO(TestPluginBase):
Expand Down
2 changes: 1 addition & 1 deletion q2_moshpit/busco/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from .._utils import run_command
from copy import deepcopy
from typing import List, Dict
from q2_types_genomics.per_sample_data._format import MultiMAGSequencesDirFmt
from q2_types.per_sample_sequences._format import MultiMAGSequencesDirFmt


arguments_with_hyphens = {
Expand Down
4 changes: 2 additions & 2 deletions q2_moshpit/dereplication/derep.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
from q2_types.feature_data import DNAFASTAFormat
from scipy.cluster.hierarchy import ward, fcluster

from q2_types_genomics.feature_data import MAGSequencesDirFmt
from q2_types_genomics.per_sample_data import MultiMAGSequencesDirFmt
from q2_types.feature_data_mag import MAGSequencesDirFmt
from q2_types.per_sample_sequences import MultiMAGSequencesDirFmt


# def find_similar_bins(
Expand Down
4 changes: 2 additions & 2 deletions q2_moshpit/dereplication/tests/test_dereplication.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
_reassign_bins_to_samples, _write_unique_bins, _generate_pa_table,
dereplicate_mags
)
from q2_types_genomics.feature_data import MAGSequencesDirFmt
from q2_types_genomics.per_sample_data._format import MultiMAGSequencesDirFmt
from q2_types.feature_data_mag import MAGSequencesDirFmt
from q2_types.per_sample_sequences._format import MultiMAGSequencesDirFmt

from qiime2.plugin.testing import TestPluginBase

Expand Down
2 changes: 1 addition & 1 deletion q2_moshpit/eggnog/_dbs.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import pandas as pd
from qiime2.core.exceptions import ValidationError
from q2_types.feature_data import ProteinSequencesDirectoryFormat
from q2_types_genomics.reference_db import (
from q2_types.reference_db import (
EggnogRefDirFmt, DiamondDatabaseDirFmt, NCBITaxonomyDirFmt,
EggnogProteinSequencesDirFmt
)
Expand Down
8 changes: 4 additions & 4 deletions q2_moshpit/eggnog/_method.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
import qiime2.util
import pandas as pd
from typing import Union
from q2_types_genomics.per_sample_data import ContigSequencesDirFmt
from q2_types_genomics.genome_data import SeedOrthologDirFmt, OrthologFileFmt
from q2_types_genomics.reference_db import (
from q2_types.per_sample_sequences import ContigSequencesDirFmt
from q2_types.genome_data import SeedOrthologDirFmt, OrthologFileFmt
from q2_types.reference_db import (
EggnogRefDirFmt, DiamondDatabaseDirFmt
)
from q2_types.feature_data import DNAFASTAFormat
from q2_types_genomics.feature_data import (
from q2_types.feature_data_mag import (
OrthologAnnotationDirFmt, MAGSequencesDirFmt
)

Expand Down
2 changes: 1 addition & 1 deletion q2_moshpit/eggnog/tests/test_dbs.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
_validate_taxon_id, _collect_and_compare_md5
)
from q2_types.feature_data import ProteinSequencesDirectoryFormat
from q2_types_genomics.reference_db import (
from q2_types.reference_db import (
NCBITaxonomyDirFmt, EggnogProteinSequencesDirFmt
)

Expand Down
8 changes: 4 additions & 4 deletions q2_moshpit/eggnog/tests/test_method.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
import pandas as pd
import pandas.testing as pdt
from qiime2.plugin.testing import TestPluginBase
from q2_types_genomics.feature_data import MAGSequencesDirFmt
from q2_types.feature_data_mag import MAGSequencesDirFmt
from .._method import eggnog_diamond_search, eggnog_annotate
from q2_types_genomics.reference_db import (
from q2_types.reference_db import (
DiamondDatabaseDirFmt, EggnogRefDirFmt
)
from q2_types_genomics.per_sample_data import ContigSequencesDirFmt
from q2_types_genomics.genome_data import SeedOrthologDirFmt, OrthologFileFmt
from q2_types.per_sample_sequences import ContigSequencesDirFmt
from q2_types.genome_data import SeedOrthologDirFmt, OrthologFileFmt


class TestDiamond(TestPluginBase):
Expand Down
2 changes: 1 addition & 1 deletion q2_moshpit/kaiju/classification.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
)

from q2_moshpit._utils import run_command
from q2_types_genomics.kaiju import KaijuDBDirectoryFormat
from q2_types.kaiju import KaijuDBDirectoryFormat

DEFAULT_PREFIXES = ["d__", "p__", "c__", "o__", "f__", "g__", "s__", "ssp__"]

Expand Down
2 changes: 1 addition & 1 deletion q2_moshpit/kaiju/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

from tqdm import tqdm

from q2_types_genomics.kaiju import KaijuDBDirectoryFormat
from q2_types.kaiju import KaijuDBDirectoryFormat


from bs4 import BeautifulSoup
Expand Down
2 changes: 1 addition & 1 deletion q2_moshpit/kaiju/tests/test_database.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
)
from requests.exceptions import ConnectionError, RequestException

from q2_types_genomics.kaiju import KaijuDBDirectoryFormat
from q2_types.kaiju import KaijuDBDirectoryFormat


class TestDatabaseFunctions(TestPluginBase):
Expand Down
2 changes: 1 addition & 1 deletion q2_moshpit/kraken2/bracken.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

from q2_moshpit._utils import run_command
from q2_moshpit.kraken2.select import kraken2_to_features
from q2_types_genomics.kraken2 import (
from q2_types.kraken2 import (
Kraken2ReportDirectoryFormat,
BrackenDBDirectoryFormat,
)
Expand Down
8 changes: 4 additions & 4 deletions q2_moshpit/kraken2/classification.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@
SequencesWithQuality,
PairedEndSequencesWithQuality,
SingleLanePerSamplePairedEndFastqDirFmt,
SingleLanePerSampleSingleEndFastqDirFmt
SingleLanePerSampleSingleEndFastqDirFmt,
ContigSequencesDirFmt, Contigs
)
from q2_types.sample_data import SampleData
from q2_types.feature_data import FeatureData
from q2_moshpit._utils import run_command, _process_common_input_params
from q2_moshpit.kraken2.utils import _process_kraken2_arg
from q2_types_genomics.feature_data import MAGSequencesDirFmt, MAG
from q2_types_genomics.per_sample_data import ContigSequencesDirFmt, Contigs
from q2_types_genomics.kraken2 import (
from q2_types.feature_data_mag import MAGSequencesDirFmt, MAG
from q2_types.kraken2 import (
Kraken2ReportDirectoryFormat,
Kraken2OutputDirectoryFormat,
Kraken2DBDirectoryFormat,
Expand Down
2 changes: 1 addition & 1 deletion q2_moshpit/kraken2/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from tqdm import tqdm

from q2_moshpit._utils import _process_common_input_params, run_command
from q2_types_genomics.kraken2 import (
from q2_types.kraken2 import (
Kraken2DBDirectoryFormat, BrackenDBDirectoryFormat,
Kraken2DBReportDirectoryFormat
)
Expand Down
2 changes: 1 addition & 1 deletion q2_moshpit/kraken2/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

import pandas as pd

from q2_types_genomics.kraken2 import (
from q2_types.kraken2 import (
Kraken2ReportDirectoryFormat,
Kraken2OutputDirectoryFormat
)
Expand Down
2 changes: 1 addition & 1 deletion q2_moshpit/kraken2/select.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from q2_moshpit.kraken2.utils import (
_find_lca, _taxon_to_list, _join_ranks
)
from q2_types_genomics.kraken2 import (
from q2_types.kraken2 import (
Kraken2ReportDirectoryFormat, Kraken2OutputDirectoryFormat
)

Expand Down
4 changes: 2 additions & 2 deletions q2_moshpit/kraken2/tests/test_bracken.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@

from q2_moshpit.kraken2.bracken import (
_assert_read_lens_available, _run_bracken_one_sample, _estimate_bracken)
from q2_types_genomics.kraken2 import (BrackenDBDirectoryFormat,
Kraken2ReportDirectoryFormat)
from q2_types.kraken2 import (BrackenDBDirectoryFormat,
Kraken2ReportDirectoryFormat)


class MockTempDir(tempfile.TemporaryDirectory):
Expand Down
6 changes: 3 additions & 3 deletions q2_moshpit/kraken2/tests/test_classification.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
from q2_types.per_sample_sequences import (
SingleLanePerSampleSingleEndFastqDirFmt,
SingleLanePerSamplePairedEndFastqDirFmt,
ContigSequencesDirFmt
)
from q2_types_genomics.feature_data import MAGSequencesDirFmt
from q2_types_genomics.per_sample_data import ContigSequencesDirFmt
from q2_types_genomics.kraken2 import (
from q2_types.feature_data_mag import MAGSequencesDirFmt
from q2_types.kraken2 import (
Kraken2ReportDirectoryFormat,
Kraken2OutputDirectoryFormat, Kraken2DBDirectoryFormat,
)
Expand Down
2 changes: 1 addition & 1 deletion q2_moshpit/kraken2/tests/test_database.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
_find_latest_db, _fetch_db_collection, S3_COLLECTIONS_URL,
_build_dbs_from_seqs, _fetch_prebuilt_dbs, inspect_kraken2_db
)
from q2_types_genomics.kraken2 import (
from q2_types.kraken2 import (
Kraken2DBDirectoryFormat, BrackenDBDirectoryFormat,
Kraken2DBReportFormat, Kraken2DBReportDirectoryFormat
)
Expand Down
2 changes: 1 addition & 1 deletion q2_moshpit/kraken2/tests/test_selection.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from q2_moshpit.kraken2.select import _kraken_to_ncbi_tree, _find_lcas
from qiime2.plugin.testing import TestPluginBase

from q2_types_genomics.kraken2 import (
from q2_types.kraken2 import (
Kraken2ReportDirectoryFormat, # Kraken2OutputDirectoryFormat,
)

Expand Down
4 changes: 2 additions & 2 deletions q2_moshpit/metabat2/metabat2.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
import skbio.io
from q2_types.feature_data import DNAIterator

from q2_types_genomics.per_sample_data import ContigSequencesDirFmt, BAMDirFmt
from q2_types_genomics.per_sample_data._format import MultiFASTADirectoryFormat
from q2_types.per_sample_sequences import ContigSequencesDirFmt, BAMDirFmt
from q2_types.per_sample_sequences._format import MultiFASTADirectoryFormat

from q2_moshpit._utils import run_command, _process_common_input_params
from q2_moshpit.metabat2.utils import _process_metabat2_arg
Expand Down
4 changes: 2 additions & 2 deletions q2_moshpit/metabat2/tests/test_metabat2.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
from pathlib import Path
import tempfile
import unittest
from q2_types_genomics.per_sample_data import ContigSequencesDirFmt, BAMDirFmt
from q2_types_genomics.per_sample_data._format import MultiFASTADirectoryFormat
from q2_types.per_sample_sequences import ContigSequencesDirFmt, BAMDirFmt
from q2_types.per_sample_sequences._format import MultiFASTADirectoryFormat
from unittest.mock import patch, ANY, call

from qiime2.plugin.testing import TestPluginBase
Expand Down
17 changes: 8 additions & 9 deletions q2_moshpit/plugin_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
)
from q2_types.feature_table import FeatureTable, Frequency, PresenceAbsence
from q2_types.per_sample_sequences import (
SequencesWithQuality, PairedEndSequencesWithQuality
SequencesWithQuality, PairedEndSequencesWithQuality, MAGs, Contigs
)
from q2_types.sample_data import SampleData
from q2_types.feature_map import FeatureMap, MAGtoContigs
Expand All @@ -24,18 +24,17 @@
from qiime2.plugin import (Plugin, Citations)
import q2_moshpit._examples as ex
import q2_moshpit
from q2_types_genomics.feature_data import NOG, MAG
from q2_types_genomics.genome_data import (
from q2_types.feature_data_mag import NOG, MAG
from q2_types.genome_data import (
BLAST6, GenomeData, Loci, Genes, Proteins
)
from q2_types_genomics.kaiju import KaijuDB
from q2_types_genomics.kraken2 import (
from q2_types.kaiju import KaijuDB
from q2_types.kraken2 import (
Kraken2Reports, Kraken2Outputs, Kraken2DB, Kraken2DBReport
)
from q2_types_genomics.kraken2._type import BrackenDB
from q2_types_genomics.per_sample_data import MAGs, Contigs
from q2_types_genomics.per_sample_data._type import AlignmentMap
from q2_types_genomics.reference_db import (
from q2_types.kraken2._type import BrackenDB
from q2_types.per_sample_sequences._type import AlignmentMap
from q2_types.reference_db import (
ReferenceDB, Diamond, Eggnog, NCBITaxonomy, EggnogProteinSequences
)

Expand Down
4 changes: 2 additions & 2 deletions q2_moshpit/prodigal/prodigal.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
import os
import copy as cp
from .._utils import run_command
from q2_types_genomics.feature_data import MAGSequencesDirFmt
from q2_types_genomics.genome_data import (
from q2_types.feature_data_mag import MAGSequencesDirFmt
from q2_types.genome_data import (
LociDirectoryFormat, GenesDirectoryFormat, ProteinsDirectoryFormat,
)

Expand Down
4 changes: 2 additions & 2 deletions q2_moshpit/prodigal/tests/test_prodigal.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
import os
from q2_moshpit.prodigal.prodigal import predict_genes_prodigal
from qiime2.plugin.testing import TestPluginBase
from q2_types_genomics.feature_data import MAGSequencesDirFmt
from q2_types.feature_data_mag import MAGSequencesDirFmt
from unittest.mock import patch, call
from q2_types_genomics.genome_data import (
from q2_types.genome_data import (
LociDirectoryFormat, GenesDirectoryFormat, ProteinsDirectoryFormat,
)

Expand Down

0 comments on commit 15ad50e

Please sign in to comment.