Loading ci/recipe/meta.yaml +5 −1 Original line number Diff line number Diff line Loading @@ -19,7 +19,8 @@ requirements: run: - python {{ python }} - scikit-learn 0.20.2 - scikit-learn 0.21.2 - joblib - scikit-bio - biom-format >=2.1.5,<2.2.0 - blast >=2.6.0 Loading @@ -27,6 +28,9 @@ requirements: - vsearch <=2.7.0 - qiime2 {{ release }}.* - q2-types {{ release }}.* - q2-quality-control {{ release }}.* - q2-taxa {{ release }}.* - q2-feature-table {{ release }}.* test: imports: Loading q2_feature_classifier/_consensus_assignment.py +8 −1 Original line number Diff line number Diff line Loading @@ -11,6 +11,7 @@ import subprocess import pandas as pd from os.path import isfile from collections import Counter, defaultdict import qiime2 def _get_default_unassignable_label(): Loading Loading @@ -40,7 +41,7 @@ def _consensus_assignments( consensus = {'': ('', '')} result = pd.DataFrame.from_dict(consensus, 'index') result.index.name = 'Feature ID' result.columns = ['Taxon', 'Confidence'] result.columns = ['Taxon', 'Consensus'] return result Loading Loading @@ -242,3 +243,9 @@ def _compute_consensus_annotation(annotations, min_consensus, consensus_fraction_result = 1.0 return annotation, consensus_fraction_result def _annotate_method(taxa, method): taxa = taxa.view(pd.DataFrame) taxa['Method'] = method return qiime2.Artifact.import_data('FeatureData[Taxonomy]', taxa) q2_feature_classifier/_skl.py +3 −3 Original line number Diff line number Diff line Loading @@ -9,7 +9,7 @@ from itertools import islice, repeat from copy import deepcopy from sklearn.externals.joblib import Parallel, delayed from joblib import Parallel, delayed _specific_fitters = [ ['naive_bayes', Loading Loading @@ -38,7 +38,7 @@ def _extract_reads(reads): def predict(reads, pipeline, separator=';', chunk_size=262144, n_jobs=1, pre_dispatch='2*n_jobs', confidence=-1.): pre_dispatch='2*n_jobs', confidence='disable'): return (m for c in Parallel(n_jobs=n_jobs, batch_size=1, pre_dispatch=pre_dispatch) (delayed(_predict_chunk)(pipeline, separator, confidence, chunk) Loading @@ -46,7 +46,7 @@ def predict(reads, pipeline, separator=';', chunk_size=262144, n_jobs=1, def _predict_chunk(pipeline, separator, confidence, chunk): if confidence < 0.: if confidence == 'disable': return _predict_chunk_without_conf(pipeline, chunk) else: return _predict_chunk_with_conf(pipeline, separator, confidence, chunk) Loading q2_feature_classifier/_taxonomic_classifier.py +1 −1 Original line number Diff line number Diff line Loading @@ -11,7 +11,7 @@ import tarfile import os import sklearn from sklearn.externals import joblib import joblib from sklearn.pipeline import Pipeline import qiime2.plugin import qiime2.plugin.model as model Loading q2_feature_classifier/_version.py +3 −3 Original line number Diff line number Diff line Loading @@ -23,9 +23,9 @@ def get_keywords(): # setup.py/versioneer.py will grep for the variable names, so they must # each be defined on a line of their own. _version.py will just call # get_keywords(). git_refnames = " (tag: 2019.4.0)" git_full = "e2ba97ea232a02f4c489b51ff0481583d394a339" git_date = "2019-05-03 04:14:49 +0000" git_refnames = " (tag: 2019.7.0)" git_full = "bc7ed3a741779ccb32114a229af65cc8c1510743" git_date = "2019-07-30 18:15:57 +0000" keywords = {"refnames": git_refnames, "full": git_full, "date": git_date} return keywords Loading Loading
ci/recipe/meta.yaml +5 −1 Original line number Diff line number Diff line Loading @@ -19,7 +19,8 @@ requirements: run: - python {{ python }} - scikit-learn 0.20.2 - scikit-learn 0.21.2 - joblib - scikit-bio - biom-format >=2.1.5,<2.2.0 - blast >=2.6.0 Loading @@ -27,6 +28,9 @@ requirements: - vsearch <=2.7.0 - qiime2 {{ release }}.* - q2-types {{ release }}.* - q2-quality-control {{ release }}.* - q2-taxa {{ release }}.* - q2-feature-table {{ release }}.* test: imports: Loading
q2_feature_classifier/_consensus_assignment.py +8 −1 Original line number Diff line number Diff line Loading @@ -11,6 +11,7 @@ import subprocess import pandas as pd from os.path import isfile from collections import Counter, defaultdict import qiime2 def _get_default_unassignable_label(): Loading Loading @@ -40,7 +41,7 @@ def _consensus_assignments( consensus = {'': ('', '')} result = pd.DataFrame.from_dict(consensus, 'index') result.index.name = 'Feature ID' result.columns = ['Taxon', 'Confidence'] result.columns = ['Taxon', 'Consensus'] return result Loading Loading @@ -242,3 +243,9 @@ def _compute_consensus_annotation(annotations, min_consensus, consensus_fraction_result = 1.0 return annotation, consensus_fraction_result def _annotate_method(taxa, method): taxa = taxa.view(pd.DataFrame) taxa['Method'] = method return qiime2.Artifact.import_data('FeatureData[Taxonomy]', taxa)
q2_feature_classifier/_skl.py +3 −3 Original line number Diff line number Diff line Loading @@ -9,7 +9,7 @@ from itertools import islice, repeat from copy import deepcopy from sklearn.externals.joblib import Parallel, delayed from joblib import Parallel, delayed _specific_fitters = [ ['naive_bayes', Loading Loading @@ -38,7 +38,7 @@ def _extract_reads(reads): def predict(reads, pipeline, separator=';', chunk_size=262144, n_jobs=1, pre_dispatch='2*n_jobs', confidence=-1.): pre_dispatch='2*n_jobs', confidence='disable'): return (m for c in Parallel(n_jobs=n_jobs, batch_size=1, pre_dispatch=pre_dispatch) (delayed(_predict_chunk)(pipeline, separator, confidence, chunk) Loading @@ -46,7 +46,7 @@ def predict(reads, pipeline, separator=';', chunk_size=262144, n_jobs=1, def _predict_chunk(pipeline, separator, confidence, chunk): if confidence < 0.: if confidence == 'disable': return _predict_chunk_without_conf(pipeline, chunk) else: return _predict_chunk_with_conf(pipeline, separator, confidence, chunk) Loading
q2_feature_classifier/_taxonomic_classifier.py +1 −1 Original line number Diff line number Diff line Loading @@ -11,7 +11,7 @@ import tarfile import os import sklearn from sklearn.externals import joblib import joblib from sklearn.pipeline import Pipeline import qiime2.plugin import qiime2.plugin.model as model Loading
q2_feature_classifier/_version.py +3 −3 Original line number Diff line number Diff line Loading @@ -23,9 +23,9 @@ def get_keywords(): # setup.py/versioneer.py will grep for the variable names, so they must # each be defined on a line of their own. _version.py will just call # get_keywords(). git_refnames = " (tag: 2019.4.0)" git_full = "e2ba97ea232a02f4c489b51ff0481583d394a339" git_date = "2019-05-03 04:14:49 +0000" git_refnames = " (tag: 2019.7.0)" git_full = "bc7ed3a741779ccb32114a229af65cc8c1510743" git_date = "2019-07-30 18:15:57 +0000" keywords = {"refnames": git_refnames, "full": git_full, "date": git_date} return keywords Loading