# Path: q2_types/feature_data/_format.py
# class TaxonomyFormat(model.TextFileFormat):
# class HeaderlessTSVTaxonomyFormat(TaxonomyFormat):
# class TSVTaxonomyFormat(model.TextFileFormat):
# class FASTAFormat(model.TextFileFormat):
# class AlignedFASTAFormatMixin:
# class DNAFASTAFormat(FASTAFormat):
# class RNAFASTAFormat(FASTAFormat):
# class PairedDNASequencesDirectoryFormat(model.DirectoryFormat):
# class PairedRNASequencesDirectoryFormat(model.DirectoryFormat):
# class AlignedDNAFASTAFormat(AlignedFASTAFormatMixin, DNAFASTAFormat):
# class AlignedRNAFASTAFormat(AlignedFASTAFormatMixin, RNAFASTAFormat):
# class DifferentialFormat(model.TextFileFormat):
# class ProteinFASTAFormat(FASTAFormat):
# class AlignedProteinFASTAFormat(AlignedFASTAFormatMixin, ProteinFASTAFormat):
# class BLAST6Format(model.TextFileFormat):
#     def sniff(self):
#     def _check_n_records(self, n=None):
#     def _validate_(self, level):
#     def __init__(self, *args, **kwargs):
#     def _validate_(self, level):
#     def _validate_FASTA(self, level, FASTAValidator=None, ValidationSet=None):
#     def _turn_into_alignment(self):
#     def _validate_line_lengths(
#             self, seq_len, prev_seq_len, prev_seq_start_line):
#     def __init__(self, *args, **kwargs):
#     def __init__(self, *args, **kwargs):
#     def __init__(self, *args, **kwargs):
#     def __init__(self, *args, **kwargs):
# def _construct_validator_from_alphabet(alphabet_str):
#     def validate(self, *args):
#     def __init__(self, *args, **kwargs):
#     def __init__(self, *args, **kwargs):
#     def validate(self, *args):
#     HEADER = ['Feature ID', 'Taxon']


import os
import os.path
import shutil
import unittest
from q2_types.feature_data import (
    TaxonomyFormat, TaxonomyDirectoryFormat, HeaderlessTSVTaxonomyFormat,
    HeaderlessTSVTaxonomyDirectoryFormat, TSVTaxonomyFormat,
    TSVTaxonomyDirectoryFormat, DNAFASTAFormat, DNASequencesDirectoryFormat,
    PairedDNASequencesDirectoryFormat, AlignedDNAFASTAFormat,
    AlignedDNASequencesDirectoryFormat, DifferentialDirectoryFormat,
    ProteinFASTAFormat, AlignedProteinFASTAFormat, FASTAFormat,
    AlignedProteinSequencesDirectoryFormat, ProteinSequencesDirectoryFormat,
    RNAFASTAFormat, RNASequencesDirectoryFormat, AlignedRNAFASTAFormat,
    AlignedRNASequencesDirectoryFormat, BLAST6DirectoryFormat
)
from qiime2.plugin.testing import TestPluginBase
from qiime2.plugin import ValidationError
# 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.
# ----------------------------------------------------------------------------




class TestTaxonomyFormats(TestPluginBase):
    package = 'q2_types.feature_data.tests'

    def test_taxonomy_format_validate_positive(self):
        filenames = ['headerless.tsv', '2-column.tsv', '3-column.tsv',
                     'valid-but-messy.tsv', 'many-rows.tsv']
        filepaths = [self.get_data_path(os.path.join('taxonomy', filename))
                     for filename in filenames]

        for filepath in filepaths:
            format = TaxonomyFormat(filepath, mode='r')

            format.validate()

    def test_taxonomy_format_validate_negative(self):
        filenames = ['empty', 'blanks', '1-column.tsv']
        filepaths = [self.get_data_path(os.path.join('taxonomy', filename))
                     for filename in filenames]

        for filepath in filepaths:

# Path: q2_types/feature_data/_format.py
# class TaxonomyFormat(model.TextFileFormat):
# class HeaderlessTSVTaxonomyFormat(TaxonomyFormat):
# class TSVTaxonomyFormat(model.TextFileFormat):
# class FASTAFormat(model.TextFileFormat):
# class AlignedFASTAFormatMixin:
# class DNAFASTAFormat(FASTAFormat):
# class RNAFASTAFormat(FASTAFormat):
# class PairedDNASequencesDirectoryFormat(model.DirectoryFormat):
# class PairedRNASequencesDirectoryFormat(model.DirectoryFormat):
# class AlignedDNAFASTAFormat(AlignedFASTAFormatMixin, DNAFASTAFormat):
# class AlignedRNAFASTAFormat(AlignedFASTAFormatMixin, RNAFASTAFormat):
# class DifferentialFormat(model.TextFileFormat):
# class ProteinFASTAFormat(FASTAFormat):
# class AlignedProteinFASTAFormat(AlignedFASTAFormatMixin, ProteinFASTAFormat):
# class BLAST6Format(model.TextFileFormat):
#     def sniff(self):
#     def _check_n_records(self, n=None):
#     def _validate_(self, level):
#     def __init__(self, *args, **kwargs):
#     def _validate_(self, level):
#     def _validate_FASTA(self, level, FASTAValidator=None, ValidationSet=None):
#     def _turn_into_alignment(self):
#     def _validate_line_lengths(
#             self, seq_len, prev_seq_len, prev_seq_start_line):
#     def __init__(self, *args, **kwargs):
#     def __init__(self, *args, **kwargs):
#     def __init__(self, *args, **kwargs):
#     def __init__(self, *args, **kwargs):
# def _construct_validator_from_alphabet(alphabet_str):
#     def validate(self, *args):
#     def __init__(self, *args, **kwargs):
#     def __init__(self, *args, **kwargs):
#     def validate(self, *args):
#     HEADER = ['Feature ID', 'Taxon']


# Path: q2_types/feature_data/tests/test_format.py
import os
import os.path
import shutil
import unittest
from q2_types.feature_data import (
    TaxonomyFormat, TaxonomyDirectoryFormat, HeaderlessTSVTaxonomyFormat,
    HeaderlessTSVTaxonomyDirectoryFormat, TSVTaxonomyFormat,
    TSVTaxonomyDirectoryFormat, DNAFASTAFormat, DNASequencesDirectoryFormat,
    PairedDNASequencesDirectoryFormat, AlignedDNAFASTAFormat,
    AlignedDNASequencesDirectoryFormat, DifferentialDirectoryFormat,
    ProteinFASTAFormat, AlignedProteinFASTAFormat, FASTAFormat,
    AlignedProteinSequencesDirectoryFormat, ProteinSequencesDirectoryFormat,
    RNAFASTAFormat, RNASequencesDirectoryFormat, AlignedRNAFASTAFormat,
    AlignedRNASequencesDirectoryFormat, BLAST6DirectoryFormat
)
from qiime2.plugin.testing import TestPluginBase
from qiime2.plugin import ValidationError

# 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.
# ----------------------------------------------------------------------------




class TestTaxonomyFormats(TestPluginBase):
    package = 'q2_types.feature_data.tests'

    def test_taxonomy_format_validate_positive(self):
        filenames = ['headerless.tsv', '2-column.tsv', '3-column.tsv',
                     'valid-but-messy.tsv', 'many-rows.tsv']
        filepaths = [self.get_data_path(os.path.join('taxonomy', filename))
                     for filename in filenames]

        for filepath in filepaths:
            format = TaxonomyFormat(filepath, mode='r')

            format.validate()

    def test_taxonomy_format_validate_negative(self):
        filenames = ['empty', 'blanks', '1-column.tsv']
        filepaths = [self.get_data_path(os.path.join('taxonomy', filename))
                     for filename in filenames]

        for filepath in filepaths:

            format = TaxonomyFormat(filepath, mode='r')