loqusdb

A simple observation count database

https://github.com/Clinical-Genomics/loqusdb

Science Score: 39.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 1 DOI reference(s) in README
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.8%) to scientific vocabulary

Keywords from Contributors

bioinformatics pypi reporting genomics interactive serializer cycles packaging network-simulation shellcodes
Last synced: 10 months ago · JSON representation

Repository

A simple observation count database

Basic Info
  • Host: GitHub
  • Owner: Clinical-Genomics
  • License: mit
  • Language: Python
  • Default Branch: main
  • Homepage:
  • Size: 13 MB
Statistics
  • Stars: 11
  • Watchers: 12
  • Forks: 9
  • Open Issues: 21
  • Releases: 44
Created over 10 years ago · Last pushed about 1 year ago
Metadata Files
Readme Changelog Contributing License Codeowners

README.md

loqusdb

Publish to PyPI Coverage Status PyPI Version

Small tool to set up a local variant database. If you find Loqusdb useful in your work, please cite the article.

Right now Locusdb uses mongodb as backend for storing variants, but there should not be a huge difference to use another database manager.

Find more detailed instructions and examples in the documentation.

Installation

poetry install

or

$git clone https://github.com/moonso/loqusdb $cd loqusdb $poetry install

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 adheres to the VCF format.

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 been seen before, then the variant is added to the database

Command Line Interface

``` $ loqusdb Usage: loqusdb [OPTIONS] COMMAND [ARGS]...

loqusdb: manage a local variant count database.

Options: -db, --database TEXT Defaults to 'loqusdb' if not specified -u, --username TEXT -p, --password TEXT -a, --authdb TEXT If authentication should be done against another database than --database

-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]

--uri TEXT Specify a mongodb uri -c, --config FILENAME Use a config with db information -t, --test Used for testing. This will use a mongomock database.

-g, --genome-build [GRCh37|GRCh38] Specify what genome build to use -v, --verbose --version Show the version and exit. --help Show this message and exit.

Commands: annotate Annotate a VCF with observations cases Display cases in database delete Delete the variants of a family dump Dump the database export Export variants to VCF format identity Search identity collection index Add indexes to database load Load the variants of a family migrate Migrate an old loqusdb instance profile Loads variants to be used in profiling restore Restore database from dump update Update an existing case with a new type of variants variants Display variants in database wipe Wipe a loqusdb instance ```

Database

Connecting

Connection can be specified on command line with --database, --username, --password, --port, --host and/or --uri. Or these options can be sent with a config file that can take the same options:

yaml uri: mongodb://loqusdb-username:loqusdb-pwd@localhost:27030/loqusdb-rd?authSource=admin db_name: loqusdb_test or yaml host: localhost port: 27030 username: loqusdb-username password: loqusdb-pwd authdb: admin db_name: loqusdb_test

Mongo

The collections are defined as follows:

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', ...] }

Owner

  • Name: Clinical Genomics
  • Login: Clinical-Genomics
  • Kind: organization
  • Location: Stockholm, Sweden

GitHub Events

Total
  • Create event: 26
  • Issues event: 5
  • Release event: 8
  • Watch event: 2
  • Delete event: 13
  • Member event: 1
  • Issue comment event: 23
  • Push event: 35
  • Pull request review comment event: 17
  • Pull request review event: 30
  • Pull request event: 32
  • Fork event: 2
Last Year
  • Create event: 26
  • Issues event: 5
  • Release event: 8
  • Watch event: 2
  • Delete event: 13
  • Member event: 1
  • Issue comment event: 23
  • Push event: 35
  • Pull request review comment event: 17
  • Pull request review event: 30
  • Pull request event: 32
  • Fork event: 2

Committers

Last synced: over 2 years ago

All Time
  • Total Commits: 283
  • Total Committers: 16
  • Avg Commits per committer: 17.688
  • Development Distribution Score (DDS): 0.597
Past Year
  • Commits: 11
  • Committers: 5
  • Avg Commits per committer: 2.2
  • Development Distribution Score (DDS): 0.636
Top Committers
Name Email Commits
Måns Magnusson m****n@s****e 114
moonso m****s@g****m 70
Adam Rosenbaum a****m@s****e 28
Mropat m****t@g****m 17
Clinical Genomics Bot c****m@g****m 14
Chiara Rasi r****a@g****m 9
Daniel Nilsson d****n@g****m 9
Robin Andeer r****r@g****m 5
J35P312 j****t@s****e 4
Henrik Stranneheim h****m@s****e 4
Björn Hallström b****m@g****m 2
Maria Ropat 3****t 2
Jesper Eisfeldt J****2 2
karlnyr k****1@h****m 1
Chiara Rasi r****a@g****m 1
dependabot[bot] 4****] 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 11 months ago

All Time
  • Total issues: 54
  • Total pull requests: 115
  • Average time to close issues: about 2 months
  • Average time to close pull requests: 26 days
  • Total issue authors: 14
  • Total pull request authors: 17
  • Average comments per issue: 1.15
  • Average comments per pull request: 1.11
  • Merged pull requests: 87
  • Bot issues: 0
  • Bot pull requests: 11
Past Year
  • Issues: 6
  • Pull requests: 45
  • Average time to close issues: 11 days
  • Average time to close pull requests: 5 days
  • Issue authors: 2
  • Pull request authors: 6
  • Average comments per issue: 0.5
  • Average comments per pull request: 1.13
  • Merged pull requests: 32
  • Bot issues: 0
  • Bot pull requests: 6
Top Authors
Issue Authors
  • dnil (17)
  • moonso (9)
  • J35P312 (8)
  • northwestwitch (6)
  • robinandeer (3)
  • Jakob37 (2)
  • adrosenbaum (2)
  • patrikgrenfeldt (1)
  • praveenraj2018 (1)
  • ViktorHy (1)
  • ingkebil (1)
  • maehler (1)
  • henrikstranneheim (1)
  • mhkc (1)
Pull Request Authors
  • dnil (27)
  • moonso (21)
  • henrikstranneheim (18)
  • ramprasadn (12)
  • dependabot[bot] (10)
  • adrosenbaum (8)
  • Mropat (7)
  • northwestwitch (6)
  • peterpru (4)
  • J35P312 (3)
  • Jakob37 (2)
  • sjurug (1)
  • ingkebil (1)
  • bjhall (1)
  • karlnyr (1)
Top Labels
Issue Labels
bug (3) enhancement (3)
Pull Request Labels
dependencies (10) python (5)

Dependencies

requirements-dev.txt pypi
  • pytest * development
requirements.txt pypi
  • click ==7.1.2
  • coloredlogs ==14.0
  • cyvcf2 ==0.30.12
  • mongo_adapter >=0.3.3
  • mongomock ==3.18.0
  • numpy ==1.21.4
  • ped_parser *
  • pip ==21.3.1
  • pymongo ==3.7.1
  • pytest ==5.4.3
  • pyyaml ==5.4.0
  • setuptools ==59.2.0
  • vcftoolbox ==1.5
.github/workflows/build_and_publish.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
  • pypa/gh-action-pypi-publish master composite
.github/workflows/bumpversion.yml actions
  • Clinical-Genomics/bump2version-ci master composite
.github/workflows/tests.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v1 composite
  • wbari/start-mongoDB v0.2 composite