# NOT RUN {
## GWAS summary statistics
head(exGWAS)
## Load reference genotype data
bfile <- system.file("extdata", "example.bed", package = "snpsettest")
x <- read_reference_bed(path = bfile)
## Harmonize by SNP IDs
hsumstats1 <- harmonize_sumstats(exGWAS, x)
## Harmonize by genomic position and allele codes
## Reference allele swap will be taken into account
hsumstats2 <- harmonize_sumstats(exGWAS, x, match_by_id = FALSE)
## Check matching entries by flipping allele codes
## Ambiguous SNPs will be excluded from harmonization
hsumstats3 <- harmonize_sumstats(exGWAS, x, match_by_id = FALSE,
check_strand_flip = TRUE)
# }
Run the code above in your browser using DataLab