PRS_quantitative {GxEprs}R Documentation

PRS_quantitative function This function uses plink2 and outputs Polygenic Risk Scores (PRSs) of all the individuals, using pre-generated GWAS and/or GWEIS summary statistics. Note that the input used in this function can be generated by using GWAS_quantitative and/or GWEIS_quantitative functions. Users may save the output in a user-specified file (see examples).

Description

PRS_quantitative function This function uses plink2 and outputs Polygenic Risk Scores (PRSs) of all the individuals, using pre-generated GWAS and/or GWEIS summary statistics. Note that the input used in this function can be generated by using GWAS_quantitative and/or GWEIS_quantitative functions. Users may save the output in a user-specified file (see examples).

Usage

PRS_quantitative(plink_path, b_file, summary_input)

Arguments

plink_path

Path to the PLINK executable application

b_file

Prefix of the binary files, where all .fam, .bed and .bim files have a common prefix

summary_input

Pre-generated GWAS and/or GWEIS summary statistics

Value

This function will output

prs.sscore

PRSs for each individual

Examples

## Not run:  
a <- GWAS_quantitative(plink_path, DummyData, Qphe_discovery, Qcov_discovery)
trd <- a[c("ID", "A1", "BETA")]
b <- GWEIS_quantitative(plink_path, DummyData, Qphe_discovery, Qcov_discovery)
add <- b[c("ID", "A1", "ADD_BETA")]
gxe <- b[c("ID", "A1", "INTERACTION_BETA")]
x <- PRS_quantitative(plink_path, DummyData, summary_input = trd)
sink("Q_trd.sscore") #to create a file in the working directory
write.table(x, sep = " ", row.names = FALSE, quote = FALSE) #to write the output
sink() #to save the output
head(x) #to read the head of all columns in the output
x$FID #to extract the family ID's of full dataset
x$IID #to extract the individual ID's of full dataset 
x$PRS #to extract the polygenic risk scores of full dataset
y <- PRS_quantitative(plink_path, DummyData, summary_input = add)
sink("Q_add.sscore") #to create a file in the working directory
write.table(y, sep = " ", row.names = FALSE, quote = FALSE) #to write the output
sink() #to save the output
z <- PRS_quantitative(plink_path, DummyData, summary_input = gxe)
sink("Q_gxe.sscore") #to create a file in the working directory
write.table(z, sep = " ", row.names = FALSE, quote = FALSE) #to write the output
sink() #to save the output

## End(Not run)

[Package GxEprs version 1.1 Index]