View source: R/ridgesum.pipeline.R
ridgesum.pipeline | R Documentation |
The easy way to run ridgesum
ridgesum.pipeline(
cor,
chr = NULL,
pos = NULL,
snp = NULL,
A1 = NULL,
A2 = NULL,
ref.bfile = NULL,
test.bfile = NULL,
LDblocks = NULL,
lambda = exp(seq(log(0.001), log(0.1), length.out = 20)),
s = c(0.2, 0.5, 0.9, 1),
destandardize = F,
trace = 1,
exclude.ambiguous = TRUE,
keep.ref = NULL,
remove.ref = NULL,
keep.test = NULL,
remove.test = NULL,
sample = NULL,
cluster = NULL,
max.ref.bfile.n = 20000,
nomatch = FALSE,
...
)
cor |
A vector of SNP-wise correlations with phenotype derived from summary statistics |
chr |
Together with |
pos |
Together with |
A1 |
Alternative allele (effect allele) for |
A2 |
Reference allele for |
ref.bfile |
|
test.bfile |
|
LDblocks |
Either (1) one of "EUR.hg19", "AFR.hg19", "ASN.hg19", "EUR.hg38", "AFR.hg38", "ASN.hg38", to use blocks defined by Berisa and Pickrell (2015) based on the 1000 Genome data, or (2) a vector to define LD blocks, or (3) a data.frame of regions in bed format |
lambda |
to pass on to |
s |
A vector of s |
destandardize |
Should coefficients from |
trace |
Controls the amount of output. |
exclude.ambiguous |
Should ambiguous SNPs (C/G, A/T) be excluded? |
keep.ref |
Participants to keep from the reference panel (see |
remove.ref |
Participants to remove from the reference panel(see |
keep.test |
Participants to keep from the testing dataset (see |
remove.test |
Participants to remove from the testing dataset (see |
sample |
Sample size of the random sample taken of ref.bfile |
cluster |
A |
max.ref.bfile.n |
The maximum sample size allowed in the reference panel |
... |
parameters to pass to |
A ridgesum.pipeline
object with the following elements
beta |
A list of ridgesum coefficients: one list element for each |
test.extract |
A logical vector for the SNPs in |
also.in.refpanel |
A logical vector for the SNPs in |
sumstats |
A |
sd |
The standard deviation for the testing dataset |
test.bfile |
The testing dataset |
keep.test |
Sample to keep in the testing dataset |
ref.bfile |
The reference panel dataset |
keep.ref |
Sample to keep in the reference panel dataset |
lambda, s, keep.test, destandardized |
Information to pass on to |
pgs |
A matrix of polygenic scores |
destandardized |
Are the coefficients destandardized? |
exclude.ambiguous |
Were ambiguous SNPs excluded? |
Berisa, T. & Pickrell, J. K. Approximately independent linkage disequilibrium blocks in human populations. Bioinformatics 32, 283-285 (2015).
## Not run:
### Read summary statistics file ###
ss <- fread("./data/summarystats.txt")
head(ss)
### Convert p-values to correlations, assuming a sample size of 60000 for the p-values ###
cor <- p2cor(p = ss$P_val, n = 60000, sign=log(ss$OR_A1))
### Run ridgesum using standard pipeline ###
out <- ridgesum.pipeline(cor=cor, chr=ss$Chr, pos=ss$Position,
A1=ss$A1, A2=ss$A2,
ref.bfile=ref.bfile, test.bfile=test.bfile,
LDblocks = "EUR.hg19")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.