Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH: Adds FileDictMixin #347

Merged
merged 23 commits into from
Feb 11, 2025
Merged
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
removed tests for genomedatadirfmt file dict
  • Loading branch information
VinzentRisch committed Oct 17, 2024
commit 1c8c25ba647fd24e4894c2d927f90685391ed73f
47 changes: 0 additions & 47 deletions q2_types/genome_data/tests/test_formats.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
# The full license is in the file LICENSE, distributed with this software.
# ----------------------------------------------------------------------------
import unittest
from pathlib import Path

from qiime2.core.exceptions import ValidationError
from qiime2.plugin.testing import TestPluginBase
Expand All @@ -15,7 +14,6 @@
GenesDirectoryFormat, ProteinsDirectoryFormat, GFF3Format,
LociDirectoryFormat, SeedOrthologDirFmt, OrthologFileFmt,
OrthologAnnotationDirFmt, GenomeSequencesDirectoryFormat,
GenomeDataDirectoryFormat
)


Expand Down Expand Up @@ -180,51 +178,6 @@ def test_ortholog_annotations_annot_dict(self):
}
self.assertDictEqual(obs, exp)

def test_genes_dirfmt_samples_file_dict(self):
genes = GenesDirectoryFormat(
self.get_data_path('genes_samples'), mode='r')

obs = genes.file_dict()
exp = {
'sample1': {
'genes1': str(genes.path / 'sample1/genes1.fa'),
},
'sample2': {
'genes2': str(genes.path / 'sample2/genes2.fa'),
},
}
self.assertDictEqual(obs, exp)

obs = genes.genome_dict(relative=True)
exp = {
'sample1': {
'genes1': 'sample1/genes1.fa',
},
'sample2': {
'genes2': 'sample2/genes2.fa',
},
}
self.assertDictEqual(obs, exp)

def test_genes_dirfmt_file_dict(self):
genes = (
GenesDirectoryFormat(self.get_data_path('genes'), mode='r')
)

obs = genes.genome_dict()
exp = {
'genes1': str(genes.path / 'genes1.fa'),
'genes2': str(genes.path / 'genes2.fa')
}
self.assertDictEqual(obs, exp)

obs = genes.genome_dict(relative=True)
exp = {
'genes1': 'genes1.fa',
'genes2': 'genes2.fa'
}
self.assertDictEqual(obs, exp)


if __name__ == '__main__':
unittest.main()