# loqusdb [![Build Status][travis-image]][travis-url]
Small tool to setup a local variant database.
Right now **locusdb** uses [mongodb][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**
```python
{
'case_id': 'case_id',
'vcf_path': 'path_to_vcf'
}
```
**Variant**
```python
{
'_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', ...]
}
```
[travis-url]: https://travis-ci.org/moonso/loqusdb?branch=master
[travis-image]: https://img.shields.io/travis/moonso/loqusdb/master.svg?style=flat-square
[mongodb]: https://www.mongodb.org
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
资源分类:Python库 所属语言:Python 资源全名:loqusdb-2.0.tar.gz 资源来源:官方 安装方法:https://lanzao.blog.csdn.net/article/details/101784059
资源推荐
资源详情
资源评论
收起资源包目录
loqusdb-2.0.tar.gz (94个子文件)
loqusdb-2.0
MANIFEST.in 234B
PKG-INFO 5KB
loqusdb.egg-info
PKG-INFO 5KB
requires.txt 117B
SOURCES.txt 3KB
entry_points.txt 59B
top_level.txt 8B
dependency_links.txt 1B
tests
vcf_tools
test_check_vcf.py 2KB
test_format_variant.py 4KB
test_check_par.py 1KB
test_vcf.py 2KB
test_format_sv_variant.py 5KB
functional
test_cli.py 2KB
conftest.py 10KB
plugins
mongo
test_case_operations.py 2KB
test_get_sv.py 1KB
test_variant_operations.py 6KB
test_connect.py 354B
test_load_svs.py 3KB
test_flask_extension.py 744B
build_models
test_build_case.py 4KB
test_is_greater.py 1KB
test_build_variant.py 333B
.DS_Store 6KB
utils
test_load_family.py 2KB
test_delete_family.py 928B
test_load_database.py 1KB
test_case.py 1KB
test_delete_variant.py 2KB
test_load_variants.py 6KB
test_get_family.py 327B
test_delete.py 1KB
test_migrate.py 1KB
fixtures
test.SV.vcf 58KB
test.vcf 2KB
recessive_trio.ped 148B
643594.clinical.SV.vcf 58KB
double_variant.vcf 2KB
unsorted.vcf 2KB
.DS_Store 6KB
funny_trio.ped 130B
test.vcf.gz 652B
test.vcf.gz.tbi 267B
LICENSE 1KB
setup.cfg 211B
requirements.txt 192B
loqusdb
models
case.py 1KB
dotdict.py 1KB
identity.py 527B
__init__.py 96B
variant.py 1KB
commands
view.py 4KB
delete.py 2KB
cli.py 2KB
wipe.py 538B
identity.py 781B
__init__.py 481B
update.py 3KB
export.py 4KB
load.py 3KB
migrate.py 646B
constants
__init__.py 544B
exceptions
case.py 90B
vcf.py 93B
__init__.py 53B
plugins
case.py 863B
mongo
case.py 2KB
structural_variant.py 10KB
adapter.py 2KB
__init__.py 95B
variant.py 5KB
__init__.py 140B
variant.py 1KB
sql
__init__.py 0B
load.py 1KB
base.py 316B
build_models
case.py 3KB
__init__.py 64B
variant.py 6KB
__main__.py 398B
__init__.py 1KB
log.py 2KB
utils
case.py 2KB
delete.py 3KB
vcf.py 4KB
__init__.py 0B
variant.py 2KB
update.py 4KB
load.py 7KB
migrate.py 1KB
setup.py 4KB
CHANGELOG.md 43B
README.md 3KB
共 94 条
- 1
资源评论
挣扎的蓝藻
- 粉丝: 14w+
- 资源: 15万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功