From ef24a59886110599cf3326ee1a51d531bd1a3dd7 Mon Sep 17 00:00:00 2001 From: Kevin Shebek Date: Thu, 27 Oct 2022 16:01:04 -0600 Subject: [PATCH] update to 2.2.0 --- .gitignore | 1 + README.md | 6 +++--- requirements.txt | 6 +++--- setup.cfg | 13 +++++++++++++ setup.py | 10 ++++++---- tests/test_unit/feas_test.py | 22 ---------------------- tests/test_unit/test_feas.py | 28 ++++++++++++++++++++++++++++ 7 files changed, 54 insertions(+), 32 deletions(-) create mode 100644 setup.cfg delete mode 100644 tests/test_unit/feas_test.py create mode 100644 tests/test_unit/test_feas.py diff --git a/.gitignore b/.gitignore index e5d8900..f39ffaa 100644 --- a/.gitignore +++ b/.gitignore @@ -45,6 +45,7 @@ htmlcov/ nosetests.xml coverage.xml *,cover +.pytest_cache/* # Translations *.mo diff --git a/README.md b/README.md index 1ba7fb1..d3dfb02 100644 --- a/README.md +++ b/README.md @@ -11,18 +11,18 @@ For general information on MINE Databases, please consult [JJeffryes et al. 2015 Documentation is hosted at https://mine-database.readthedocs.io/en/latest/. It gives more detailed descriptions and example uses of the software. ## Installation -MINE-Database requires the use of [rdkit](https://rdkit.org/), which currently is unavailable to install on pip. Thus, we recommend you use conda to create a new environment and then install rdkit into that environment before proceeding: +If a conda environment is desired to be used: `conda create -n mine` `conda activate mine` -`conda install -c rdkit rdkit` -Then, use pip (in your conda environment) to install minedatabase: +Then, use pip (with or without conda) to install minedatabase: `pip install minedatabase` + ## Running Pickaxe ### Running Pickaxe through a python file (recommended) An example file, [pickaxe_run_template.py](https://github.com/tyo-nu/MINE-Database/blob/master/pickaxe_run_template.py), provides a framework for running pickaxe through a python file. Feel free to download it and change it to your needs. The starting compounds, rules and cofactors, optional database information, and Pickaxe run options are specified. After running the results are stored in a specified database or written to .tsv files. diff --git a/requirements.txt b/requirements.txt index cc1d5a1..81193f0 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,9 +1,9 @@ keras -lxml -mordred +lxml==4.9 +mordred==1.2 numpy pandas -pymongo +pymongo==4.3 pytest pytest-cov python-libsbml diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..81ae500 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,13 @@ +[options] +python_requires = >= 3.7, <3.10 +install_requires = + keras + python-libsbml + lxml==4.9 + mordred==1.2 + pandas + pymongo + rdkit + scikit-learn +[options.extras_require] +test = pytest \ No newline at end of file diff --git a/setup.py b/setup.py index 80f3e43..6abfdde 100644 --- a/setup.py +++ b/setup.py @@ -6,16 +6,16 @@ long_description = fh.read() setup(name='minedatabase', - version='2.1.0', + version='2.2.0', description='Metabolic In silico Network Expansions', long_description=long_description, long_description_content_type="text/markdown", url='https://github.com/tyo-nu/MINE-Database', - author='Jonathan Strutz', + author='Kevin Shebek, Jonathan Strutz', author_email='jonstrutz11@gmail.com', license='MIT', - packages=setuptools.find_packages(), - install_requires=['mordred', 'pymongo', 'scikit-learn<=0.23.2', 'seaborn'], + packages=setuptools.find_packages(exclude=["docs", "tests"]), + # install_requires=['pymongo'],#, 'rdkit', 'scikit-learn'], package_data={'minedatabase': ['data/*'], 'minedatabase.NP_Score': ['*.gz'], 'minedatabase.tests': ['data/*'], @@ -28,5 +28,7 @@ 'Topic :: Scientific/Engineering :: Bio-Informatics', 'Topic :: Scientific/Engineering :: Chemistry', 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.9', + 'Programming Language :: Python :: 3.8', ], ) diff --git a/tests/test_unit/feas_test.py b/tests/test_unit/feas_test.py deleted file mode 100644 index 85f5ed4..0000000 --- a/tests/test_unit/feas_test.py +++ /dev/null @@ -1,22 +0,0 @@ -# Running feasibility test is an issue and crashes, do it here instead -from minedatabase.pickaxe import Pickaxe -from minedatabase.filters.feasibility import ReactionFeasibilityFilter -from pathlib import Path - -cwd = Path(__file__).parent - -data_path = cwd / "../../tests/data/test_filters" -pk = Pickaxe( - rule_list=data_path / "test_filter_rules.tsv", - coreactant_list=data_path / "metacyc_coreactants.tsv", - filter_after_final_gen=True, - quiet=True, -) -pk.load_compound_set(data_path / "test_filter_compounds.csv") -pk.load_targets(data_path / "test_filter_targets.csv") - -_filter = ReactionFeasibilityFilter(use_unpredicted=False) -pk.filters.append(_filter) -pk.transform_all(generations=1) - -len(pk.compounds) == 58 diff --git a/tests/test_unit/test_feas.py b/tests/test_unit/test_feas.py new file mode 100644 index 0000000..894cbfb --- /dev/null +++ b/tests/test_unit/test_feas.py @@ -0,0 +1,28 @@ +## TODO update this to work +# # Running feasibility test is an issue and crashes, do it here instead +# from minedatabase.pickaxe import Pickaxe +# from pathlib import Path + +# try: +# error_loading = False +# from minedatabase.filters.feasibility import ReactionFeasibilityFilter +# except: +# error_loading = True + +# cwd = Path(__file__).parent + +# data_path = cwd / "../../tests/data/test_filters" +# pk = Pickaxe( +# rule_list=data_path / "test_filter_rules.tsv", +# coreactant_list=data_path / "metacyc_coreactants.tsv", +# filter_after_final_gen=True, +# quiet=True, +# ) +# pk.load_compound_set(data_path / "test_filter_compounds.csv") +# pk.load_targets(data_path / "test_filter_targets.csv") + +# _filter = ReactionFeasibilityFilter(use_unpredicted=False) +# pk.filters.append(_filter) +# pk.transform_all(generations=1) + +# len(pk.compounds) == 58