inst/unitTests/test_diffcoexp.R

#library(SummarizedExperiment)
#library(diffcoexp)
#library(RUnit)
test_diffcoexp <- function() {
    data(gse4158part)
    allowWGCNAThreads()
    exprs.1<-SummarizedExperiment(list(exprs.1=as.matrix(exprs.1)))
      exprs.2<-SummarizedExperiment(list(exprs.1=as.matrix(exprs.2)))
    res=diffcoexp(exprs.1 = exprs.1, exprs.2 = exprs.2, r.method = "spearman")
    checkEquals(nrow(res$DCGs), 15)
    checkEquals(ncol(res$DCGs), 8)
    checkEquals(nrow(res$DCLs), 363)
    checkEquals(ncol(res$DCLs), 12)
}

test_coexpr <- function() {
    data(gse4158part)
    allowWGCNAThreads()
    exprs.1<-SummarizedExperiment(list(exprs.1=as.matrix(exprs.1)))
      exprs.2<-SummarizedExperiment(list(exprs.1=as.matrix(exprs.2)))
    res=coexpr(exprs.1 = exprs.1, exprs.2 = exprs.2, r.method = "spearman")
    checkEquals(nrow(res), 13179)
    checkEquals(ncol(res), 11)
}

test_comparecor <- function() {
    data(gse4158part)
    allowWGCNAThreads()
    exprs.1<-SummarizedExperiment(list(exprs.1=as.matrix(exprs.1)))
      exprs.2<-SummarizedExperiment(list(exprs.1=as.matrix(exprs.2)))
    res=comparecor(exprs.1 = exprs.1, exprs.2 = exprs.2, r.method = "spearman")
    checkEquals(nrow(res), 79800)
    checkEquals(ncol(res), 11)
}

Try the diffcoexp package in your browser

Any scripts or data that you put into this service are public.

diffcoexp documentation built on Nov. 8, 2020, 7:36 p.m.