diff --git a/README.md b/README.md index 5609a50f..b4223d2e 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ cd fusion-curation Ensure that the following data sources are available: - the [VICC Gene Normalization](https://github.com/cancervariants/gene-normalization) database, accessible from a DynamoDB-compliant service. Set the endpoint address with environment variable `GENE_NORM_DB_URL`; default value is `http://localhost:8000`. -- the [Biocommons SeqRepo](https://github.com/biocommons/biocommons.seqrepo) database. Provide local path with environment variable `SEQREPO_DATA_PATH`; default value is `/usr/local/share/seqrepo/latest`. +- the [Biocommons SeqRepo](https://github.com/biocommons/biocommons.seqrepo) database, used by `Cool-Seq-Tool`. The precise file location is configurable via the `SEQREPO_ROOT_DIR` variable, per the [documentation](https://coolseqtool.readthedocs.io/0.6.0/usage.html#environment-configuration). - the [Biocommons Universal Transcript Archive](https://github.com/biocommons/uta), by way of Genomic Med Lab's [Cool Seq Tool](https://github.com/GenomicMedLab/cool-seq-tool) package. Connection parameters to the Postgres database are set most easily as a [Libpq-compliant URL](https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING) under the environment variable `UTA_DB_URL`. Create a virtual environment for the server and install. Note: there's also a Pipfile so you can skip the virtualenv steps if you'd rather use a Pipenv instance instead of virtualenv/venv. I have been sticking with the latter because [Pipenv doesn't play well with entry points in development](https://stackoverflow.com/a/69225249), but if you aren't editing them in `setup.cfg`, then the former should be fine. diff --git a/server/src/curfu/__init__.py b/server/src/curfu/__init__.py index bb833ca9..7a993d75 100644 --- a/server/src/curfu/__init__.py +++ b/server/src/curfu/__init__.py @@ -50,9 +50,6 @@ else: UTA_DB_URL = "postgresql://uta_admin@localhost:5433/uta/uta_20210129" -# get local seqrepo location -SEQREPO_DATA_PATH = environ.get("SEQREPO_DATA_PATH", f"{APP_ROOT}/data/seqrepo/latest") - class LookupServiceError(Exception): """Custom Exception to use when lookups fail in curation services.""" diff --git a/server/src/curfu/devtools/build_gene_suggest.py b/server/src/curfu/devtools/build_gene_suggest.py index f4a1f449..54e8e581 100644 --- a/server/src/curfu/devtools/build_gene_suggest.py +++ b/server/src/curfu/devtools/build_gene_suggest.py @@ -7,10 +7,11 @@ import click from biocommons.seqrepo.seqrepo import SeqRepo +from cool_seq_tool.handlers.seqrepo_access import SEQREPO_ROOT_DIR from gene.database import create_db from gene.schemas import RecordType -from curfu import APP_ROOT, SEQREPO_DATA_PATH, logger +from curfu import APP_ROOT, logger class GeneSuggestionBuilder: @@ -22,7 +23,7 @@ class GeneSuggestionBuilder: def __init__(self) -> None: """Initialize class.""" self.gene_db = create_db() - self.sr = SeqRepo(SEQREPO_DATA_PATH) + self.sr = SeqRepo(SEQREPO_ROOT_DIR) self.genes = [] def _get_chromosome(self, record: dict) -> str | None: