if (FALSE) {
a <- GWAS_binary(plink_path, DummyData, Bphe_discovery, Bcov_discovery)
trd <- a[c("ID", "A1", "OR")]
b <- GWEIS_binary(plink_path, DummyData, Bphe_discovery, Bcov_discovery)
add <- b[c("ID", "A1", "ADD_OR")]
gxe <- b[c("ID", "A1", "INTERACTION_OR")]
p <- PRS_binary(plink_path, DummyData, summary_input = trd)
q <- PRS_binary(plink_path, DummyData, summary_input = add)
r <- PRS_binary(plink_path, DummyData, summary_input = gxe)
summary_regular_binary(Bphe_target, Bcov_target,
add_score = p,
Model = 0)
summary_regular_binary(Bphe_target, Bcov_target,
add_score = p,
Model = 1)
summary_regular_binary(Bphe_target, Bcov_target,
add_score = q,
Model = 2)
summary_regular_binary(Bphe_target, Bcov_target,
add_score = q,
gxe_score = r,
Model = 3)
summary_regular_binary(Bphe_target, Bcov_target,
add_score = q,
gxe_score = r,
Model = 4)
x <- summary_regular_binary(Bphe_target, Bcov_target,
add_score = q,
gxe_score = r,
Model = 5)
sink("Bsummary.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