Exemplo n.º 1
0
# Copyright (c) 2016-2017, 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

from ..plugin_setup import plugin
from ..sample_data import SampleData
from . import (SingleLanePerSampleSingleEndFastqDirFmt,
               SingleLanePerSamplePairedEndFastqDirFmt)


SequencesWithQuality = SemanticType(
    'SequencesWithQuality', variant_of=SampleData.field['type'])
PairedEndSequencesWithQuality = SemanticType(
    'PairedEndSequencesWithQuality', variant_of=SampleData.field['type'])

plugin.register_semantic_types(SequencesWithQuality,
                               PairedEndSequencesWithQuality)

plugin.register_semantic_type_to_format(
    SampleData[SequencesWithQuality],
    artifact_format=SingleLanePerSampleSingleEndFastqDirFmt
)
plugin.register_semantic_type_to_format(
    SampleData[PairedEndSequencesWithQuality],
    artifact_format=SingleLanePerSamplePairedEndFastqDirFmt
)
Exemplo n.º 2
0
from qiime2.plugin import SemanticType, model
from q2_types.sample_data import SampleData

SongbirdStats = SemanticType('SongbirdStats',
                             variant_of=SampleData.field['type'])


class SongbirdStatsFormat(model.TextFileFormat):
    def validate(*args):
        pass


SongbirdStatsDirFmt = model.SingleFileDirectoryFormat('SongbirdStatsDirFmt',
                                                      'stats.tsv',
                                                      SongbirdStatsFormat)
Exemplo n.º 3
0
# ----------------------------------------------------------------------------
# Copyright (c) 2016-2018, 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, model
from q2_types.sample_data import SampleData

DADA2Stats = SemanticType('DADA2Stats', variant_of=SampleData.field['type'])


class DADA2StatsFormat(model.TextFileFormat):
    def validate(*args):
        pass


DADA2StatsDirFmt = model.SingleFileDirectoryFormat('DADA2StatsDirFmt',
                                                   'stats.tsv',
                                                   DADA2StatsFormat)
Exemplo n.º 4
0
from qiime2.plugin import SemanticType, model
from q2_types.sample_data import SampleData

StrayPosterior = SemanticType('StrayPosterior',
                              variant_of=SampleData.field['type'])


class StrayPosteriorFormat(model.TextFileFormat):
    def validate(*args):
        pass


StrayPosteriorDirFmt = model.SingleFileDirectoryFormat('StrayPosteriorDirFmt',
                                                       'posterior.tsv',
                                                       StrayPosteriorFormat)
Exemplo n.º 5
0
# ----------------------------------------------------------------------------
# Copyright (c) 2016-2017, 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

QualityFilterStats = SemanticType('QualityFilterStats')
Exemplo n.º 6
0
# ----------------------------------------------------------------------------
# Copyright (c) 2016-2021, 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

DeblurStats = SemanticType('DeblurStats')
Exemplo n.º 7
0
from qiime2.plugin import SemanticType, model
from q2_types.feature_data import FeatureData

Conditional = SemanticType('Conditional', variant_of=FeatureData.field['type'])


class ConditionalFormat(model.TextFileFormat):
    def validate(*args):
        pass


ConditionalDirFmt = model.SingleFileDirectoryFormat('ConditionalDirFmt',
                                                    'conditionals.tsv',
                                                    ConditionalFormat)
Exemplo n.º 8
0
from qiime2.plugin import SemanticType
from q2_types.feature_data import FeatureData
from q2_types.feature_table import FeatureTable

TaxIdLineage = SemanticType('TaxIdLineage')

LinkedSpeciesPeptide = SemanticType('LinkedSpeciesPeptide')

SequenceNames = SemanticType('SequenceNames')

ProteinSequence = SemanticType('ProteinSequence',
                               variant_of=FeatureData.field['type'])

EnrichedPeptide = SemanticType('EnrichedPeptide')

DeconvolutedSpecies = SemanticType('DeconvolutedSpecies',
                                   variant_of=FeatureTable.field['content'])

SpeciesAssignMap = SemanticType('SpeciesAssignMap')
Exemplo n.º 9
0
import numpy as np
from q2_classo.CLasso import *
from qiime2.plugin import (SemanticType, Plugin, Int, Float, Range, Metadata,
                           Str, Bool, Choices, MetadataColumn, Categorical,
                           List, Citations, TypeMatch, Numeric)
from q2_types.feature_table import FeatureTable, Composition
from q2_types.feature_data import FeatureData

Beta_type = SemanticType(
    'Beta_type'
)  # array of size Npath x d with the solution beta for each lambda on each row
Sigma_type = SemanticType(
    'Sigma_type'
)  # array of size Npath with the solution sigma for each lambda when the formulation of the problem is R2 or R4
Lambda_type = SemanticType(
    'Lambda_type'
)  # array of size Npath with the lambdas (real lambdas, not divided by lambda_max) for which the solution is computed
Method_type = SemanticType(
    'Method_type'
)  # name of the numerical method that has been used. It can be 'Path-Alg', 'P-PDS' , 'PF-PDS' or 'DR'
Formulation_type = SemanticType(
    'Formulation_type')  # can be 'R1' ; 'R2' ; 'R3' ; 'R4' ; 'C1' ; 'C2'
Time_type = SemanticType('Time_type')  # running time of this action

Path_type = SemanticType('Path_type',
                         field_names=[
                             'betas', 'sigmas', 'lambdas', 'method',
                             'formulation', 'time'
                         ],
                         field_members={
                             'betas': Beta_type,
Exemplo n.º 10
0
# ----------------------------------------------------------------------------
# Copyright (c) 2018-2020, 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

# Technically there is a bit more to this, for instance the ref sequences may
# or may not be present in an index, or may be the only thing in an index,
# but let's not worry about that just yet.
Bowtie2Index = SemanticType('Bowtie2Index')
Exemplo n.º 11
0
from qiime2.plugin import SemanticType

from q2_types.tree import Phylogeny

Chain = SemanticType('Chain', field_names='posterior')
BEAST = SemanticType('BEAST', variant_of=Chain.field['posterior'])
MCC = SemanticType('MCC', variant_of=Phylogeny.field['type'])
Exemplo n.º 12
0
# ----------------------------------------------------------------------------
# Copyright (c) 2016-2020, 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

from ..plugin_setup import plugin
from . import AlphaDiversityDirectoryFormat


SampleData = SemanticType('SampleData', field_names='type')

AlphaDiversity = SemanticType('AlphaDiversity',
                              variant_of=SampleData.field['type'])

plugin.register_semantic_types(SampleData, AlphaDiversity)

plugin.register_semantic_type_to_format(
    SampleData[AlphaDiversity],
    artifact_format=AlphaDiversityDirectoryFormat
)
Exemplo n.º 13
0
# ----------------------------------------------------------------------------
# Copyright (c) 2016-2019, 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

from ..plugin_setup import plugin
from . import OrdinationDirectoryFormat

PCoAResults = SemanticType('PCoAResults')

plugin.register_semantic_types(PCoAResults)
plugin.register_semantic_type_to_format(
    PCoAResults, artifact_format=OrdinationDirectoryFormat)
Exemplo n.º 14
0
# ----------------------------------------------------------------------------
# Copyright (c) 2016-2018, 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


UchimeStats = SemanticType('UchimeStats')
Exemplo n.º 15
0
# ----------------------------------------------------------------------------
# Copyright (c) 2016-2017, 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


NinjaOpsDB = SemanticType('NinjaOpsDB')
Exemplo n.º 16
0
citations = Citations.load('citations.bib', package='q2_sample_classifier')

plugin = Plugin(
    name='sample-classifier',
    version=q2_sample_classifier.__version__,
    website="https://github.com/qiime2/q2-sample-classifier",
    package='q2_sample_classifier',
    description=(
        'This QIIME 2 plugin supports methods for supervised classification '
        'and regression of sample metadata, and other supervised machine '
        'learning methods.'),
    short_description=(
        'Plugin for machine learning prediction of sample metadata.'),
    citations=[citations['Bokulich306167']])

BooleanSeries = SemanticType('BooleanSeries',
                             variant_of=SampleData.field['type'])


class BooleanSeriesFormat(model.TextFileFormat):
    def sniff(self):
        with self.open() as fh:
            line = fh.readline()
            for line, _ in zip(fh, range(5)):
                cells = line.strip().split('\t')
                if len(cells) != 2 or str(cells[1]) not in ('True', 'False'):
                    return False
            return True


BooleanSeriesDirectoryFormat = model.SingleFileDirectoryFormat(
    'BooleanSeriesDirectoryFormat', 'outliers.tsv', BooleanSeriesFormat)
Exemplo n.º 17
0
# ----------------------------------------------------------------------------
# Copyright (c) 2016-2021, 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

from ..plugin_setup import plugin
from . import BIOMV210DirFmt

FeatureTable = SemanticType('FeatureTable', field_names='content')

Frequency = SemanticType('Frequency', variant_of=FeatureTable.field['content'])

RelativeFrequency = SemanticType('RelativeFrequency',
                                 variant_of=FeatureTable.field['content'])

PresenceAbsence = SemanticType('PresenceAbsence',
                               variant_of=FeatureTable.field['content'])

Composition = SemanticType('Composition',
                           variant_of=FeatureTable.field['content'])

Balance = SemanticType('Balance', variant_of=FeatureTable.field['content'])

PercentileNormalized = SemanticType('PercentileNormalized',
                                    variant_of=FeatureTable.field['content'])
Exemplo n.º 18
0
# ----------------------------------------------------------------------------
# Copyright (c) 2017-2018, 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
from q2_types.sample_data import SampleData

FirstDifferences = SemanticType('FirstDifferences',
                                variant_of=SampleData.field['type'])
Exemplo n.º 19
0
# ----------------------------------------------------------------------------
# Copyright (c) 2017-2019, 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
from q2_types.sample_data import SampleData
from q2_types.feature_data import FeatureData

ClassifierPredictions = SemanticType('ClassifierPredictions',
                                     variant_of=SampleData.field['type'])
RegressorPredictions = SemanticType('RegressorPredictions',
                                    variant_of=SampleData.field['type'])
SampleEstimator = SemanticType('SampleEstimator', field_names='type')
Classifier = SemanticType('Classifier',
                          variant_of=SampleEstimator.field['type'])
Regressor = SemanticType('Regressor', variant_of=SampleEstimator.field['type'])
BooleanSeries = SemanticType('BooleanSeries',
                             variant_of=SampleData.field['type'])
Importance = SemanticType('Importance', variant_of=FeatureData.field['type'])
Probabilities = SemanticType('Probabilities',
                             variant_of=SampleData.field['type'])
Exemplo n.º 20
0
# Copyright (c) 2016-2018, 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

from ..plugin_setup import plugin
from . import (TSVTaxonomyDirectoryFormat, DNASequencesDirectoryFormat,
               PairedDNASequencesDirectoryFormat,
               AlignedDNASequencesDirectoryFormat)


FeatureData = SemanticType('FeatureData', field_names='type')

Taxonomy = SemanticType('Taxonomy', variant_of=FeatureData.field['type'])

Sequence = SemanticType('Sequence', variant_of=FeatureData.field['type'])

PairedEndSequence = SemanticType('PairedEndSequence',
                                 variant_of=FeatureData.field['type'])

AlignedSequence = SemanticType('AlignedSequence',
                               variant_of=FeatureData.field['type'])

plugin.register_semantic_types(FeatureData, Taxonomy, Sequence,
                               PairedEndSequence, AlignedSequence)

plugin.register_semantic_type_to_format(
Exemplo n.º 21
0
# ----------------------------------------------------------------------------
# Copyright (c) 2016-2019, 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

# TODO: migrate these to q2-types someday
RawSequences = SemanticType('RawSequences')

EMPSingleEndSequences = SemanticType('EMPSingleEndSequences')

EMPPairedEndSequences = SemanticType('EMPPairedEndSequences')

ErrorCorrectionDetails = SemanticType('ErrorCorrectionDetails')
Exemplo n.º 22
0
# ----------------------------------------------------------------------------
# Copyright (c) 2017-2018, Ben Kaehler.
#
# 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

PrecalculatedNearestNeighbors = SemanticType('PrecalculatedNearestNeighbors')
Exemplo n.º 23
0
# ----------------------------------------------------------------------------
# Copyright (c) 2016-2020, 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

from ..plugin_setup import plugin
from . import (MultiplexedSingleEndBarcodeInSequenceDirFmt,
               MultiplexedPairedEndBarcodeInSequenceDirFmt)


MultiplexedSingleEndBarcodeInSequence = \
    SemanticType('MultiplexedSingleEndBarcodeInSequence')
MultiplexedPairedEndBarcodeInSequence = \
    SemanticType('MultiplexedPairedEndBarcodeInSequence')

plugin.register_semantic_types(MultiplexedSingleEndBarcodeInSequence,
                               MultiplexedPairedEndBarcodeInSequence)

plugin.register_semantic_type_to_format(
    MultiplexedSingleEndBarcodeInSequence,
    artifact_format=MultiplexedSingleEndBarcodeInSequenceDirFmt)
plugin.register_semantic_type_to_format(
    MultiplexedPairedEndBarcodeInSequence,
    artifact_format=MultiplexedPairedEndBarcodeInSequenceDirFmt,
)
Exemplo n.º 24
0
# ----------------------------------------------------------------------------
# Copyright (c) 2021, 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
from q2_types.feature_data import FeatureData

SILVATaxonomy = SemanticType('SILVATaxonomy',
                             variant_of=FeatureData.field['type'])
SILVATaxidMap = SemanticType('SILVATaxidMap',
                             variant_of=FeatureData.field['type'])

RNASequence = SemanticType('RNASequence', variant_of=FeatureData.field['type'])
Exemplo n.º 25
0
# ----------------------------------------------------------------------------
# Copyright (c) 2020, 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, model

EchoOutput = SemanticType('EchoOutput')


class EchoOutputFmt(model.TextFileFormat):
    def validate(self, *args):
        pass


EchoOutputDirFmt = model.SingleFileDirectoryFormat('EchoOutputDirFmt',
                                                   'echo.txt', EchoOutputFmt)
Exemplo n.º 26
0
# ----------------------------------------------------------------------------
# Copyright (c) 2016-2021, 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

from ..plugin_setup import plugin
from . import DistanceMatrixDirectoryFormat

DistanceMatrix = SemanticType('DistanceMatrix')

plugin.register_semantic_types(DistanceMatrix)
plugin.register_semantic_type_to_format(
    DistanceMatrix, artifact_format=DistanceMatrixDirectoryFormat)
Exemplo n.º 27
0
# The full license is in the file LICENSE, distributed with this software.
# ----------------------------------------------------------------------------

from qiime2.plugin import SemanticType

from ..plugin_setup import plugin
from . import (TSVTaxonomyDirectoryFormat, DNASequencesDirectoryFormat,
               PairedDNASequencesDirectoryFormat,
               AlignedDNASequencesDirectoryFormat,
               DifferentialDirectoryFormat, ProteinSequencesDirectoryFormat,
               AlignedProteinSequencesDirectoryFormat,
               RNASequencesDirectoryFormat, AlignedRNASequencesDirectoryFormat,
               PairedRNASequencesDirectoryFormat)


FeatureData = SemanticType('FeatureData', field_names='type')

Taxonomy = SemanticType('Taxonomy', variant_of=FeatureData.field['type'])

Sequence = SemanticType('Sequence', variant_of=FeatureData.field['type'])

RNASequence = SemanticType('RNASequence', variant_of=FeatureData.field['type'])

PairedEndSequence = SemanticType('PairedEndSequence',
                                 variant_of=FeatureData.field['type'])

PairedEndRNASequence = SemanticType('PairedEndRNASequence',
                                    variant_of=FeatureData.field['type'])

AlignedSequence = SemanticType('AlignedSequence',
                               variant_of=FeatureData.field['type'])
Exemplo n.º 28
0
# ----------------------------------------------------------------------------
# Copyright (c) 2020, 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
from q2_types.sample_data import SampleData

Coordinates = SemanticType('Coordinates', variant_of=SampleData.field['type'])
QuadTree = SemanticType('QuadTree', variant_of=SampleData.field['type'])
Exemplo n.º 29
0
from qiime2.plugin import SemanticType, model
from q2_types.feature_data import FeatureData

Factors = SemanticType('Factors', variant_of=FeatureData.field['type'])


class FactorsFormat(model.TextFileFormat):
    # Update with required formatting
    def validate(*args):
        pass


FactorsDirFmt = model.SingleFileDirectoryFormat('FactorsDirFmt', 'factors.tsv',
                                                FactorsFormat)
Exemplo n.º 30
0
# ----------------------------------------------------------------------------
# Copyright (c) 2016-2020, 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

Placements = SemanticType('Placements')
SeppReferenceDatabase = SemanticType('SeppReferenceDatabase')