| plot_results | R Documentation |
QQ plots
plot_results(results="",by="",plot_all=TRUE, var = "", save_plot=TRUE, plot_name="",
bf= FALSE , save_qq = TRUE)
results |
Results datarame from "get_results()" |
by |
Visualize results by "trait" OR by "set" |
plot_all |
plot_all = TRUE plots all the variables in the results dataframe and |
var |
Variable name to plot |
save_plot |
save_plot = TRUE saves the plots in the working directory. |
plot_name |
Argument used to save the file name for the plots. Default value = Results_genomicper_[set/trait] |
bf |
Displays the bonferroni correction |
save_qq |
TRUE returns the qq plot values |
qq |
Data frame with qq plot values |
get_results
data(demo,SNPsAnnotation)
all_data <- read_pvals(data_name=demo,snps_ann=SNPsAnnotation)
genome_results <-genome_order(all_data=all_data)
# Results from genome_order
ordered_alldata <- genome_results$ordered_alldata
gs_locs <- genome_results$gs_locs
# Create new environment to save the data:
gper.env <- new.env()
# Load Pathways
data(RHSA164843,RHSA446343,RHSA8876384,RHSA8964572,RHSA109582,RHSA1474244,envir=gper.env)
paths_res <- read2_paths(ordered_alldata=ordered_alldata,gs_locs=gs_locs,
sets_from="workspace",sets_prefix="RHSA",level="snp",envir=gper.env)
pers_ids <- paths_res$per_ors
pathways<- paths_res$pathways
snps_permutation(ordered_alldata=ordered_alldata,pers_ids=pers_ids,
ntraits=c(7,9),nper=10,saveto="workspace",threshold=0.05,
gs_locs=gs_locs,envir = gper.env)
results <- get_results(res_pattern="Permus",level="snp",
from="workspace",threshold=0.05,envir = gper.env)
#saves plots to working directory
## Not run:
qq <- plot_results(results=results,by="set",plot_all=TRUE)
qq <- plot_results(results=results,by="trait",plot_all=FALSE,var="trait1")
qq <- plot_results(results=results,by="set",
plot_all=FALSE,var="R-HSA-8964572",
save_plot=FALSE) ## IMPORTANT: to EXIT interactive plot
## right click on the plot to stop
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.