diff --git a/MANIFEST.in b/MANIFEST.in deleted file mode 100644 index 5607e2d..0000000 --- a/MANIFEST.in +++ /dev/null @@ -1,2 +0,0 @@ -graft src/biocatalyzer/data/byproducts_to_remove/ -graft src/biocatalyzer/data/patterns_to_remove/ \ No newline at end of file diff --git a/setup.cfg b/setup.cfg index 9ef8b84..cff5e46 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = biocatalyzer -version = 0.0.2-beta +version = 0.0.4-beta description = BioCatalyzer: a rule-based tool to predict compound metabolism long_description = file: README.md long_description_content_type = text/markdown @@ -8,7 +8,7 @@ keywords = reaction-rules, metabolism, enzymatic-reactions, chemoinformatics, ch author = João Correia author_email = jfscorreia95@gmail.com url = https://github.com/jcorreia11/BioCatalyzer -download_url = https://github.com/jcorreia11/BioCatalyzer/archive/refs/tags/v0.0.2-beta.tar.gz +download_url = https://github.com/jcorreia11/BioCatalyzer/archive/refs/tags/v0.0.4-beta.tar.gz license = MIT license_file = LICENSE platforms = unix, linux, osx, cygwin, win32 @@ -49,6 +49,12 @@ testing = [options.package_data] biocatalyzer = py.typed +biocatalyzer.data.byproducts_to_remove= + *.tsv +biocatalyzer.data.patterns_to_remove= + *.tsv +biocatalyzer.data.reactionrules= + all_reaction_rules_forward_no_smarts_duplicates_sample.tsv [flake8] max-line-length = 160 diff --git a/src/biocatalyzer/io_utils/loaders.py b/src/biocatalyzer/io_utils/loaders.py index 4e237f6..2c402fe 100644 --- a/src/biocatalyzer/io_utils/loaders.py +++ b/src/biocatalyzer/io_utils/loaders.py @@ -106,7 +106,7 @@ def load_organisms(path): pd.DataFrame: pandas dataframe with the organisms to use. """ - if not path: + if path is None or path == 'None': return 'ALL' if Loaders._verify_file(path): orgs = pd.read_csv(path, header=0, sep='\t') @@ -135,7 +135,7 @@ def load_byproducts_to_remove(path): pd.DataFrame: pandas dataframe with the byproducts to remove. """ - if not path: + if path is None or path == 'None': return [] byproducts = pd.read_csv(path, header=0, sep='\t') if 'smiles' not in byproducts.columns: @@ -157,7 +157,7 @@ def load_patterns_to_remove(path): pd.DataFrame: pandas dataframe with the patterns to remove. """ - if not path: + if path is None or path == 'None': return [] patterns = pd.read_csv(path, header=0, sep='\t') if 'smarts' not in patterns.columns: diff --git a/tests/unit_tests/clis/test_cli.py b/tests/unit_tests/clis/test_cli.py index 24f08cd..7786257 100644 --- a/tests/unit_tests/clis/test_cli.py +++ b/tests/unit_tests/clis/test_cli.py @@ -58,3 +58,13 @@ def test_biocatalyzer_full(self): f"--ms_data_path={self.ms_data_path} --mode={self.mode} --tolerance={self.tolerance} " f"--n_jobs={self.n_jobs}") self.assertEqual(exit_status, 0) + + def test_biocatalyzer_full2(self): + exit_status = os.system(f"biocatalyzer_cli {self.compounds_path} {self.output_folder} " + f"--neutralize={self.neutralize} --reaction_rules={self.reaction_rules_path} " + f"--patterns_to_remove={None} " + f"--molecules_to_remove={None} " + f"--min_atom_count={self.min_atom_count} --match_ms_data={self.match_ms_data} " + f"--ms_data_path={self.ms_data_path} --mode={self.mode} --tolerance={self.tolerance} " + f"--n_jobs={self.n_jobs}") + self.assertEqual(exit_status, 0)