if (FALSE) {
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")]
p <- PRS_quantitative(plink_path, DummyData, summary_input = trd)
q <- PRS_quantitative(plink_path, DummyData, summary_input = add)
r <- PRS_quantitative(plink_path, DummyData, summary_input = gxe)
summary_regular_quantitative(Qphe_target, Qcov_target,
add_score = p,
Model = 0)
summary_regular_quantitative(Qphe_target, Qcov_target,
add_score = p,
Model = 1)
summary_regular_quantitative(Qphe_target, Qcov_target,
add_score = q,
Model = 2)
summary_regular_quantitative(Qphe_target, Qcov_target,
add_score = q,
gxe_score = r,
Model = 3)
x <- summary_regular_quantitative(Qphe_target, Qcov_target,
add_score = q,
gxe_score = r,
Model = 4)
sink("Qsummary.txt") #to create a file in the working directory
print(x$summary) #to write the output
sink() #to save the output
sink("Individual_risk_values.txt") #to create a file in the working directory
write.table(x$risk.values, sep = " ", row.names = FALSE, col.names = FALSE,
quote = FALSE) #to write the output
sink() #to save the output
x$summary #to obtain the model summary output
x$risk.values #to obtain the predicted risk values of target individuals
}
Run the code above in your browser using DataLab