# 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
        filepath = self.get_data_path('not-rna-sequences')
        format = RNAFASTAFormat(filepath, mode='r')

        with self.assertRaisesRegex(ValidationError, 'RNAFASTA'):
            format.validate()

    def test_rna_fasta_format_consecutive_IDs(self):
        filepath = self.get_data_path('dna-sequences-consecutive-ids.fasta')
        format = RNAFASTAFormat(filepath, mode='r')

        with self.assertRaisesRegex(
                ValidationError, 'consecutive descriptions.*1'):
            format.validate()

    def test_rna_fasta_format_missing_initial_ID(self):
        filepath = self.get_data_path('dna-sequences-first-line-not-id.fasta')
        format = RNAFASTAFormat(filepath, mode='r')

        with self.assertRaisesRegex(ValidationError, 'First line'):
            format.validate()

    def test_rna_fasta_format_corrupt_characters(self):
        filepath = self.get_data_path('dna-sequences-corrupt-characters.fasta')
        format = RNAFASTAFormat(filepath, mode='r')

        with self.assertRaisesRegex(ValidationError, 'utf-8.*2'):
            format.validate()

    def test_rna_fasta_format_bom_fails(self):
        filepath = self.get_data_path('dna-with-bom-fails.fasta')

# 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

        filepath = self.get_data_path('not-rna-sequences')
        format = RNAFASTAFormat(filepath, mode='r')

        with self.assertRaisesRegex(ValidationError, 'RNAFASTA'):
            format.validate()

    def test_rna_fasta_format_consecutive_IDs(self):
        filepath = self.get_data_path('dna-sequences-consecutive-ids.fasta')
        format = RNAFASTAFormat(filepath, mode='r')

        with self.assertRaisesRegex(
                ValidationError, 'consecutive descriptions.*1'):
            format.validate()

    def test_rna_fasta_format_missing_initial_ID(self):
        filepath = self.get_data_path('dna-sequences-first-line-not-id.fasta')
        format = RNAFASTAFormat(filepath, mode='r')

        with self.assertRaisesRegex(ValidationError, 'First line'):
            format.validate()

    def test_rna_fasta_format_corrupt_characters(self):
        filepath = self.get_data_path('dna-sequences-corrupt-characters.fasta')
        format = RNAFASTAFormat(filepath, mode='r')

        with self.assertRaisesRegex(ValidationError, 'utf-8.*2'):
            format.validate()

    def test_rna_fasta_format_bom_fails(self):
        filepath = self.get_data_path('dna-with-bom-fails.fasta')

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