From ce12214c8b98189fc147522dc0167fb294f76e47 Mon Sep 17 00:00:00 2001 From: Santiago Castro Dau <54123712+Sann5@users.noreply.github.com> Date: Wed, 1 May 2024 23:29:24 +0200 Subject: [PATCH 1/5] MAINT: typo in `feature_data_mag/__init__.py` (#313) --- q2_types/feature_data_mag/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/q2_types/feature_data_mag/__init__.py b/q2_types/feature_data_mag/__init__.py index eb49d208..3701e8bc 100644 --- a/q2_types/feature_data_mag/__init__.py +++ b/q2_types/feature_data_mag/__init__.py @@ -22,6 +22,6 @@ 'OrthologAnnotationDirFmt', 'OrthologFileFmt', 'Contig' ] -importlib.import_module('q2_types.feature_data._format') -importlib.import_module('q2_types.feature_data._transformer') -importlib.import_module('q2_types.feature_data._type') +importlib.import_module('q2_types.feature_data_mag._format') +importlib.import_module('q2_types.feature_data_mag._transformer') +importlib.import_module('q2_types.feature_data_mag._type') From 57139654ad00ec6185d4e6ca2da89d479884537a Mon Sep 17 00:00:00 2001 From: Anthony Simard Date: Wed, 1 May 2024 20:43:57 -0700 Subject: [PATCH 2/5] MAINT: Updates for new pandas API (#323) --- q2_types/feature_data/_transformer.py | 2 +- q2_types/feature_data_mag/_transformer.py | 2 +- q2_types/genome_data/_transformer.py | 2 +- q2_types/sample_data/tests/test_transformer.py | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/q2_types/feature_data/_transformer.py b/q2_types/feature_data/_transformer.py index f49f89ed..c5af41ca 100644 --- a/q2_types/feature_data/_transformer.py +++ b/q2_types/feature_data/_transformer.py @@ -255,7 +255,7 @@ def _fastaformats_to_metadata(ff, constructor=skbio.DNA, lowercase=False): def _series_to_fasta_format(ff, data, sequence_type="DNA", lowercase=False): with ff.open() as f: - for id_, seq in data.iteritems(): + for id_, seq in data.items(): if sequence_type == "protein": sequence = skbio.Protein(seq, metadata={'id': id_}, lowercase=lowercase) diff --git a/q2_types/feature_data_mag/_transformer.py b/q2_types/feature_data_mag/_transformer.py index 18d68fda..cfb10db7 100644 --- a/q2_types/feature_data_mag/_transformer.py +++ b/q2_types/feature_data_mag/_transformer.py @@ -37,7 +37,7 @@ def _get_filename(full_path): def _series_to_fasta(series, ff, seq_type='DNA'): fp = os.path.join(str(ff), f'{series.name}.fasta') with open(fp, 'w') as fh: - for id_, seq in series.iteritems(): + for id_, seq in series.items(): if seq: sequence = CONSTRUCTORS[seq_type](seq, metadata={'id': id_}) skbio.io.write(sequence, format='fasta', into=fh) diff --git a/q2_types/genome_data/_transformer.py b/q2_types/genome_data/_transformer.py index 504e8002..1d449ed9 100644 --- a/q2_types/genome_data/_transformer.py +++ b/q2_types/genome_data/_transformer.py @@ -42,7 +42,7 @@ def _8(ortholog_file: OrthologFileFmt) -> pd.DataFrame: def _series_to_fasta(series, ff, seq_type='DNA'): fp = os.path.join(ff.path, f'{series.name}.fasta') with open(fp, 'w') as fh: - for id_, seq in series.iteritems(): + for id_, seq in series.items(): if seq: sequence = CONSTRUCTORS[seq_type](seq, metadata={'id': id_}) skbio.io.write(sequence, format='fasta', into=fh) diff --git a/q2_types/sample_data/tests/test_transformer.py b/q2_types/sample_data/tests/test_transformer.py index b0f3e1bf..17c67246 100644 --- a/q2_types/sample_data/tests/test_transformer.py +++ b/q2_types/sample_data/tests/test_transformer.py @@ -27,9 +27,9 @@ def test_pd_series_to_alpha_diversity_format(self): obs = transformer(exp) - # Squeeze equals true to return series instead of dataframe - obs = pd.read_csv(str(obs), sep='\t', header=0, index_col=0, - squeeze=True) + obs = pd.read_csv(str(obs), sep='\t', header=0, index_col=0) + # Squeeze into series instead of dataframe + obs = obs.squeeze('columns') assert_series_equal(exp, obs) From 28831600b88b5f1783ec4706f338675269b5021f Mon Sep 17 00:00:00 2001 From: Santiago Castro Dau <54123712+Sann5@users.noreply.github.com> Date: Thu, 2 May 2024 20:13:08 +0200 Subject: [PATCH 3/5] MAINT: adjust regex for genome data semantic types (#322) --- q2_types/genome_data/_format.py | 12 ++-- .../data/genes-with-prefix/ABC_123.1_genes.fa | 9 --- .../data/genes-with-prefix/BCD_234.2_genes.fa | 6 -- .../wrongprefix1genes.fa | 9 --- .../wrongprefix2genes.fa | 6 -- .../{genes-with-suffix => genes}/genes1.fa | 0 .../{genes-with-suffix => genes}/genes2.fa | 0 .../data/loci-with-prefix/ABC_123.1_loci.gff | 10 ---- .../data/loci-with-prefix/BCD_234.2_loci.gff | 5 -- .../wrongprefix1loci.gff | 10 ---- .../wrongprefix2loci.gff | 5 -- .../data/{loci-with-suffix => loci}/loci1.gff | 0 .../data/{loci-with-suffix => loci}/loci2.gff | 0 .../ABC_123.1_proteins.faa | 6 -- .../BCD_234.2_proteins.faa | 6 -- .../wrongprefix1proteins.faa | 6 -- .../wrongprefix2proteins.faa | 6 -- .../proteins1.faa | 0 .../proteins2.faa | 0 q2_types/genome_data/tests/test_format.py | 56 ++----------------- .../genome_data/tests/test_transformer.py | 12 ++-- setup.py | 13 ++--- 22 files changed, 22 insertions(+), 155 deletions(-) delete mode 100644 q2_types/genome_data/tests/data/genes-with-prefix/ABC_123.1_genes.fa delete mode 100644 q2_types/genome_data/tests/data/genes-with-prefix/BCD_234.2_genes.fa delete mode 100644 q2_types/genome_data/tests/data/genes-with-wrong-prefix/wrongprefix1genes.fa delete mode 100644 q2_types/genome_data/tests/data/genes-with-wrong-prefix/wrongprefix2genes.fa rename q2_types/genome_data/tests/data/{genes-with-suffix => genes}/genes1.fa (100%) rename q2_types/genome_data/tests/data/{genes-with-suffix => genes}/genes2.fa (100%) delete mode 100644 q2_types/genome_data/tests/data/loci-with-prefix/ABC_123.1_loci.gff delete mode 100644 q2_types/genome_data/tests/data/loci-with-prefix/BCD_234.2_loci.gff delete mode 100644 q2_types/genome_data/tests/data/loci-with-wrong-prefix/wrongprefix1loci.gff delete mode 100644 q2_types/genome_data/tests/data/loci-with-wrong-prefix/wrongprefix2loci.gff rename q2_types/genome_data/tests/data/{loci-with-suffix => loci}/loci1.gff (100%) rename q2_types/genome_data/tests/data/{loci-with-suffix => loci}/loci2.gff (100%) delete mode 100644 q2_types/genome_data/tests/data/proteins-with-prefix/ABC_123.1_proteins.faa delete mode 100644 q2_types/genome_data/tests/data/proteins-with-prefix/BCD_234.2_proteins.faa delete mode 100644 q2_types/genome_data/tests/data/proteins-with-wrong-prefix/wrongprefix1proteins.faa delete mode 100644 q2_types/genome_data/tests/data/proteins-with-wrong-prefix/wrongprefix2proteins.faa rename q2_types/genome_data/tests/data/{proteins-with-suffix => proteins}/proteins1.faa (100%) rename q2_types/genome_data/tests/data/{proteins-with-suffix => proteins}/proteins2.faa (100%) diff --git a/q2_types/genome_data/_format.py b/q2_types/genome_data/_format.py index 3c3a3081..06256d80 100644 --- a/q2_types/genome_data/_format.py +++ b/q2_types/genome_data/_format.py @@ -19,21 +19,21 @@ def _validate_(self, level): class GenesDirectoryFormat(model.DirectoryFormat): - genes = model.FileCollection(r'(.*\_)?genes[0-9]*\.(fa|fna|fasta)$', + genes = model.FileCollection(r'.+\.(fa|fna|fasta)$', format=DNAFASTAFormat) @genes.set_path_maker def genes_path_maker(self, genome_id): - return '%s_genes.fasta' % genome_id + return '%s.fasta' % genome_id class ProteinsDirectoryFormat(model.DirectoryFormat): - proteins = model.FileCollection(r'(.*\_)?proteins[0-9]*\.(fa|faa|fasta)$', + proteins = model.FileCollection(r'.+\.(fa|faa|fasta)$', format=ProteinFASTAFormat) @proteins.set_path_maker def proteins_path_maker(self, genome_id): - return '%s_proteins.fasta' % genome_id + return '%s.fasta' % genome_id class GFF3Format(model.TextFileFormat): @@ -160,12 +160,12 @@ def _validate_(self, level): class LociDirectoryFormat(model.DirectoryFormat): - loci = model.FileCollection(r'(.*\_)?loci[0-9]*\.gff$', + loci = model.FileCollection(r'.+\.gff$', format=GFF3Format) @loci.set_path_maker def loci_path_maker(self, genome_id): - return '%s_loci.gff' % genome_id + return '%s.gff' % genome_id plugin.register_formats( diff --git a/q2_types/genome_data/tests/data/genes-with-prefix/ABC_123.1_genes.fa b/q2_types/genome_data/tests/data/genes-with-prefix/ABC_123.1_genes.fa deleted file mode 100644 index e00ad6c1..00000000 --- a/q2_types/genome_data/tests/data/genes-with-prefix/ABC_123.1_genes.fa +++ /dev/null @@ -1,9 +0,0 @@ ->gene1 some_description1 -GGCAGATTCCCCCTAGACCCGCCCGCACCATGGTCAGGCATGCCCCTCCTCATCGCTGGGCACAGCCCAGAGGGT -ATAAACAGTGCTGGAGGC ->gene2 some_description2 -CCACTGCACTCACCGCACCCGGCCAATTTTTGTGTTTTTAGTAGAGACTAAATACCATATAGTGAACACCTAAGA -CGGGGGGCCTTGG ->gene3 some_description3 -GCACCCGGCCAATTTTTGTGTTTTTAGTAGAGAAGATTCCCCCTAGACCCGCCCGCTATAGTGAACACCTAAGAA -CTGGAGG diff --git a/q2_types/genome_data/tests/data/genes-with-prefix/BCD_234.2_genes.fa b/q2_types/genome_data/tests/data/genes-with-prefix/BCD_234.2_genes.fa deleted file mode 100644 index dd12c09a..00000000 --- a/q2_types/genome_data/tests/data/genes-with-prefix/BCD_234.2_genes.fa +++ /dev/null @@ -1,6 +0,0 @@ ->gene11 some_description11 -ATGGTCAGGCATGCCCCTCCTCATCGCTGGGCGGCAGATTCCCCCTAGACCCGCCCGCACCACAGCCCAGAGGGT -ATAAACAGTGCTGGAGGC ->gene12 some_description12 -AATACCATATAGTGAACACCTAACCACTGCACTCACCGCACCCGGCCAATTTTTGTGTTTTTAGTAGAGACTAGA -CGGGGGGCCTTGG diff --git a/q2_types/genome_data/tests/data/genes-with-wrong-prefix/wrongprefix1genes.fa b/q2_types/genome_data/tests/data/genes-with-wrong-prefix/wrongprefix1genes.fa deleted file mode 100644 index e00ad6c1..00000000 --- a/q2_types/genome_data/tests/data/genes-with-wrong-prefix/wrongprefix1genes.fa +++ /dev/null @@ -1,9 +0,0 @@ ->gene1 some_description1 -GGCAGATTCCCCCTAGACCCGCCCGCACCATGGTCAGGCATGCCCCTCCTCATCGCTGGGCACAGCCCAGAGGGT -ATAAACAGTGCTGGAGGC ->gene2 some_description2 -CCACTGCACTCACCGCACCCGGCCAATTTTTGTGTTTTTAGTAGAGACTAAATACCATATAGTGAACACCTAAGA -CGGGGGGCCTTGG ->gene3 some_description3 -GCACCCGGCCAATTTTTGTGTTTTTAGTAGAGAAGATTCCCCCTAGACCCGCCCGCTATAGTGAACACCTAAGAA -CTGGAGG diff --git a/q2_types/genome_data/tests/data/genes-with-wrong-prefix/wrongprefix2genes.fa b/q2_types/genome_data/tests/data/genes-with-wrong-prefix/wrongprefix2genes.fa deleted file mode 100644 index dd12c09a..00000000 --- a/q2_types/genome_data/tests/data/genes-with-wrong-prefix/wrongprefix2genes.fa +++ /dev/null @@ -1,6 +0,0 @@ ->gene11 some_description11 -ATGGTCAGGCATGCCCCTCCTCATCGCTGGGCGGCAGATTCCCCCTAGACCCGCCCGCACCACAGCCCAGAGGGT -ATAAACAGTGCTGGAGGC ->gene12 some_description12 -AATACCATATAGTGAACACCTAACCACTGCACTCACCGCACCCGGCCAATTTTTGTGTTTTTAGTAGAGACTAGA -CGGGGGGCCTTGG diff --git a/q2_types/genome_data/tests/data/genes-with-suffix/genes1.fa b/q2_types/genome_data/tests/data/genes/genes1.fa similarity index 100% rename from q2_types/genome_data/tests/data/genes-with-suffix/genes1.fa rename to q2_types/genome_data/tests/data/genes/genes1.fa diff --git a/q2_types/genome_data/tests/data/genes-with-suffix/genes2.fa b/q2_types/genome_data/tests/data/genes/genes2.fa similarity index 100% rename from q2_types/genome_data/tests/data/genes-with-suffix/genes2.fa rename to q2_types/genome_data/tests/data/genes/genes2.fa diff --git a/q2_types/genome_data/tests/data/loci-with-prefix/ABC_123.1_loci.gff b/q2_types/genome_data/tests/data/loci-with-prefix/ABC_123.1_loci.gff deleted file mode 100644 index 77304f5c..00000000 --- a/q2_types/genome_data/tests/data/loci-with-prefix/ABC_123.1_loci.gff +++ /dev/null @@ -1,10 +0,0 @@ -##gff-version 3 -#!gff-spec-version 1.21 -#!processor NCBI annotwriter -#!genome-build ASM19595v2 -#!genome-build-accession NCBI_Assembly:GCA_000195955.2 -##sequence-region AL123456.3 1 4411532 -##species https://www.ncbi.nlm.nih.gov/Taxonomy/Browser/wwwtax.cgi?id=83332 -AL123456.3 EMBL region 1 4411532 . + . ID=AL123456.3:1..4411532;Dbxref=taxon:83332;gbkey=Src;mol_type=genomic DNA;strain=H37Rv;type-material=type strain of Mycobacterium tuberculosis -AL123456.3 EMBL gene 1 1524 . + . ID=gene-Rv0001;Name=dnaA;gbkey=Gene;gene=dnaA;gene_biotype=protein_coding;locus_tag=Rv0001 -AL123456.3 EMBL CDS 1 1524 . + 0 ID=cds-CCP42723.1;Parent=gene-Rv0001;Dbxref=EnsemblGenomes-Gn:Rv0001,EnsemblGenomes-Tr:CCP42723,GOA:P9WNW3,InterPro:IPR001957,InterPro:IPR003593,InterPro:IPR010921,InterPro:IPR013159,InterPro:IPR013317,InterPro:IPR018312,InterPro:IPR020591,InterPro:IPR027417,NCBI_GP:CCP42723.1;Name=CCP42723.1;Note=Rv0001%2C (MT0001%2C MTV029.01%2C P49993)%2C len: 507 aa. dnaA%2C chromosomal replication initiator protein (see citations below)%2C equivalent to other Mycobacterial chromosomal replication initiator proteins. Also highly similar to others except in N-terminus e.g. Q9ZH75|DNAA_STRCH chromosomal replication initiator protein from Streptomyces chrysomallus (624 aa). Contains PS00017 ATP/GTP-binding site motif A (P-loop) and PS01008 DnaA protein signature. Belongs to the DnaA family. Note that the first base of this gene has been taken as base 1 of the Mycobacterium tuberculosis H37Rv genomic sequence.;experiment=EXISTENCE: identified in proteomics study;gbkey=CDS;gene=dnaA;inference=protein motif:PROSITE:PS01008;locus_tag=Rv0001;product=Chromosomal replication initiator protein DnaA;protein_id=CCP42723.1;transl_table=11 diff --git a/q2_types/genome_data/tests/data/loci-with-prefix/BCD_234.2_loci.gff b/q2_types/genome_data/tests/data/loci-with-prefix/BCD_234.2_loci.gff deleted file mode 100644 index ab7c1087..00000000 --- a/q2_types/genome_data/tests/data/loci-with-prefix/BCD_234.2_loci.gff +++ /dev/null @@ -1,5 +0,0 @@ -##gff-version 3 -# Sequence Data: seqnum=1;seqlen=1713046;seqhdr="k129_5480" -# Model Data: version=Prodigal.v2.6.3;run_type=Metagenomic;model="49|_Nostoc_azollae__0708|B|38.5|11|1";gc_cont=38.40;transl_table=11;uses_sd=1 -k129_5480 Prodigal_v2.6.3 CDS 3 1988 255.7 - 0 ID=1_1;partial=10;start_type=ATG;rbs_motif=GGA/GAG/AGG;rbs_spacer=5-10bp;gc_cont=0.442;conf=99.99;score=255.03;cscore=250.12;sscore=4.92;rscore=0.92;uscore=0.44;tscore=4.21; -k129_5480 Prodigal_v2.6.3 CDS 2150 2623 63.6 + 0 ID=1_2;partial=00;start_type=ATG;rbs_motif=GGA/GAG/AGG;rbs_spacer=5-10bp;gc_cont=0.426;conf=100.00;score=63.62;cscore=60.65;sscore=2.97;rscore=0.92;uscore=-2.15;tscore=4.21; diff --git a/q2_types/genome_data/tests/data/loci-with-wrong-prefix/wrongprefix1loci.gff b/q2_types/genome_data/tests/data/loci-with-wrong-prefix/wrongprefix1loci.gff deleted file mode 100644 index 77304f5c..00000000 --- a/q2_types/genome_data/tests/data/loci-with-wrong-prefix/wrongprefix1loci.gff +++ /dev/null @@ -1,10 +0,0 @@ -##gff-version 3 -#!gff-spec-version 1.21 -#!processor NCBI annotwriter -#!genome-build ASM19595v2 -#!genome-build-accession NCBI_Assembly:GCA_000195955.2 -##sequence-region AL123456.3 1 4411532 -##species https://www.ncbi.nlm.nih.gov/Taxonomy/Browser/wwwtax.cgi?id=83332 -AL123456.3 EMBL region 1 4411532 . + . ID=AL123456.3:1..4411532;Dbxref=taxon:83332;gbkey=Src;mol_type=genomic DNA;strain=H37Rv;type-material=type strain of Mycobacterium tuberculosis -AL123456.3 EMBL gene 1 1524 . + . ID=gene-Rv0001;Name=dnaA;gbkey=Gene;gene=dnaA;gene_biotype=protein_coding;locus_tag=Rv0001 -AL123456.3 EMBL CDS 1 1524 . + 0 ID=cds-CCP42723.1;Parent=gene-Rv0001;Dbxref=EnsemblGenomes-Gn:Rv0001,EnsemblGenomes-Tr:CCP42723,GOA:P9WNW3,InterPro:IPR001957,InterPro:IPR003593,InterPro:IPR010921,InterPro:IPR013159,InterPro:IPR013317,InterPro:IPR018312,InterPro:IPR020591,InterPro:IPR027417,NCBI_GP:CCP42723.1;Name=CCP42723.1;Note=Rv0001%2C (MT0001%2C MTV029.01%2C P49993)%2C len: 507 aa. dnaA%2C chromosomal replication initiator protein (see citations below)%2C equivalent to other Mycobacterial chromosomal replication initiator proteins. Also highly similar to others except in N-terminus e.g. Q9ZH75|DNAA_STRCH chromosomal replication initiator protein from Streptomyces chrysomallus (624 aa). Contains PS00017 ATP/GTP-binding site motif A (P-loop) and PS01008 DnaA protein signature. Belongs to the DnaA family. Note that the first base of this gene has been taken as base 1 of the Mycobacterium tuberculosis H37Rv genomic sequence.;experiment=EXISTENCE: identified in proteomics study;gbkey=CDS;gene=dnaA;inference=protein motif:PROSITE:PS01008;locus_tag=Rv0001;product=Chromosomal replication initiator protein DnaA;protein_id=CCP42723.1;transl_table=11 diff --git a/q2_types/genome_data/tests/data/loci-with-wrong-prefix/wrongprefix2loci.gff b/q2_types/genome_data/tests/data/loci-with-wrong-prefix/wrongprefix2loci.gff deleted file mode 100644 index ab7c1087..00000000 --- a/q2_types/genome_data/tests/data/loci-with-wrong-prefix/wrongprefix2loci.gff +++ /dev/null @@ -1,5 +0,0 @@ -##gff-version 3 -# Sequence Data: seqnum=1;seqlen=1713046;seqhdr="k129_5480" -# Model Data: version=Prodigal.v2.6.3;run_type=Metagenomic;model="49|_Nostoc_azollae__0708|B|38.5|11|1";gc_cont=38.40;transl_table=11;uses_sd=1 -k129_5480 Prodigal_v2.6.3 CDS 3 1988 255.7 - 0 ID=1_1;partial=10;start_type=ATG;rbs_motif=GGA/GAG/AGG;rbs_spacer=5-10bp;gc_cont=0.442;conf=99.99;score=255.03;cscore=250.12;sscore=4.92;rscore=0.92;uscore=0.44;tscore=4.21; -k129_5480 Prodigal_v2.6.3 CDS 2150 2623 63.6 + 0 ID=1_2;partial=00;start_type=ATG;rbs_motif=GGA/GAG/AGG;rbs_spacer=5-10bp;gc_cont=0.426;conf=100.00;score=63.62;cscore=60.65;sscore=2.97;rscore=0.92;uscore=-2.15;tscore=4.21; diff --git a/q2_types/genome_data/tests/data/loci-with-suffix/loci1.gff b/q2_types/genome_data/tests/data/loci/loci1.gff similarity index 100% rename from q2_types/genome_data/tests/data/loci-with-suffix/loci1.gff rename to q2_types/genome_data/tests/data/loci/loci1.gff diff --git a/q2_types/genome_data/tests/data/loci-with-suffix/loci2.gff b/q2_types/genome_data/tests/data/loci/loci2.gff similarity index 100% rename from q2_types/genome_data/tests/data/loci-with-suffix/loci2.gff rename to q2_types/genome_data/tests/data/loci/loci2.gff diff --git a/q2_types/genome_data/tests/data/proteins-with-prefix/ABC_123.1_proteins.faa b/q2_types/genome_data/tests/data/proteins-with-prefix/ABC_123.1_proteins.faa deleted file mode 100644 index 2271b842..00000000 --- a/q2_types/genome_data/tests/data/proteins-with-prefix/ABC_123.1_proteins.faa +++ /dev/null @@ -1,6 +0,0 @@ ->k129_5480_1 # 3 # 1988 # -1 # ID=1_1;partial=10;start_type=ATG;rbs_motif=GGA/GAG/AGG;rbs_spacer=5-10bp;gc_cont=0.442 -MPKRTDISSICIIGAGPIVIGQACEFDYSGAQACKALKEEGYRVVLINSNPATIMTDPNM -ADATYIEPITP ->k129_5480_2 # 2150 # 2623 # 1 # ID=1_2;partial=00;start_type=ATG;rbs_motif=GGA/GAG/AGG;rbs_spacer=5-10bp;gc_cont=0.426 -MQKIPLTKQGHTDLEAELKDLKHRQRPAVIAAISEAREHGDLSENAEYHAAREQQSFIEG -RIEQVEAILSLAEIIDPAK diff --git a/q2_types/genome_data/tests/data/proteins-with-prefix/BCD_234.2_proteins.faa b/q2_types/genome_data/tests/data/proteins-with-prefix/BCD_234.2_proteins.faa deleted file mode 100644 index 4423cfa8..00000000 --- a/q2_types/genome_data/tests/data/proteins-with-prefix/BCD_234.2_proteins.faa +++ /dev/null @@ -1,6 +0,0 @@ ->k129_5112_1 # 1 # 1218 # -1 # ID=1_1;partial=10;start_type=GTG;rbs_motif=None;rbs_spacer=None;gc_cont=0.669 -MTEQTETSQRPVLVVDFGAQYAQLIARRVREAGVYSELVPHTATAEEIAAKDPIGIILSG -GPSSVYEPGAPTLDPAVFDLGVP ->k129_5112_2 # 1261 # 1797 # -1 # ID=1_2;partial=00;start_type=ATG;rbs_motif=None;rbs_spacer=None;gc_cont=0.650 -MPREPKPSSFPAIRGALTFYQVASIITGVMLLLLLAEMILKYSPLHVELFAGGSGGFLWF -APVLVG diff --git a/q2_types/genome_data/tests/data/proteins-with-wrong-prefix/wrongprefix1proteins.faa b/q2_types/genome_data/tests/data/proteins-with-wrong-prefix/wrongprefix1proteins.faa deleted file mode 100644 index 2271b842..00000000 --- a/q2_types/genome_data/tests/data/proteins-with-wrong-prefix/wrongprefix1proteins.faa +++ /dev/null @@ -1,6 +0,0 @@ ->k129_5480_1 # 3 # 1988 # -1 # ID=1_1;partial=10;start_type=ATG;rbs_motif=GGA/GAG/AGG;rbs_spacer=5-10bp;gc_cont=0.442 -MPKRTDISSICIIGAGPIVIGQACEFDYSGAQACKALKEEGYRVVLINSNPATIMTDPNM -ADATYIEPITP ->k129_5480_2 # 2150 # 2623 # 1 # ID=1_2;partial=00;start_type=ATG;rbs_motif=GGA/GAG/AGG;rbs_spacer=5-10bp;gc_cont=0.426 -MQKIPLTKQGHTDLEAELKDLKHRQRPAVIAAISEAREHGDLSENAEYHAAREQQSFIEG -RIEQVEAILSLAEIIDPAK diff --git a/q2_types/genome_data/tests/data/proteins-with-wrong-prefix/wrongprefix2proteins.faa b/q2_types/genome_data/tests/data/proteins-with-wrong-prefix/wrongprefix2proteins.faa deleted file mode 100644 index 4423cfa8..00000000 --- a/q2_types/genome_data/tests/data/proteins-with-wrong-prefix/wrongprefix2proteins.faa +++ /dev/null @@ -1,6 +0,0 @@ ->k129_5112_1 # 1 # 1218 # -1 # ID=1_1;partial=10;start_type=GTG;rbs_motif=None;rbs_spacer=None;gc_cont=0.669 -MTEQTETSQRPVLVVDFGAQYAQLIARRVREAGVYSELVPHTATAEEIAAKDPIGIILSG -GPSSVYEPGAPTLDPAVFDLGVP ->k129_5112_2 # 1261 # 1797 # -1 # ID=1_2;partial=00;start_type=ATG;rbs_motif=None;rbs_spacer=None;gc_cont=0.650 -MPREPKPSSFPAIRGALTFYQVASIITGVMLLLLLAEMILKYSPLHVELFAGGSGGFLWF -APVLVG diff --git a/q2_types/genome_data/tests/data/proteins-with-suffix/proteins1.faa b/q2_types/genome_data/tests/data/proteins/proteins1.faa similarity index 100% rename from q2_types/genome_data/tests/data/proteins-with-suffix/proteins1.faa rename to q2_types/genome_data/tests/data/proteins/proteins1.faa diff --git a/q2_types/genome_data/tests/data/proteins-with-suffix/proteins2.faa b/q2_types/genome_data/tests/data/proteins/proteins2.faa similarity index 100% rename from q2_types/genome_data/tests/data/proteins-with-suffix/proteins2.faa rename to q2_types/genome_data/tests/data/proteins/proteins2.faa diff --git a/q2_types/genome_data/tests/test_format.py b/q2_types/genome_data/tests/test_format.py index b1c040ef..d8b639e4 100644 --- a/q2_types/genome_data/tests/test_format.py +++ b/q2_types/genome_data/tests/test_format.py @@ -54,77 +54,29 @@ def test_seed_ortholog_dir_fmt_collection(self): obj.validate() def test_genes_dirfmt_fa_with_suffix(self): - dirpath = self.get_data_path('genes-with-suffix') + dirpath = self.get_data_path('genes') fmt = GenesDirectoryFormat(dirpath, mode='r') fmt.validate() - def test_genes_dirfmt_fa_with_prefix(self): - dirpath = self.get_data_path('genes-with-prefix') - fmt = GenesDirectoryFormat(dirpath, mode='r') - - fmt.validate() - - def test_genes_dirfmt_fa_with_wrong_prefix(self): - dirpath = self.get_data_path('genes-with-wrong-prefix') - fmt = GenesDirectoryFormat(dirpath, mode='r') - - with self.assertRaisesRegex( - ValidationError, - 'Missing one or more files for GenesDirectoryFormat' - ): - fmt.validate() - def test_proteins_dirfmt_fa_with_suffix(self): - dirpath = self.get_data_path('proteins-with-suffix') - fmt = ProteinsDirectoryFormat(dirpath, mode='r') - - fmt.validate() - - def test_proteins_dirfmt_fa_with_prefix(self): - dirpath = self.get_data_path('proteins-with-prefix') + dirpath = self.get_data_path('proteins') fmt = ProteinsDirectoryFormat(dirpath, mode='r') fmt.validate() - def test_proteins_dirfmt_fa_with_wrong_prefix(self): - dirpath = self.get_data_path('proteins-with-wrong-prefix') - fmt = ProteinsDirectoryFormat(dirpath, mode='r') - - with self.assertRaisesRegex( - ValidationError, - 'Missing one or more files for ProteinsDirectoryFormat' - ): - fmt.validate() - def test_gff_format_positive_with_suffix(self): - filepath = self.get_data_path('loci-with-suffix/loci1.gff') + filepath = self.get_data_path('loci/loci1.gff') fmt = GFF3Format(filepath, mode='r') fmt.validate() def test_loci_dirfmt_with_suffix(self): - dirpath = self.get_data_path('loci-with-suffix') - fmt = LociDirectoryFormat(dirpath, mode='r') - - fmt.validate() - - def test_loci_dirfmt_with_prefix(self): - dirpath = self.get_data_path('loci-with-prefix') + dirpath = self.get_data_path('loci') fmt = LociDirectoryFormat(dirpath, mode='r') fmt.validate() - def test_loci_dirfmt_with_wrong_prefix(self): - dirpath = self.get_data_path('loci-with-wrong-prefix') - fmt = LociDirectoryFormat(dirpath, mode='r') - - with self.assertRaisesRegex( - ValidationError, - 'Missing one or more files for LociDirectoryFormat' - ): - fmt.validate() - def test_gff_format_wrong_version(self): filepath = self.get_data_path('loci-invalid/loci-wrong-version.gff') with self.assertRaisesRegex( diff --git a/q2_types/genome_data/tests/test_transformer.py b/q2_types/genome_data/tests/test_transformer.py index d7558ef7..c5d7cb41 100644 --- a/q2_types/genome_data/tests/test_transformer.py +++ b/q2_types/genome_data/tests/test_transformer.py @@ -64,8 +64,8 @@ def seqs_to_df(seqs): def test_genes_to_dataframe(self): _, obs = self.transform_format(GenesDirectoryFormat, pd.DataFrame, filenames=[ - 'genes-with-suffix/genes1.fa', - 'genes-with-suffix/genes2.fa' + 'genes/genes1.fa', + 'genes/genes2.fa' ]) exp = self.seqs_to_df(self.genes) pd.testing.assert_frame_equal(exp, obs) @@ -82,8 +82,8 @@ def test_proteins_to_dataframe(self): ProteinsDirectoryFormat, pd.DataFrame, filenames=[ - 'proteins-with-suffix/proteins1.faa', - 'proteins-with-suffix/proteins2.faa' + 'proteins/proteins1.faa', + 'proteins/proteins2.faa' ]) exp = self.seqs_to_df(self.proteins) pd.testing.assert_frame_equal(exp, obs) @@ -100,7 +100,7 @@ def test_gff_to_interval_metadata_iterator(self): input, obs = self.transform_format( GFF3Format, IntervalMetadataIterator, - filename='loci-with-suffix/loci1.gff') + filename='loci/loci1.gff') exp = skbio.io.read(str(input), format='gff3') for o, e in zip(obs, exp): @@ -109,7 +109,7 @@ def test_gff_to_interval_metadata_iterator(self): def test_interval_metadata_iterator_to_gff(self): transformer = self.get_transformer(IntervalMetadataIterator, GFF3Format) - filepath = self.get_data_path('loci-with-suffix/loci1.gff') + filepath = self.get_data_path('loci/loci1.gff') generator = skbio.io.read(filepath, format='gff3') input = IntervalMetadataIterator(generator) diff --git a/setup.py b/setup.py index 9a3617bd..d2f0b700 100644 --- a/setup.py +++ b/setup.py @@ -56,13 +56,12 @@ ['data/*', 'data/*/*', 'data/mags-fa/*', 'data/mags-fasta/*'], 'q2_types.genome_data.tests': - ['data/*/', 'data/genes-with-prefix/*', - 'data/genes-with-suffix/*', 'data/genes-with-wrong-prefix/*', - 'data/loci-invalid/*', 'data/loci-with-prefix/*', - 'data/loci-with-suffix/*', 'data/loci-with-wrong-prefix/*', - 'data/ortholog/*', 'data/proteins-with-suffix/*', - 'data/proteins-with-prefix/*', - 'data/proteins-with-wrong-prefix/*', + ['data/*/', + 'data/genes/*', + 'data/loci-invalid/*', + 'data/loci/*', + 'data/ortholog/*', + 'data/proteins/*', ], 'q2_types.kraken2.tests': [ 'data/*', From cfa1a0e34a4d45e0c2e18de3c05f822a21fa4208 Mon Sep 17 00:00:00 2001 From: Santiago Castro Dau <54123712+Sann5@users.noreply.github.com> Date: Thu, 2 May 2024 20:15:58 +0200 Subject: [PATCH 4/5] MAINT: refactor names of variables in `reference_db/tests/test_format.py` (#319) --- q2_types/reference_db/tests/test_format.py | 65 +++++++++++----------- 1 file changed, 32 insertions(+), 33 deletions(-) diff --git a/q2_types/reference_db/tests/test_format.py b/q2_types/reference_db/tests/test_format.py index 58b91491..105b27da 100644 --- a/q2_types/reference_db/tests/test_format.py +++ b/q2_types/reference_db/tests/test_format.py @@ -46,20 +46,20 @@ def test_dmnd_dir_fmt_fails_bad_name(self): dmnd_obj.validate() def test_eggnog_ref_bin_main(self): - dirpath = self.get_data_path('good_eggnog/eggnog.db') - fmt_obj = EggnogRefBinFileFmt(dirpath, mode='r') + fp = self.get_data_path('good_eggnog/eggnog.db') + fmt_obj = EggnogRefBinFileFmt(fp, mode='r') fmt_obj.validate() def test_eggnog_ref_bin_pickle(self): - dirpath = self.get_data_path('good_eggnog/eggnog.taxa.db.traverse.pkl') - fmt_obj = EggnogRefBinFileFmt(dirpath, mode='r') + fp = self.get_data_path('good_eggnog/eggnog.taxa.db.traverse.pkl') + fmt_obj = EggnogRefBinFileFmt(fp, mode='r') fmt_obj.validate() def test_eggnog_ref_bin_taxa(self): - dirpath = self.get_data_path('good_eggnog/eggnog.taxa.db') - fmt_obj = EggnogRefBinFileFmt(dirpath, mode='r') + fp = self.get_data_path('good_eggnog/eggnog.taxa.db') + fmt_obj = EggnogRefBinFileFmt(fp, mode='r') fmt_obj.validate() @@ -96,14 +96,14 @@ def test_eggnog_sequence_taxa_dir_fmt(self): fmt_obj.validate() def test_EggnogRefTextFileFmt_valid(self): - filepath = self.get_data_path('eggnog_seq_tax/e5.taxid_info.tsv') - fmt_obj = EggnogRefTextFileFmt(filepath, mode='r') + fp = self.get_data_path('eggnog_seq_tax/e5.taxid_info.tsv') + fmt_obj = EggnogRefTextFileFmt(fp, mode='r') fmt_obj.validate() def test_EggnogRefTextFileFmt_invalid_col(self): - filepath = self.get_data_path('eggnog_seq_tax_bad/invalid_col.tsv') - fmt_obj = EggnogRefTextFileFmt(filepath, mode='r') + fp = self.get_data_path('eggnog_seq_tax_bad/invalid_col.tsv') + fmt_obj = EggnogRefTextFileFmt(fp, mode='r') with self.assertRaisesRegex( ValidationError, @@ -112,8 +112,8 @@ def test_EggnogRefTextFileFmt_invalid_col(self): fmt_obj.validate() def test_EggnogRefTextFileFmt_too_many_cols(self): - filepath = self.get_data_path('eggnog_seq_tax_bad/too_many_cols.tsv') - fmt_obj = EggnogRefTextFileFmt(filepath, mode='r') + fp = self.get_data_path('eggnog_seq_tax_bad/too_many_cols.tsv') + fmt_obj = EggnogRefTextFileFmt(fp, mode='r') with self.assertRaisesRegex( ValidationError, @@ -122,8 +122,8 @@ def test_EggnogRefTextFileFmt_too_many_cols(self): fmt_obj.validate() def test_EggnogRefTextFileFmt_invalid_rank(self): - filepath = self.get_data_path('eggnog_seq_tax_bad/invalid_rank.tsv') - fmt_obj = EggnogRefTextFileFmt(filepath, mode='r') + fp = self.get_data_path('eggnog_seq_tax_bad/invalid_rank.tsv') + fmt_obj = EggnogRefTextFileFmt(fp, mode='r') with self.assertRaisesRegex( ValidationError, @@ -132,8 +132,8 @@ def test_EggnogRefTextFileFmt_invalid_rank(self): fmt_obj.validate() def test_EggnogRefTextFileFmt_invalid_taxid(self): - filepath = self.get_data_path('eggnog_seq_tax_bad/invalid_taxid.tsv') - fmt_obj = EggnogRefTextFileFmt(filepath, mode='r') + fp = self.get_data_path('eggnog_seq_tax_bad/invalid_taxid.tsv') + fmt_obj = EggnogRefTextFileFmt(fp, mode='r') with self.assertRaisesRegex( ValidationError, @@ -142,9 +142,8 @@ def test_EggnogRefTextFileFmt_invalid_taxid(self): fmt_obj.validate() def test_EggnogRefTextFileFmt_invalid_taxid_lineage(self): - filepath = self.get_data_path( - 'eggnog_seq_tax_bad/invalid_taxid_lineage.tsv') - fmt_obj = EggnogRefTextFileFmt(filepath, mode='r') + fp = self.get_data_path('eggnog_seq_tax_bad/invalid_taxid_lineage.tsv') + fmt_obj = EggnogRefTextFileFmt(fp, mode='r') with self.assertRaisesRegex( ValidationError, @@ -208,13 +207,13 @@ def test_ncbi_taxonomy_dir_fmt(self): format.validate() def test_binary_file_fmt_positive(self): - dirpath = self.get_data_path("ncbi/db-valid/prot.accession2taxid.gz") - format = NCBITaxonomyBinaryFileFmt(dirpath, mode="r") + fp = self.get_data_path("ncbi/db-valid/prot.accession2taxid.gz") + format = NCBITaxonomyBinaryFileFmt(fp, mode="r") format.validate() def test_binary_file_fmt_wrong_col(self): - dirpath = self.get_data_path("ncbi/wrong_col.gz") - format = NCBITaxonomyBinaryFileFmt(dirpath, mode="r") + fp = self.get_data_path("ncbi/wrong_col.gz") + format = NCBITaxonomyBinaryFileFmt(fp, mode="r") with self.assertRaisesRegex( ValidationError, r"['accession', 'accession_version', 'taxid', 'gi']" @@ -222,8 +221,8 @@ def test_binary_file_fmt_wrong_col(self): format.validate() def test_binary_file_fmt_extra_col(self): - dirpath = self.get_data_path("ncbi/too_many_cols.gz") - format = NCBITaxonomyBinaryFileFmt(dirpath, mode="r") + fp = self.get_data_path("ncbi/too_many_cols.gz") + format = NCBITaxonomyBinaryFileFmt(fp, mode="r") with self.assertRaisesRegex( ValidationError, r"['accession', 'accession.version', " @@ -232,8 +231,8 @@ def test_binary_file_fmt_extra_col(self): format.validate() def test_binary_file_fmt_wrong_accession(self): - dirpath = self.get_data_path("ncbi/wrong_accession.gz") - format = NCBITaxonomyBinaryFileFmt(dirpath, mode="r") + fp = self.get_data_path("ncbi/wrong_accession.gz") + format = NCBITaxonomyBinaryFileFmt(fp, mode="r") with self.assertRaisesRegex( ValidationError, r"['P1ABC1234', 'A0A009IHW8.1', '1310613', '1835922267']" @@ -241,8 +240,8 @@ def test_binary_file_fmt_wrong_accession(self): format.validate() def test_binary_file_fmt_wrong_accession_version(self): - dirpath = self.get_data_path("ncbi/wrong_accession_version.gz") - format = NCBITaxonomyBinaryFileFmt(dirpath, mode="r") + fp = self.get_data_path("ncbi/wrong_accession_version.gz") + format = NCBITaxonomyBinaryFileFmt(fp, mode="r") with self.assertRaisesRegex( ValidationError, r"['A0A009IHW8', 'A0A009IHW8.1a', '1310613', '1835922267']" @@ -250,8 +249,8 @@ def test_binary_file_fmt_wrong_accession_version(self): format.validate() def test_binary_file_fmt_wrong_taxid(self): - dirpath = self.get_data_path("ncbi/wrong_taxid.gz") - format = NCBITaxonomyBinaryFileFmt(dirpath, mode="r") + fp = self.get_data_path("ncbi/wrong_taxid.gz") + format = NCBITaxonomyBinaryFileFmt(fp, mode="r") with self.assertRaisesRegex( ValidationError, r"['A0A009IHW8', 'A0A009IHW8.1', '1310613a', '1835922267']" @@ -259,8 +258,8 @@ def test_binary_file_fmt_wrong_taxid(self): format.validate() def test_binary_file_fmt_wrong_gi(self): - dirpath = self.get_data_path("ncbi/wrong_gi.gz") - format = NCBITaxonomyBinaryFileFmt(dirpath, mode="r") + fp = self.get_data_path("ncbi/wrong_gi.gz") + format = NCBITaxonomyBinaryFileFmt(fp, mode="r") with self.assertRaisesRegex( ValidationError, r"['A0A009IHW8', 'A0A009IHW8.1', '1310613', '1835922267s']" From 940a02d3ac575023c3c3fc12fa989bace9f83c78 Mon Sep 17 00:00:00 2001 From: Michal Ziemski Date: Tue, 7 May 2024 20:12:29 +0200 Subject: [PATCH 5/5] ENH: add `FeatureData[SingleBowtie2Index]` and `FeatureData[AlignmentMap]` (#325) --- q2_types/feature_data_mag/_type.py | 8 +++++++- q2_types/feature_data_mag/tests/test_type.py | 11 ++++++++++- q2_types/per_sample_sequences/_type.py | 14 +++++++++++--- .../per_sample_sequences/tests/test_type.py | 18 +++++++++++++++--- 4 files changed, 43 insertions(+), 8 deletions(-) diff --git a/q2_types/feature_data_mag/_type.py b/q2_types/feature_data_mag/_type.py index 1585f5b1..29c7b11c 100644 --- a/q2_types/feature_data_mag/_type.py +++ b/q2_types/feature_data_mag/_type.py @@ -13,7 +13,8 @@ ) from qiime2.core.type import SemanticType -from ..per_sample_sequences import ContigSequencesDirFmt +from ..bowtie2 import Bowtie2IndexDirFmt +from ..per_sample_sequences import ContigSequencesDirFmt, SingleBowtie2Index from ..plugin_setup import plugin @@ -55,3 +56,8 @@ plugin.register_artifact_class( FeatureData[KEGG], directory_format=OrthologAnnotationDirFmt) + +plugin.register_semantic_type_to_format( + FeatureData[SingleBowtie2Index], + artifact_format=Bowtie2IndexDirFmt +) diff --git a/q2_types/feature_data_mag/tests/test_type.py b/q2_types/feature_data_mag/tests/test_type.py index 935d30ba..c8dfc324 100644 --- a/q2_types/feature_data_mag/tests/test_type.py +++ b/q2_types/feature_data_mag/tests/test_type.py @@ -8,6 +8,7 @@ import unittest +from q2_types.bowtie2 import Bowtie2IndexDirFmt from q2_types.feature_data import FeatureData from qiime2.plugin.testing import TestPluginBase @@ -15,7 +16,9 @@ MAG, MAGSequencesDirFmt, OrthologAnnotationDirFmt, NOG, OG, KEGG, Contig ) -from q2_types.per_sample_sequences import ContigSequencesDirFmt +from q2_types.per_sample_sequences import ( + ContigSequencesDirFmt, SingleBowtie2Index +) class TestTypes(TestPluginBase): @@ -63,6 +66,12 @@ def test_kegg_registered_to_format(self): FeatureData[KEGG], OrthologAnnotationDirFmt) + def test_bowtie_index_semantic_type_to_format_registration(self): + self.assertSemanticTypeRegisteredToFormat( + FeatureData[SingleBowtie2Index], + Bowtie2IndexDirFmt + ) + if __name__ == '__main__': unittest.main() diff --git a/q2_types/per_sample_sequences/_type.py b/q2_types/per_sample_sequences/_type.py index 3d3c7a81..316f97bb 100644 --- a/q2_types/per_sample_sequences/_type.py +++ b/q2_types/per_sample_sequences/_type.py @@ -7,7 +7,7 @@ # ---------------------------------------------------------------------------- from q2_types.bowtie2 import Bowtie2IndexDirFmt -from q2_types.feature_data import BLAST6 +from q2_types.feature_data import BLAST6, FeatureData from qiime2.plugin import SemanticType from ..genome_data import SeedOrthologDirFmt @@ -31,11 +31,15 @@ Contigs = SemanticType( 'Contigs', variant_of=SampleData.field['type']) SingleBowtie2Index = SemanticType( - 'SingleBowtie2Index', variant_of=SampleData.field['type']) + 'SingleBowtie2Index', + variant_of=[SampleData.field['type'], FeatureData.field['type']] +) MultiBowtie2Index = SemanticType( 'MultiBowtie2Index', variant_of=SampleData.field['type']) AlignmentMap = SemanticType( - 'AlignmentMap', variant_of=SampleData.field['type']) + 'AlignmentMap', + variant_of=[SampleData.field['type'], FeatureData.field['type']] +) MultiAlignmentMap = SemanticType( 'MultiAlignmentMap', variant_of=SampleData.field['type']) @@ -90,6 +94,10 @@ SampleData[AlignmentMap], artifact_format=BAMDirFmt ) +plugin.register_semantic_type_to_format( + FeatureData[AlignmentMap], + artifact_format=BAMDirFmt +) plugin.register_semantic_type_to_format( SampleData[MultiAlignmentMap], artifact_format=MultiBAMDirFmt diff --git a/q2_types/per_sample_sequences/tests/test_type.py b/q2_types/per_sample_sequences/tests/test_type.py index 584875e5..916241bb 100644 --- a/q2_types/per_sample_sequences/tests/test_type.py +++ b/q2_types/per_sample_sequences/tests/test_type.py @@ -9,7 +9,7 @@ import unittest from q2_types.bowtie2 import Bowtie2IndexDirFmt -from q2_types.feature_data import BLAST6 +from q2_types.feature_data import BLAST6, FeatureData from q2_types.sample_data import SampleData from q2_types.per_sample_sequences import ( Sequences, SequencesWithQuality, PairedEndSequencesWithQuality, @@ -87,12 +87,18 @@ def test_contigs_semantic_type_to_format_registration(self): def test_singlebowtie_semantic_type_registration(self): self.assertRegisteredSemanticType(SingleBowtie2Index) - def test_singlebowtie_semantic_type_to_format_registration(self): + def test_singlebowtie_sd_semantic_type_to_format_registration(self): self.assertSemanticTypeRegisteredToFormat( SampleData[SingleBowtie2Index], Bowtie2IndexDirFmt ) + def test_singlebowtie_fd_semantic_type_to_format_registration(self): + self.assertSemanticTypeRegisteredToFormat( + FeatureData[SingleBowtie2Index], + Bowtie2IndexDirFmt + ) + def test_multibowtie_index_semantic_type_registration(self): self.assertRegisteredSemanticType(MultiBowtie2Index) @@ -105,12 +111,18 @@ def test_multibowtie_index_semantic_type_to_format_registration(self): def test_aln_map_semantic_type_registration(self): self.assertRegisteredSemanticType(AlignmentMap) - def test_aln_map_semantic_type_to_format_registration(self): + def test_aln_map_sd_semantic_type_to_format_registration(self): self.assertSemanticTypeRegisteredToFormat( SampleData[AlignmentMap], BAMDirFmt ) + def test_aln_map_fd_semantic_type_to_format_registration(self): + self.assertSemanticTypeRegisteredToFormat( + FeatureData[AlignmentMap], + BAMDirFmt + ) + def test_multi_aln_map_semantic_type_registration(self): self.assertRegisteredSemanticType(MultiAlignmentMap)