dscore: Exact distribution of a genetic score

Description Usage Arguments Value References Examples

View source: R/dscore.R

Description

Computes the exact distribution of a genetic score on a set of SNPs

Usage

1
2
3
4
5
6
7
8
9
dscore(x, ...)

## Default S3 method:
dscore(x, ...)

## S3 method for class 'character'
dscore(x, ...)

pscore(q, x, ...)

Arguments

x

a numeric vector containing either the minor allele frequencies (MAF) of the SNPs used to created the genetic score or the names of the SNPs.

q

quantile

...

further arguments to be passed to useMart function from biomaRt (not necessary).

Value

A vector with the probabilities of having 0, 1, 2, 3, ... 2*K alleles of a genetic score (K indicates the number of SNPs). When name of the SNPs is provided, an attribute called 'MAFs' is also returned

References

I Subirana, G Lucas, C Lluis-Granella, R Elosua, JR Gonzalez. Predicting individual disease probability using the exact distribution of a genetic risk score at the population level. Submitted

Examples

1
2
3
4
5
6
7
gs <- dscore(c(0.23, 0.16, 0.12, 0.02))
gs 
plot(gs)

gs2 <- dscore(c("rs2643762", "rs8689", "rs6295", "rs41235"))
gs2
plot(gs2)

isglobal-brge/SNPassoc documentation built on April 7, 2018, 1:11 p.m.