R : Copyright 2005, The R Foundation for Statistical Computing Version 2.1.1 (2005-06-20), ISBN 3-900051-07-0 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for a HTML browser interface to help. Type 'q()' to quit R. > ### *
> ### > attach(NULL, name = "CheckExEnv") > assign(".CheckExEnv", as.environment(2), pos = length(search())) # base > ## add some hooks to label plot pages for base and grid graphics > setHook("plot.new", ".newplot.hook") > setHook("persp", ".newplot.hook") > setHook("grid.newpage", ".gridplot.hook") > > assign("cleanEx", + function(env = .GlobalEnv) { + rm(list = ls(envir = env, all.names = TRUE), envir = env) + RNGkind("default", "default") + set.seed(1) + options(warn = 1) + delayedAssign("T", stop("T used instead of TRUE"), + assign.env = .CheckExEnv) + delayedAssign("F", stop("F used instead of FALSE"), + assign.env = .CheckExEnv) + sch <- search() + newitems <- sch[! sch %in% .oldSearch] + for(item in rev(newitems)) + eval(substitute(detach(item), list(item=item))) + missitems <- .oldSearch[! .oldSearch %in% sch] + if(length(missitems)) + warning("items ", paste(missitems, collapse=", "), + " have been removed from the search path") + }, + env = .CheckExEnv) > assign("..nameEx", "__{must remake R-ex/*.R}__", env = .CheckExEnv) # for now > assign("ptime", proc.time(), env = .CheckExEnv) > grDevices::postscript("GeneNT-Examples.ps") > assign("par.postscript", graphics::par(no.readonly = TRUE), env = .CheckExEnv) > options(contrasts = c(unordered = "contr.treatment", ordered = "contr.poly")) > options(warn = 1) > library('GeneNT') Loading required package: e1071 Loading required package: class Loading required package: GeneTS Loading required package: locfdr Loading required package: graph Loading required package: cluster Loading required package: Ruuid Creating a new generic function for 'print' in 'Ruuid' Loading required package: RBGL Attaching package: 'RBGL' The following object(s) are masked from package:e1071 : extractPath > > assign(".oldSearch", search(), env = .CheckExEnv) > assign(".oldNS", loadedNamespaces(), env = .CheckExEnv) > cleanEx(); ..nameEx <- "BEST.kendall" > > ### * BEST.kendall > > flush(stderr()); flush(stdout()) > > ### Name: BEST.kendall > ### Title: BLAST type search for similar co-expressions with controlled FDR > ### and MAS using Kendall correlation statistic > ### Aliases: BEST.kendall > ### Keywords: cluster htest > > ### ** Examples > > # load GeneNT and GeneTS library > library(GeneTS) > library(GeneNT) > > #EITHER use the internal dataset > data(dat) > #OR use the following if you want to import external data > #dat <- read.table("gal.txt", h = T, row.names = 1) > #Note, data matrix name has to be "dat" > > #use (FDR, MAS) criteria (0.2, 0.5) and seed gene "GAL7" as example to screen gene pairs > #g5 <- BEST.kendall("GAL7", 0.2, 0.5) > #bkG1 <- g5$bkG1 > > #bkG2 contains gene pairs that passed the two-stage screening > #bkG2 <- g5$bkG2 > > > > cleanEx(); ..nameEx <- "BEST.pearson" > > ### * BEST.pearson > > flush(stderr()); flush(stdout()) > > ### Name: BEST.pearson > ### Title: BLAST type search for similar co-expressions with controlled FDR > ### and MAS using Pearson correlation statistic > ### Aliases: BEST.pearson > ### Keywords: cluster htest > > ### ** Examples > > # load GeneNT and GeneTS library > library(GeneTS) > library(GeneNT) > > #EITHER use the example dataset > data(dat) > #OR use the following if you want to import external data > #dat <- read.table("gal.txt", h = T, row.names = 1) > #Note, data matrix name has to be "dat" > > #use (FDR, MAS) criteria (0.2, 0.5) and seed gene "GAL7" as example to screen gene pairs > #g4 <- BEST.pearson("GAL7", 0.2, 0.5) > #bpG1 <- g4$bpG1 > > #bpG2 contains gene pairs that passed two-stage screening > #bpG2 <- g4$bpG2 > > > > cleanEx(); ..nameEx <- "cor.confint" > > ### * cor.confint > > flush(stderr()); flush(stdout()) > > ### Name: cor.confint > ### Title: Asymptotic confidence intervals of Pearson correlation > ### coefficient > ### Aliases: cor.confint > ### Keywords: cluster htest > > ### ** Examples > > #simulate a vector of correlation coefficients > #cor <- runif(20, -1, 1) > #g6 <- cor.confint(cor, 20, 0.05) > #g6$conf.int1 > #g6$conf.int2 > > > > cleanEx(); ..nameEx <- "cor.rep" > > ### * cor.rep > > flush(stderr()); flush(stdout()) > > ### Name: cor.rep > ### Title: Estimating gene expression correlation from replicated > ### microarray data > ### Aliases: cor.rep > ### Keywords: cluster htest > > ### ** Examples > > # load GeneNT and GeneTS library > library(GeneNT) > d0 <- rnorm(100) > for(l in 2:10) + d0 <- rbind(d0, rnorm(100)) > d0<- t(d0) > M <- cor.rep(d0, m = 4, G= 25) > > > > cleanEx(); ..nameEx <- "cor.rep.bootci" > > ### * cor.rep.bootci > > flush(stderr()); flush(stdout()) > > ### Name: cor.rep.bootci > ### Title: Bootstrap Confidence Interval for multivariate correlation > ### estimator from replicated gene microarray data > ### Aliases: cor.rep.bootci > ### Keywords: cluster htest > > ### ** Examples > > # load GeneNT and GeneTS library > library(GeneNT) > d0 <- rnorm(8) > #parameters are set to small values for quick demo purposes > for(l in 2:3) + d0 <- rbind(d0, rnorm(8)) > d0<- t(d0) > M <- cor.rep(d0, m = 4, G= 2) > M.bootci <- cor.rep.bootci(d0, m = 4, G= 2, alpha = 0.05) > > > > cleanEx(); ..nameEx <- "cor.rep.pv" > > ### * cor.rep.pv > > flush(stderr()); flush(stdout()) > > ### Name: cor.rep.pv > ### Title: Multivariate correlation estimator from replicated gene > ### microarray data > ### Aliases: cor.rep.pv > ### Keywords: cluster htest > > ### ** Examples > > # load GeneNT and GeneTS library > library(GeneNT) > d0 <- rnorm(100) > #sample size is set to 3 for quick demo purposes > for(l in 2:3) + d0 <- rbind(d0, rnorm(100)) > d0<- t(d0) > M <- cor.rep(d0, m = 4, G= 25) > M.pv <- cor.rep.pv(d0, m = 4, G= 25) > > > > cleanEx(); ..nameEx <- "corfdrci" > > ### * corfdrci > > flush(stderr()); flush(stdout()) > > ### Name: corfdrci > ### Title: Two-stage screening procedure for screening gene pairs based on > ### Pearson correlation statistic > ### Aliases: corfdrci > ### Keywords: cluster htest > > ### ** Examples > > > # load GeneNT and GeneTS library > library(GeneTS) > library(GeneNT) > library(e1071) > > #EITHER use the example dataset > data(dat) > #OR use the following if you want to import external data > #dat <- read.table("gal.txt", h = T, row.names = 1) > #Note, data matrix name has to be "dat" > > #use (FDR, MAS) criteria (0.2, 0.5) as example to screen gene pairs > #g1 <- corfdrci(0.2, 0.5) > #pG1 <- g1$pG1 > #pG2 contains gene pairs that passed two-stage screening > #pG2 <- g1$pG2 > #use (FDR, MAS) criteria (0.2, 0.5) as example to screen gene pairs > #g2 <- kendallfdrci(0.2, 0.5) > #kG1 <- g2$kG1 > #kG2 contains gene pairs that passed two-stage screening > #kG2 <- g2$kG2 > #generate Pajek compatible matrix to visualize network > #getBM(pG2, kG2) > #clustering from network using network constraint clustering, for example, p = 3. > #spclust(3, pG2, kG2) > > > > cleanEx(); ..nameEx <- "corfdrci.inv" > > ### * corfdrci.inv > > flush(stderr()); flush(stdout()) > > ### Name: corfdrci.inv > ### Title: Inverse screening procedure based on Pearson correlation > ### coefficient > ### Aliases: corfdrci.inv > ### Keywords: cluster htest > > ### ** Examples > > > # load GeneNT and GeneTS library > library(GeneTS) > library(GeneNT) > > #EITHER use the example dataset > data(dat) > #OR use the following if you want to import external data > #dat <- read.table("gal.txt", h = T, row.names = 1) > #Note, data matrix name has to be "dat" > #Subset data to run faster > dat <- dat[1:10,] > #Set MAS level cormin = 0.8, calculate fdr adjusted p-values. > #fdrp8 <- corfdrci.inv(0.8) > > > > cleanEx(); ..nameEx <- "dat" > > ### * dat > > flush(stderr()); flush(stdout()) > > ### Name: dat > ### Title: Part of galactose metabolism data. Ideker et al. Science, > ### 292:929-934 > ### Aliases: dat > ### Keywords: datasets > > ### ** Examples > > data(dat) > boxplot(dat, xlab = "different experimental conditions", ylab = "log2 ratio of cy3/cy5 intensities") > > > > cleanEx(); ..nameEx <- "getBM" > > ### * getBM > > flush(stderr()); flush(stdout()) > > ### Name: getBM > ### Title: Generate Pajek compatible matrix from screened gene pairs > ### Aliases: getBM > ### Keywords: cluster htest > > ### ** Examples > > > # load GeneNT and GeneTS library > library(GeneTS) > library(GeneNT) > library(e1071) > > #EITHER use the example dataset > data(dat) > #OR use the following if you want to import external data > #dat <- read.table("gal.txt", h = T, row.names = 1) > #Note, data matrix name has to be "dat" > #use (FDR, MAS) criteria (0.2, 0.5) as example to screen gene pairs > #g1 <- corfdrci(0.2, 0.5) > #pG1 <- g1$pG1 > #pG2 contains gene pairs that passed two-stage screening > #pG2 <- g1$pG2 > #g2 <- kendallfdrci(0.2, 0.5) #use (FDR, MAS) criteria (0.2, 0.5) as example to screen gene pairs > #kG1 <- g2$kG1 > #kG2 contains gene pairs that passed two-stage screening > #kG2 <- g2$kG2 > #generate Pajek compatible matrix to visualize network > #getBM(pG2, kG2) > #clustering from network using network constraint clustering, for example. p=3. > #spclust(3, pG2, kG2) > > > > cleanEx(); ..nameEx <- "kendall.confint" > > ### * kendall.confint > > flush(stderr()); flush(stdout()) > > ### Name: kendall.confint > ### Title: Asymptotic confidence intervals of Pearson correlation > ### coefficient > ### Aliases: kendall.confint > ### Keywords: cluster htest > > ### ** Examples > > x <- runif(20, -1, 1) > y <- runif(20, -1, 1) > #kendall.confint(x,y,0.05) > > > > cleanEx(); ..nameEx <- "kendallfdrci" > > ### * kendallfdrci > > flush(stderr()); flush(stdout()) > > ### Name: kendallfdrci > ### Title: Two-stage screening procedure based on Kendall correlation > ### coefficient > ### Aliases: kendallfdrci > ### Keywords: cluster htest > > ### ** Examples > > # load GeneNT and GeneTS library > library(GeneTS) > library(GeneNT) > library(e1071) > > #EITHER use the example dataset > data(dat) > #OR use the following if you want to import external data > #dat <- read.table("gal.txt", h = T, row.names = 1) > #Note, data matrix name has to be "dat" > #use (FDR, MAS) criteria (0.2, 0.5) as example to screen gene pairs > #g1 <- corfdrci(0.2, 0.5) > #pG1 <- g1$pG1 > #pG2 is the dataset containing gene pairs that passed two-stage screening > #pG2 <- g1$pG2 > #use (FDR, MAS) criteria (0.2, 0.5) as example to screen gene pairs > #g2 <- kendallfdrci(0.2, 0.5) > #kG1 <- g2$kG1 > #kG2 is the dataset containing gene pairs that passed two-stage screening > #kG2 <- g2$kG2 > #generate Pajek compatible matrix to visualize network > #getBM(pG2, kG2) > #clustering from network using network constraint clustering, for example, p = 3. > #spclust(3, pG2, kG2) > > > > cleanEx(); ..nameEx <- "ncclust" > > ### * ncclust > > flush(stderr()); flush(stdout()) > > ### Name: ncclust > ### Title: Network constrained clustering > ### Aliases: ncclust > ### Keywords: cluster htest > > ### ** Examples > > # load GeneNT and GeneTS library > library(GeneTS) > library(GeneNT) > library(e1071) > > #EITHER use the internal dataset > data(dat) > #OR use the following if you want to import external data > #dat <- read.table("gal.txt", h = T, row.names = 1) > #Note, data matrix name has to be "dat" > #use (FDR, MAS) criteria (0.2, 0.5) as example to screen gene pairs > #g1 <- corfdrci(0.2, 0.5) > #pG1 <- g1$pG1 > #pG2 contains gene pairs that passed two-stage screening > #pG2 <- g1$pG2 > #use (FDR, MAS) criteria (0.2, 0.5) as example to screen gene pairs > #g2 <- kendallfdrci(0.2, 0.5) > #kG1 <- g2$kG1 > #kG2 contains gene pairs that passed two-stage screening > #kG2 <- g2$kG2 > #generate Pajek compatible matrix to visualize network > #getBM(pG2, kG2) > #clustering from network using network constraint clustering > #ncclust(3, pG2, kG2) > > > > cleanEx(); ..nameEx <- "pcor.confint" > > ### * pcor.confint > > flush(stderr()); flush(stdout()) > > ### Name: pcor.confint > ### Title: Asymptotic confidence intervals of partial correlation > ### coefficient > ### Aliases: pcor.confint > ### Keywords: cluster htest > > ### ** Examples > > pcor <- runif(20, -1, 1) #simulate a vector of correlation coefficients > #g7 <- pcor.confint(pcor, 20, 0.05) > #g7$conf.int1 > #g7$conf.int2 > > > > cleanEx(); ..nameEx <- "pcorfdrci" > > ### * pcorfdrci > > flush(stderr()); flush(stdout()) > > ### Name: pcorfdrci > ### Title: Two-stage screening procedure based on partial correlation > ### coefficient in Graphic Gaussian Model framework > ### Aliases: pcorfdrci > ### Keywords: cluster htest > > ### ** Examples > > # load GeneNT and GeneTS library > library(GeneTS) > library(GeneNT) > > #EITHER use the example dataset > data(dat) > #OR use the following if you want to import external data > #dat <- read.table("gal.txt", h = T, row.names = 1) > #Note, data matrix name has to be "dat" > > #use (FDR, MAS) criteria (0.2, 0.2) as example to screen gene pairs > #g3 <- pcorfdrci(0.2, 0.2) > #G1 <- g3$G1.all > #G2 is the dataset containing gene pairs that passed two-stage screening > #G2 <- g3$G2 > > > > cleanEx(); ..nameEx <- "pcorfdrci.inv" > > ### * pcorfdrci.inv > > flush(stderr()); flush(stdout()) > > ### Name: pcorfdrci.inv > ### Title: Inverse screening procedure based on Kendall correlation > ### coefficient > ### Aliases: pcorfdrci.inv > ### Keywords: cluster htest > > ### ** Examples > > # load GeneNT and GeneTS library > library(GeneTS) > library(GeneNT) > > #EITHER use the example dataset > data(dat) > #OR use the following if you want to import external data > #dat <- read.table("gal.txt", h = T, row.names = 1) > #Note, data matrix name has to be "dat" > #Subset data to run faster > dat <- dat[1:10,] > #Set MAS level pcormin = 0.8, calculate fdr adjusted p-values. > #fdrp8 <- pcorfdrci.inv(0.8) > > > > cleanEx(); ..nameEx <- "sm.name" > > ### * sm.name > > flush(stderr()); flush(stdout()) > > ### Name: sm.name > ### Title: Extract gene names from data matrix > ### Aliases: sm.name > ### Keywords: cluster htest > > ### ** Examples > > # load GeneNT and GeneTS library > library(GeneTS) > library(GeneNT) > > #EITHER use the example dataset > data(dat) > #OR use the following if you want to import external data > #dat <- read.table("gal.txt", h = T, row.names = 1) > #Note, data matrix name has to be "dat" > #calculate correlation matrix > M <- cor(t(dat)) > #extract gene names (matrix object) from the correlation matrix > #NL <- sm.name(M) > > > > cleanEx(); ..nameEx <- "tdclust" > > ### * tdclust > > flush(stderr()); flush(stdout()) > > ### Name: tdclust > ### Title: Traditional clustering > ### Aliases: tdclust > ### Keywords: cluster htest > > ### ** Examples > > # load GeneNT and GeneTS library > library(GeneTS) > library(GeneNT) > > #EITHER use the example dataset > data(dat) > #OR use the following if you want to import external data > #dat <- read.table("gal.txt", h = T, row.names = 1) > #Note, data matrix name has to be "dat" > #Regular hierarchical clustering, for example, p = 3. > #tdclust(3) > > > > ### *