if (FALSE) {
x <- GWAS_binary(plink_path, DummyData, Bphe_discovery, Bcov_discovery,
thread = 20)
sink("B_out.trd.sum") #to create a file in the working directory
write.table(x[c("ID", "A1", "OR")], sep = " ",
row.names = FALSE, quote = FALSE) #to write the output
sink() #to save the output
head(x) #to obtain the head of GWAS summary statistics of additive SNP effects
x$CHROM #to extract the chromosome number
x$POS #to extract the base pair position
x$ID #to extract the SNP ID
x$REF #to extract the reference allele
x$ALT #to extract the alternate allele
x$A1 #to extract the minor allele
x$OBS_CT #to extract the number of allele observations
x$OR #to extract the odds ratios of the SNP effects
x$LOG_OR_SE #to extract the standard errors of log odds
x$Z_STAT #to extract the test statistics
x$P #to extract the p values
}
Run the code above in your browser using DataLab