Quick start

Create database

After installing clinvar-build one needs indicate the location of the parser and schema configuration files. The package ships with tested and robust configuration files, which can either be used as is or be adapted to the users own specification. See the Setting-up the environment section how to use the default configuration files.

After this step you can use the provide command line tools to build the SQLite schema and populate the database. For example, to build the RCV database use the following commands:

# building the SQLite schema
clinvar-schema path/to/dir --rcv -v

# build the database with a batch size of 20 records, and foreign key checks
clinvar-parse \
    --db path/to/dir/clinvar_rcv.db \
    --xml path/to/download/ClinVarRCVRelease_00-latest.xml \
    --rcv \
    --batch-size 20 \
    --enforce-fk \
    -v

To verify the (continued) compatibility of the configuration files against the latest ClinVar XML by comparing the XML files against the XSD files included with this package. If validation fails, the configuration files will likely require updating. Please refer to the configuration documentation for guidance on how to proceed.

Query database

After building the databases these can be queried using the users preferred querying method. A number of standard queries are provided as command line interface options this with the python package, please see the Programmer interface.

For example, to extract the BRCA variants and write these to a .tsv file run:

# Filter by gene
clinvar-filter /path/to/vcv.db \
    -g BRCA1 BRCA2 \
    -o brca_variants.tsv