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")]
x <- PRS_binary(plink_path, DummyData, summary_input = trd)
sink("B_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_binary(plink_path, DummyData, summary_input = add)
sink("B_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_binary(plink_path, DummyData, summary_input = gxe)
sink("B_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
}
Run the code above in your browser using DataLab