Store observations of vcf variants in a mongodb
Project description
loqusdb ![Build Status](https://pypi-camo.freetls.fastly.net/ca84f4d0ca7a24a7a995f13b712adaa41dc9b806/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6d6f6f6e736f2f6c6f71757364622f6d61737465722e7376673f7374796c653d666c61742d737175617265)
Small tool to setup a local variant database.
Right now locusdb uses mongodb as backend for storing variants but there should not be a huge difference to use another database manager.
Installation
pip install loqusdb
or
$git clone https://github.com/moonso/loqusdb
$cd loqusdb
$pip install --editable .
Idea
Tool to keep track of what variants that have been seen and in what families they have been observed. This is NOT a tool to create a true frequency database. It will basically count the number of times we have seen a variant in any individual. We will also keep track of the variants that have been seen in a homozygous or hemizygous state.
Variants are stored by providing a vcf file and a (ped or ped like)family file.
Loqusdb will first check if the vcf file looks ok.
The tool will then check all variants if they have been observed in any of the individuals in the family.
When the variants are added:
- Either the variant exists, in this case we increase the number of observations with one
- Or this variant has not ben seen before, then the variant is added to database
Command Line Interface
$ loqusdb
Usage: loqusdb [OPTIONS] COMMAND [ARGS]...
loqusdb: manage a local variant count database.
Options:
-db, --database TEXT [default: loqusdb]
-u, --username TEXT
-p, --password TEXT
-port, --port INTEGER Specify the port where to look for the mongo
database. [default: 27017]
-h, --host TEXT Specify the host where to look for the mongo
database. [default: localhost]
-b, --backend [mongo] Specify what backend to use. [default: mongo]
-c, --conn_host TEXT Used for testing. [default: mongodb://]
-l, --logfile PATH Path to log file. If none logging is printed to
stderr.
-v, --verbose
--version Show the version and exit.
--help Show this message and exit.
Commands:
cases Display cases in database
delete Delete the variants of a family
export Export variants to VCF format
index Add indexes to database
load Load the variants of a family
migrate Migrate an old loqusdb instance
variants Display variants in database
wipe Wipe a loqusdb instance
Database
Mongo
The collections looks like:
Case
{
'case_id': 'case_id',
'vcf_path': 'path_to_vcf'
}
Variant
{
'_id': 'variant_id',
'chrom': 'CHROM',
'start': postition,
'end': end postition,
'ref': reference base(s),
'alt': alternative base(s),
'homozygote': number_of_homozygotes,
'hemizygote': number_of_hemizygotes,
'observations': number_of_observations,
'families': ['family_id', ...]
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for loqusdb-2.4-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0aec19632728c271baa9ae1b389a6bea09b7875d8630d639931484409bf7300d |
|
MD5 | ab511483a63c3c6e37d47c0cf9858074 |
|
BLAKE2b-256 | 780adb0abde9d3ac21b162bf267145acd523c62be1d464cdee96fe182cb1e6f4 |