Code Monkey home page Code Monkey logo

jordan's Introduction

jordan

R script to calculate Polygenic Risk Score from genotype data, and eventually plot them.

Install

Clone the repository locally: git clone https://github.com/TesiNicco/jordan.git
You may need to make the main file executable by typing: chmod +x ./jordan/bin/jordan.R
Make sure you have the required R packages in place:
argparse
data.table
stringr
ggplot2
In addition to R packages, you need to have https://www.cog-genomics.org/plink/2.0/ and https://www.cog-genomics.org/plink/1.9/ installed in your system.
If all this is OK, then you should be able to run the script.

How to use

By running:
./bin/jordan.R -h
will display jordan options. To run, jordan requires:

  • genotype data (PLINK or VCF format)
  • snplist (list of SNPs to use for the PRS, including CHROM, POS, EFFECT_ALLELE, BETA (or OR)
  • outname (the name of the output folder)
  • isdosage: binary flag whether data is genotyped or imputed (TRUE/FALSE)
  • plot: binary flag to plot densities of not (TRUE/FALSE)

Test

To test everything is allright, you can use the following script alongside the example datasets provided in the repository. The example data will make a PRS from 85 SNPs associated with Alzheimer's Disease in individuals from the 1000Genome Project:
./bin/jordan.R --genotype example_data/example_data_plink --snplist example_data/AD_snps.txt --outname test_output --isdosage TRUE --plot TRUE
This should run successfully, and will display results in the output directory specified:

  • PRS_density.pdf: density of the PRS across individuals
  • PRS_SNPs.pdf: SNPs included/excluded from the PRS, and relative effect sizes
  • PRS_table.txt: tab-delimited table with samples in rows and PRS in column
  • snpsInterest.txt: tab-delimited table with information about included/excluded SNPs.

Contact

For comments, feedbacks, or question, feel free to reach me at [email protected] or open an issue.

jordan's People

Contributors

tesinicco avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.