Report tutorials on the simulated data here ...
Example: Fasting Insulin adjusted for BMI
Follow the installation instructions described here.
First, you need to load the Slope-Hunter
R package:
library(SlopeHunter)
knitr::opts_chunk$set(eval = FALSE)
BMI_incidence <- read_incidence(filename = "Your-incidence-data-file.gz", gz = TRUE, eaf_col="Freq_Tested_Allele_in_HRS", effect_allele_col="Tested_Allele", other_allele_col="Other_Allele", pval_col = "P", pos_col = "POS")
Insulin_adj_BMI <- read_prognosis("ftp://ftp.ebi.ac.uk/pub/databases/gwas/summary_statistics/MahajanA_25625282_GCST007857/Mahajan_2014_SV_ExomeChip_lnFI_AdjForBMI.txt", gz = FALSE, sep = "\t", snp_col = "ID", beta_col = "BETA", se_col = "SE", pval_col = "P", effect_allele_col = "EA", other_allele_col = "NEA", chr_col = "Chromosome", pos_col = "Position")
Insulin_adj_BMI <- read_prognosis("Your-conditional-outcome-data-file.txt", gz = FALSE, sep = "\t", snp_col = "ID", beta_col = "BETA", se_col = "SE", pval_col = "P", effect_allele_col = "EA", other_allele_col = "NEA", chr_col = "Chromosome", pos_col = "Position")
Data_harmonised <- harmonise_effects(incidence_dat = BMI_incidence, prognosis_dat = Insulin_adj_BMI, by.pos = TRUE, pos_cols = c("POS.incidence", "POS.prognosis"), snp_cols=c("SNP", "SNP"), beta_cols = c("BETA.incidence", "BETA.prognosis"), se_cols=c("SE.incidence", "SE.prognosis"), EA_cols=c("EA.incidence", "EA.prognosis"), OA_cols=c("OA.incidence", "OA.prognosis") )
nrow(Data_harmonised) # No. SNPs present in both datasets attributes(Data_harmonised)$info # Get info on the harmonisation process
Data_to_prune <- Data_harmonised[!Data_harmonised$remove, ] nrow(Data_to_prune) # No. SNPs to be pruned
Data_pruned <- LD_prune(Data_to_prune, Random = TRUE, seed = 15151515)
TBA ...
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.