Skip to main content

Building a local copy of clinvar and querying these data

Project description

Building and querying clinvar

version: 0.1.0

Clinvar-build is a python module to build a SQLite database using the publicly available XML data from Clinvar. The module is slipped with command line entry points for routine queries.

The documentation for clinvar-build can be found here.

Installation

At present, the repository is undergoing development and no packages exist yet on PyPy or in Conda. Therefore it is recommended that it is installed in either of the two ways listed below. First, clone this repository and then cd to the root of the repository.

git clone git@gitlab.com:SchmidtAF/clinvar-build.git
cd clinvar-build

Installation using conda dependencies

A conda environment is provided in a yaml file in the directory ./resources/conda/envs. A new conda environment called clinvar-build can be built using the command:

# From the root of the repository
conda env create --file ./resources/conda/envs/conda_create.yaml

To add to an existing environment use:

# From the root of the repository
conda env update --file ./resources/conda/envs/conda_update.yam

Next the package can be installed:

make install

Development

For development work, install the package in editable mode with Git commit hooks configured:

make install-dev

This command installs the package in editable mode and configures Git commit hooks, allowing you to run git pull to update the repository or switch branches without reinstalling.

Git Hooks Configuration

When setting up a development environment, the setup-hooks command configures Git hooks to enforce conventional commit message formatting and spell check using codespell.

To view the commit message format requirements, run:

./.githooks/commit-msg -help

For frequent use, add this function to your shell configuration (~/.bashrc or ~/.zshrc):

commit-format-help() {
    local git_root
    git_root=$(git rev-parse --show-toplevel 2>/dev/null)
    
    if [ -z "$git_root" ]; then
        echo "Error: Not inside a git repository"
        return 1
    fi
    
    local hook_path="$git_root/.githooks/commit-msg"
    
    if [ ! -f "$hook_path" ]; then
        echo "Error: commit-msg hook not found"
        return 1
    fi
    
    "$hook_path" --help
}

Validating the package

After installing the package from GitLab, you may wish to run the test suite to confirm everything is working as expected:

# From the root of the repository
pytest tests

Usage

Please have a look at the examples in resources for some possible recipes.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

clinvar_build-0.1.0.tar.gz (137.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

clinvar_build-0.1.0-py3-none-any.whl (134.0 kB view details)

Uploaded Python 3

File details

Details for the file clinvar_build-0.1.0.tar.gz.

File metadata

  • Download URL: clinvar_build-0.1.0.tar.gz
  • Upload date:
  • Size: 137.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for clinvar_build-0.1.0.tar.gz
Algorithm Hash digest
SHA256 14a41775310a394bc6446f5fa7a611bcac7be637ce8680e418866e43106392a4
MD5 b5550065600b7175caef4c152009aa92
BLAKE2b-256 afce09fa43e1f0fa98e9b1190b83657bd06f436eadaddd06dc8cbac034a8e651

See more details on using hashes here.

File details

Details for the file clinvar_build-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: clinvar_build-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 134.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for clinvar_build-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 28c26a9a2eefcdb3ce26941b56ce0f29f867c6bf49c21ae827d575de21beac4f
MD5 481981e0b2dbdc8bff852ccd8adafa1e
BLAKE2b-256 92e74fa69aacaba3094852d939b05031cf29672a0437b13e27d6ebaeb7437bb8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page