Skip to content

Commit

Permalink
feat(GUNC): Added GTDB R95 dataset methods.
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronmussig committed Mar 9, 2022
1 parent 8c87e70 commit aff82f6
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
26 changes: 26 additions & 0 deletions magna/gunc/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import os

import pandas as pd

from magna.config import MAGNA_DIR


def gunc_max_css_scores_gtdb_r95() -> pd.DataFrame:
path = os.path.join(MAGNA_DIR, 'dataset', 'gunc', 'GUNC.gtdb_95.maxCSS_level.feather')
if not os.path.isfile(path):
raise IOError(f'{path} does not exist.')
return pd.read_feather(path)


def gunc_contig_assignment_gtdb_r95() -> pd.DataFrame:
path = os.path.join(MAGNA_DIR, 'dataset', 'gunc', 'GUNC.gtdb_95.contig_assignments.feather')
if not os.path.isfile(path):
raise IOError(f'{path} does not exist.')
return pd.read_feather(path)


def gunc_all_levels_gtdb_r95() -> pd.DataFrame:
path = os.path.join(MAGNA_DIR, 'dataset', 'gunc', 'gtdb_95.all_levels.tsv')
if not os.path.isfile(path):
raise IOError(f'{path} does not exist.')
return pd.read_feather(path)
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@ def readme():
],
packages=find_packages(),
include_package_data=True,
install_requires=['tqdm', 'pandas', 'pyarrow', 'numpy', 'dendropy'],
install_requires=['tqdm', 'pandas>=1.1.0', 'pyarrow', 'numpy', 'dendropy', 'biopython'],
python_requires='>=3.6',
)

0 comments on commit aff82f6

Please sign in to comment.