cor_plot: cor_plot(SNPs,significant,info = FALSE)

Description Usage Arguments Value Examples

View source: R/all.R

Description

A function that creates correlation heatmaps for given significant SNPs from a SNP dataframe.

Usage

1
cor_plot(SNPs,significant,info = FALSE)

Arguments

SNPs

A standardized SNP matrix where the columns take on the values of 0 or 1.

significant

A vector of 0's or 1's that contain which significant SNP's to look at.

info

Default is FALSE. If information such as the chromosome and the position is known, then that can be entered here and will return a correlation heatmap with the labels chromosome - position. The format for this entry is the 2 row dataframe or matrix, where the first row is the chromosome and the second row is the position.

Value

A correlation heatmap with the axis labels either SNP1 ... or chromosome - position

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
data("vignette_lm_dat")
Y <- vignette_lm_dat$Phenotype
SNPs <- vignette_lm_dat[,-1]
fullPreprocess <- preprocess_SNPs(SNPs = SNPs,Y = Y,MAF = 0.01,number_cores = 1)
SNPs <- fullPreprocess$SNPs
Y <- fullPreprocess$Y
fullPreprocess$SNPs_Dropped
principal_comp <- pca_function(SNPs = SNPs,number_components = 1,plot_it = FALSE)
Significant_SNPs <- preselection(Y = Y, SNPs = SNPs,number_cores = 1, principal_components = principal_comp,frequentist = TRUE,controlrate = "bonferroni",threshold = .05,kinship = FALSE,info = FALSE)

cor_plot(SNPs = SNPs,significant = Significant_SNPs$Significant,info = FALSE)

willja16/GWAS.BAYES documentation built on Sept. 24, 2020, 12:48 a.m.