This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| source("lib/check_packages.R") | |
| check_packages() | |
| load("data/ubp_phyloseq_metagenomeseq.RData") | |
| library(vegan) | |
| library(ggplot2) | |
| library(cluster) | |
| library(phyloseq) | |
| library(cowplot) | |
| library(reshape2) | |
| library(scales) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| getSNPImputed <- function(SNPs) | |
| { | |
| #Counting allele 1 | |
| if (!require("data.table")) stop("Install packages data.table") | |
| if (!require("RMySQL")) stop("Install packages RMySQL") | |
| if (!require("rio")) stop("Install packages rio") | |
| if (!require("gtools")) stop("Install packages gtools") | |
| convertProbsToDoses <- function(props, alleleToReturnAorB="A") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Welcome to the COPSAC ggplot Kaplan-Meier template. It builds nice and very customizable KM curves as shown below. Please run the two functions to load into memory, it works like a SAS macro. | |
| # Load dependencies | |
| library(survival) | |
| library(ggplot2) | |
| library(cowplot) | |
| library(reshape2) | |
| # Run these functions to load into memory | |
| # Define custom function to create a survival data.frame. Credit http://www.ceb-institute.org/bbs/wp-content/uploads/2011/09/handout_ggplot2.pdf | |
| createSurvivalFrame <- function(f.survfit){ |
NewerOlder