The SlopeHunter software does not require any special hardware. A standard computer suitable for most applications nowadays should be sufficient.
SlopeHunter
is written as an R package that requires R (>= 3.5.0)
to be installed on your machine. If you do NOT have R installed, or you do have an older version of R installed on your machine, you would need to install the latest R version from here.
The SlopeHunter
R package depends on a few other R packages that will be automatically installed with SlopeHunter
when you follow the installation guide below. A list of these R dependencies is reported here.
The SlopeHunter
software is compatible with Windows, Linux and macOS. The package has been tested in R under the following systems:
To install the SlopeHunter
R package, simply run
# required only once per machine! devtools::install_github("Osmahmoud/SlopeHunter")
We are going to use data on ... (GIVE DESCRIPTION on BCa DATA)
First, you need to load the SlopeHunter
package:
require(SlopeHunter)
BCa_incidence <- SlopeHunter::read_incidence(filename = "Your-incidence-data-file.gz", )
Install the SlopeHunter R package by following the installation instructions described here.
Slope-Hunter
Report tutorials on the simulated data here ...
Example: Fasting Insulin adjusted for BMI
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.