Skip to main content

Comprehensive genetic risk assessment

Project description

GenRisk

GenRisk is a package that implements different gene-based scoring schemes to analyze and find significant genes within a phenotype in a population

Requirements

Installation

GenRisk can be installed on python3+ from the latest code on GitHub with:

$ pip install git+https://github.com/AldisiRana/GenRisk.git

Usage

Score genes

This command calculate the gene-based scores for a given dataset.

It requires an annotated vcf (i.e: annotated with variant ID , ALT, Gene, and deleterious score, for more information check out the example in toy_example)

$ genrisk score-genes --annotated-vcf annotated_vcf_toy.vcf --temp-dir test/ --output-file test.tsv --weight-func beta --maf-threshold 0.01 --alt-col ALT --variant-col ID --af-col AF --del-col CADD --gene-col Gene
  • For further CLI options and parameters use --help

Calculate p-values

This function calculates the p-values across the genes between two given groups

$ genrisk find-association --scores-file toy_example/toy_dataset_scores --info-file toy_example/toy.pheno 
--cases-column trait1 --samples-column IID --test betareg --output-file toy_dataset_betareg.tsv --covariates age,sex
--adj-pval bonferroni
  • For further CLI options and parameters use --help

Visualize

Visualize manhatten plot and qqplot for the data.

$ genrisk visualize --pvals-file toy_example/toy_dataset_scores --info-file annotated_toy_dataset.vcf
--qq-output toy_example/toy_dataset_qqplot.jpg --manhattan-output toy_example/toy_dataset_manhattanplot.jpg 
  • For further CLI options and parameters use --help

Create model

Create a prediction model (classifier or regressor) with given dataset

$ genrisk create-model --data-file toy_example_regressor_features.tsv --model-type regressor --output-folder toy_regressor 
--test-size 0.25 --test --model-name toy_regressor --target-col trait1 --imbalanced --normalize
  • For further CLI options and parameters use --help

Test model

Evaluate a prediction model with a given dataset.

$ genrisk test-model --model-path regressor_model.pkl --input-file testing_dataset.tsv --model-type regressor 
--labels-col target --samples-col IID
  • For further CLI options and parameters use --help

Get PRS scores

This command aquires a PGS file (provided by the user or downloaded from pgscatalog) then calculates the PRS scores for dataset. Note: This command is interactive.

$ genrisk get-prs
  • For further CLI options and parameters use --help

Get GBRS

Calculate gene-based risk scores for individuals. If users do not have weights for calculation, they can provide a file with the phenotype and weights will be calculated.

$genrisk get-gbrs --scores-file scores_file.tsv --weights-file weights_file.tsv --weights-col zscore --sum
  • For further CLI options and parameters use --help

Contact

If you have any questions or problems with the tool or its installation please feel free to create an issue in the repository or contact me via email: aldisi.rana@gmail.com

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

GenRisk-0.0.1.tar.gz (19.4 kB view details)

Uploaded Source

Built Distribution

GenRisk-0.0.1-py3-none-any.whl (22.8 kB view details)

Uploaded Python 3

File details

Details for the file GenRisk-0.0.1.tar.gz.

File metadata

  • Download URL: GenRisk-0.0.1.tar.gz
  • Upload date:
  • Size: 19.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.9

File hashes

Hashes for GenRisk-0.0.1.tar.gz
Algorithm Hash digest
SHA256 35bd09e9d3ecdcb01ffb7cc129f3c79e3a0281048b6cddb462208023153a1d36
MD5 649dab8fc75c1a9a619078f3436753c2
BLAKE2b-256 d9aceef9be1ba5f1bac8ae3df8f6bbfbf80d7c8577c8ac4ecc69575a0c05ac6c

See more details on using hashes here.

File details

Details for the file GenRisk-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: GenRisk-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 22.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.9

File hashes

Hashes for GenRisk-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3985db983e331ff50e5d89e12c45a2bbd4f1895fe7e760448a1515796c7902e0
MD5 29ccc64549cca760d6c3ab63276c8192
BLAKE2b-256 7d8525b2f8693992a06573a15b4ddebc42228be90e0a89dc7a0e783c93cf71f9

See more details on using hashes here.

Supported by

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