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

refactor: remove unused seqrepo configuration #308

Merged
merged 3 commits into from
Aug 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
3 changes: 0 additions & 3 deletions server/src/curfu/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."""
Expand Down
5 changes: 3 additions & 2 deletions server/src/curfu/devtools/build_gene_suggest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down