Back to Multiple platform build/check report for BioC 3.11
ABCDEF[G]HIJKLMNOPQRSTUVWXYZ

CHECK report for GSCA on tokay2

This page was generated on 2020-10-17 11:56:47 -0400 (Sat, 17 Oct 2020).

TO THE DEVELOPERS/MAINTAINERS OF THE GSCA PACKAGE: Please make sure to use the following settings in order to reproduce any error or warning you see on this page.
Package 783/1905HostnameOS / ArchINSTALLBUILDCHECKBUILD BIN
GSCA 2.18.0
Zhicheng Ji
Snapshot Date: 2020-10-16 14:40:19 -0400 (Fri, 16 Oct 2020)
URL: https://git.bioconductor.org/packages/GSCA
Branch: RELEASE_3_11
Last Commit: 6c0a000
Last Changed Date: 2020-04-27 14:38:29 -0400 (Mon, 27 Apr 2020)
malbec2 Linux (Ubuntu 18.04.4 LTS) / x86_64  OK  OK  ERROR 
tokay2 Windows Server 2012 R2 Standard / x64  OK  OK [ ERROR ] OK 
machv2 macOS 10.14.6 Mojave / x86_64  OK  OK  ERROR  OK 

Summary

Package: GSCA
Version: 2.18.0
Command: C:\Users\biocbuild\bbs-3.11-bioc\R\bin\R.exe CMD check --force-multiarch --install=check:GSCA.install-out.txt --library=C:\Users\biocbuild\bbs-3.11-bioc\R\library --no-vignettes --timings GSCA_2.18.0.tar.gz
StartedAt: 2020-10-17 04:46:20 -0400 (Sat, 17 Oct 2020)
EndedAt: 2020-10-17 04:51:36 -0400 (Sat, 17 Oct 2020)
EllapsedTime: 315.7 seconds
RetCode: 1
Status:  ERROR  
CheckDir: GSCA.Rcheck
Warnings: NA

Command output

##############################################################################
##############################################################################
###
### Running command:
###
###   C:\Users\biocbuild\bbs-3.11-bioc\R\bin\R.exe CMD check --force-multiarch --install=check:GSCA.install-out.txt --library=C:\Users\biocbuild\bbs-3.11-bioc\R\library --no-vignettes --timings GSCA_2.18.0.tar.gz
###
##############################################################################
##############################################################################


* using log directory 'C:/Users/biocbuild/bbs-3.11-bioc/meat/GSCA.Rcheck'
* using R version 4.0.3 (2020-10-10)
* using platform: x86_64-w64-mingw32 (64-bit)
* using session charset: ISO8859-1
* using option '--no-vignettes'
* checking for file 'GSCA/DESCRIPTION' ... OK
* checking extension type ... Package
* this is package 'GSCA' version '2.18.0'
* checking package namespace information ... OK
* checking package dependencies ... NOTE
Depends: includes the non-default packages:
  'shiny', 'sp', 'gplots', 'ggplot2', 'reshape2', 'RColorBrewer',
  'rhdf5'
Adding so many packages to the search path is excessive and importing
selectively is preferable.
* checking if this is a source package ... OK
* checking if there is a namespace ... OK
* checking for hidden files and directories ... OK
* checking for portable file names ... OK
* checking whether package 'GSCA' can be installed ... OK
* checking installed package size ... OK
* checking package directory ... OK
* checking 'build' directory ... OK
* checking DESCRIPTION meta-information ... OK
* checking top-level files ... OK
* checking for left-over files ... OK
* checking index information ... OK
* checking package subdirectories ... OK
* checking R files for non-ASCII characters ... OK
* checking R files for syntax errors ... OK
* loading checks for arch 'i386'
** checking whether the package can be loaded ... OK
** checking whether the package can be loaded with stated dependencies ... OK
** checking whether the package can be unloaded cleanly ... OK
** checking whether the namespace can be loaded with stated dependencies ... OK
** checking whether the namespace can be unloaded cleanly ... OK
* loading checks for arch 'x64'
** checking whether the package can be loaded ... OK
** checking whether the package can be loaded with stated dependencies ... OK
** checking whether the package can be unloaded cleanly ... OK
** checking whether the namespace can be loaded with stated dependencies ... OK
** checking whether the namespace can be unloaded cleanly ... OK
* checking dependencies in R code ... NOTE
'library' or 'require' calls in package code:
  'Affyhgu133A2Expr' 'Affyhgu133Plus2Expr' 'Affyhgu133aExpr'
  'Affymoe4302Expr'
  Please use :: or requireNamespace() instead.
  See section 'Suggested packages' in the 'Writing R Extensions' manual.
* checking S3 generic/method consistency ... OK
* checking replacement functions ... OK
* checking foreign function calls ... OK
* checking R code for possible problems ... NOTE
GSCA: no visible global function definition for 'data'
GSCA: no visible binding for global variable 'Affyhgu133aExprtab'
GSCA: no visible binding for global variable 'Affymoe4302Exprtab'
GSCA: no visible binding for global variable 'Affyhgu133A2Exprtab'
GSCA: no visible binding for global variable 'Affyhgu133Plus2Exprtab'
GSCA: no visible binding for global variable 'geneid'
GSCA: no visible global function definition for 'qnorm'
GSCA: no visible global function definition for 'sd'
GSCA: no visible global function definition for 'quantile'
GSCA: no visible global function definition for 'fisher.test'
GSCAeda: no visible global function definition for 'data'
GSCAeda: no visible binding for global variable 'Affyhgu133aExprtab'
GSCAeda: no visible binding for global variable 'Affymoe4302Exprtab'
GSCAeda: no visible binding for global variable 'Affyhgu133A2Exprtab'
GSCAeda: no visible binding for global variable
  'Affyhgu133Plus2Exprtab'
GSCAeda: no visible binding for global variable 'geneid'
GSCAeda: no visible global function definition for 'qnorm'
GSCAeda: no visible global function definition for 'sd'
GSCAeda: no visible global function definition for 'quantile'
GSCAeda: no visible global function definition for 'pdf'
GSCAeda: no visible global function definition for 'str'
GSCAeda: no visible binding for global variable 'variable'
GSCAeda: no visible binding for global variable 'value'
GSCAeda: no visible binding for global variable 'SampleType'
GSCAeda: no visible global function definition for 'par'
GSCAeda: no visible global function definition for 'colorRampPalette'
GSCAeda: no visible global function definition for 't.test'
GSCAeda: no visible binding for global variable 'Var1'
GSCAeda: no visible binding for global variable 'Var2'
GSCAeda: no visible binding for global variable 't.stat'
GSCAeda: no visible binding for global variable 'P.value'
GSCAeda: no visible global function definition for 'fisher.test'
GSCAeda: no visible global function definition for 'dev.off'
GSCAeda: no visible global function definition for 'write.csv'
GSCAeda: no visible global function definition for 'write.table'
GSCAplot: no visible global function definition for 'data'
GSCAplot: no visible binding for global variable 'Affyhgu133aExprtab'
GSCAplot: no visible binding for global variable 'Affymoe4302Exprtab'
GSCAplot: no visible binding for global variable 'Affyhgu133A2Exprtab'
GSCAplot: no visible binding for global variable
  'Affyhgu133Plus2Exprtab'
GSCAplot: no visible global function definition for 'pdf'
GSCAplot: no visible global function definition for 'par'
GSCAplot: no visible global function definition for 'hist'
GSCAplot: no visible global function definition for 'title'
GSCAplot: no visible global function definition for 'dev.off'
annotatePeaks: no visible binding for global variable 'allreffile'
tabSearch: no visible global function definition for 'data'
tabSearch: no visible binding for global variable 'Affyhgu133aExprtab'
tabSearch: no visible binding for global variable 'Affymoe4302Exprtab'
tabSearch: no visible binding for global variable 'Affyhgu133A2Exprtab'
tabSearch: no visible binding for global variable
  'Affyhgu133Plus2Exprtab'
Undefined global functions or variables:
  Affyhgu133A2Exprtab Affyhgu133Plus2Exprtab Affyhgu133aExprtab
  Affymoe4302Exprtab P.value SampleType Var1 Var2 allreffile
  colorRampPalette data dev.off fisher.test geneid hist par pdf qnorm
  quantile sd str t.stat t.test title value variable write.csv
  write.table
Consider adding
  importFrom("grDevices", "colorRampPalette", "dev.off", "pdf")
  importFrom("graphics", "hist", "par", "title")
  importFrom("stats", "fisher.test", "qnorm", "quantile", "sd", "t.test")
  importFrom("utils", "data", "str", "write.csv", "write.table")
to your NAMESPACE file.
* checking Rd files ... OK
* checking Rd metadata ... OK
* checking Rd cross-references ... OK
* checking for missing documentation entries ... OK
* checking for code/documentation mismatches ... OK
* checking Rd \usage sections ... OK
* checking Rd contents ... OK
* checking for unstated dependencies in examples ... OK
* checking contents of 'data' directory ... OK
* checking data for non-ASCII characters ... OK
* checking data for ASCII and uncompressed saves ... OK
* checking files in 'vignettes' ... OK
* checking examples ...
** running examples for arch 'i386' ... ERROR
Running examples in 'GSCA-Ex.R' failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: GSCA
> ### Title: GSCA
> ### Aliases: GSCA
> ### Keywords: GSCA
> 
> ### ** Examples
> 
> ## First load the TF target genes derived from Oct4 ChIPx data
> ## in embryonic stem cells. The data is in the form of a list
> ## where the first item contains the activated (+) target genes in
> ## Entrez GeneID format and the second item contains the repressed (-)
> ## target genes in Entrez GeneID format.
> data(Oct4ESC_TG)
> 
> ## We want to analyze Oct4, so we need to specify the EntrezGeneID for Oct4
> ## and input the activated (+) and repressed (-) target genes of Oct4.
> ## Constucting the input genedata required by GSCA. There are two genesets
> ## one is the TF and another is the TF target genes. Note that constructing genedata
> ## with many genesets could be laborious, so using the interactive UI is recommended to 
> ## easily start up the analysis.
> activenum <- length(Oct4ESC_TG[[1]])
> repressnum <- length(Oct4ESC_TG[[2]])
> Octgenedata <- data.frame(gsname=c("GS1",rep("GS2",activenum+repressnum)),gene=c(18999,Oct4ESC_TG[[1]],Oct4ESC_TG[[2]]),weight=c(rep(1,1+activenum),rep(-1,repressnum)),stringsAsFactors=FALSE)
> 
> ## We are interested in the pattern that TF and its target genes are all highly expressed.
> ## We also need to define how high the cutoffs should be such
> ## that each cutoff corresponds to the p-value of 0.1
> ## based on fitted normal distributions.
> ## Constructing pattern required by GSCA, all geneset names in genedata should appear
> ## exactly once in the first column
> Octpattern <- data.frame(gsname=c("GS1","GS2"),acttype="High",cotype="Norm",cutoff=0.1,stringsAsFactors=FALSE)
> 
> ## Lastly, we specify the chipdata to be "moe4302" and the significance of enriched
> ## biological contexts must be at least 0.05 to be reported.
> Octoutput <- GSCA(Octgenedata,Octpattern,"moe4302",Pval.co=0.05)
Loading required package: Affymoe4302Expr
 ----------- FAILURE REPORT -------------- 
 --- failure: length > 1 in coercion to logical ---
 --- srcref --- 
: 
 --- package (from environment) --- 
GSCA
 --- call from context --- 
GSCA(Octgenedata, Octpattern, "moe4302", Pval.co = 0.05)
 --- call from argument --- 
genedata[, 1] == singlegeneset && genedata[, 2] %in% geneid
 --- R stacktrace ---
where 1: GSCA(Octgenedata, Octpattern, "moe4302", Pval.co = 0.05)

 --- value of length: 857 type: logical ---
  [1]  TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
 [13] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
 [25] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
 [37] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
 [49] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
 [61] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
 [73] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
 [85] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
 [97] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[109] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[121] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[133] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[145] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[157] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[169] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[181] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[193] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[205] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[217] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[229] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[241] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[253] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[265] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[277] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[289] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[301] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[313] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[325] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[337] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[349] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[361] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[373] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[385] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[397] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[409] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[421] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[433] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[445] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[457] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[469] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[481] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[493] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[505] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[517] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[529] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[541] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[553] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[565] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[577] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[589] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[601] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[613] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[625] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[637] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[649] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[661] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[673] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[685] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[697] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[709] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[721] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[733] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[745] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[757] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[769] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[781] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[793] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[805] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[817] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[829] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[841] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[853] FALSE FALSE FALSE FALSE FALSE
 --- function from context --- 
function (genedata, pattern, chipdata, scaledata = F, Pval.co = 0.05, 
    directory = NULL) 
{
    genedata[, 1] <- as.character(genedata[, 1])
    pattern[, 1] <- as.character(pattern[, 1])
    path <- system.file("extdata", package = paste0("Affy", chipdata, 
        "Expr"))
    load(paste0(path, "/geneid.rda"))
    if (chipdata == "hgu133a") {
        if (!require(Affyhgu133aExpr)) {
            stop("Affyhgu133aExpr Package is not found")
        }
        else {
            data(Affyhgu133aExprtab)
            tab <- Affyhgu133aExprtab
        }
    }
    else if (chipdata == "moe4302") {
        if (!require(Affymoe4302Expr)) {
            stop("Affymoe4302Expr Package is not found")
        }
        else {
            data(Affymoe4302Exprtab)
            tab <- Affymoe4302Exprtab
        }
    }
    else if (chipdata == "hgu133A2") {
        if (!require(Affyhgu133A2Expr)) {
            stop("Affyhgu133A2Expr Package is not found")
        }
        else {
            data(Affyhgu133A2Exprtab)
            tab <- Affyhgu133A2Exprtab
        }
    }
    else if (chipdata == "hgu133Plus2") {
        if (!require(Affyhgu133Plus2Expr)) {
            stop("Affyhgu133Plus2Expr Package is not found")
        }
        else {
            data(Affyhgu133Plus2Exprtab)
            tab <- Affyhgu133Plus2Exprtab
        }
    }
    else {
        stop("Please enter valid name for chipdata. Current Supported chipdata: 'hgu133a', 'moe4302', 'hgu133Plus2', 'hgu133A2'")
    }
    tabsamplename <- tab$SampleName
    genesetname <- NULL
    for (tmpgenesetname in unique(genedata[, 1])) {
        if (sum(geneid %in% genedata[genedata[, 1] == tmpgenesetname, 
            2]) == 0) {
            warning(paste("No matching target genes found on the compendium for gene set", 
                tmpgenesetname))
        }
        else {
            genesetname <- c(genesetname, tmpgenesetname)
        }
    }
    if (length(genesetname) == 0) 
        stop("No matching target genes found on the compendium for all gene sets")
    selectsample <- 1:nrow(tab)
    activity <- matrix(0, nrow = length(genesetname), ncol = nrow(tab))
    rownames(activity) <- genesetname
    genesetcutoff <- genesettotalgenenum <- genesetmissinggene <- rep(0, 
        length(genesetname))
    names(genesetcutoff) <- names(genesettotalgenenum) <- names(genesetmissinggene) <- genesetname
    for (genesetid in 1:length(genesetname)) {
        singlegeneset <- genesetname[genesetid]
        currentgeneset <- genedata[genedata[, 1] == singlegeneset & 
            genedata[, 2] %in% geneid, ]
        tmpgeneexpr <- t(h5read(paste0(path, "/data.h5"), "expr", 
            index = list(NULL, match(currentgeneset[, 2], geneid))))/1000
        if (scaledata) 
            tmpgeneexpr <- t(apply(tmpgeneexpr, 1, scale))
        tmpgeneexpr <- sweep(tmpgeneexpr, 1, currentgeneset[, 
            3], "*")
        score <- colMeans(tmpgeneexpr)
        activity[genesetid, ] <- score
    }
    for (genesetid in 1:length(genesetname)) {
        score <- activity[genesetid, ]
        singlegeneset <- genesetname[genesetid]
        missinggene <- setdiff(genedata[singlegeneset == genedata[, 
            1], 2], geneid)
        genesetmissinggene[genesetid] <- length(missinggene)
        genesettotalgenenum[genesetid] <- length(genedata[, 1] == 
            singlegeneset && genedata[, 2] %in% geneid)
        singlepattern <- pattern[pattern[, 1] == singlegeneset, 
            ]
        if (singlepattern[, 3] == "Norm") {
            if (singlepattern[, 2] == "High") {
                cutoff <- qnorm(1 - singlepattern[, 4], mean(score), 
                  sd(score))
                selectsample <- intersect(selectsample, which(score >= 
                  cutoff))
            }
            else if (singlepattern[, 2] == "Low") {
                cutoff <- qnorm(singlepattern[, 4], mean(score), 
                  sd(score))
                selectsample <- intersect(selectsample, which(score < 
                  cutoff))
            }
            else {
                stop(paste("Second Column of pattern in", singlegeneset, 
                  "is not correctly given"))
            }
        }
        else if (singlepattern[, 3] == "Quantile") {
            if (singlepattern[, 2] == "High") {
                cutoff <- quantile(score, 1 - singlepattern[, 
                  4])
                selectsample <- intersect(selectsample, which(score >= 
                  cutoff))
            }
            else if (singlepattern[, 2] == "Low") {
                cutoff <- quantile(score, singlepattern[, 4])
                selectsample <- intersect(selectsample, which(score < 
                  cutoff))
            }
            else {
                stop(paste("Second Column of pattern in", singlegeneset, 
                  "is not correctly given"))
            }
        }
        else if (singlepattern[, 3] == "Exprs") {
            if (singlepattern[, 2] == "High") {
                cutoff <- singlepattern[, 4]
                selectsample <- intersect(selectsample, which(score >= 
                  cutoff))
            }
            else if (singlepattern[, 2] == "Low") {
                cutoff <- singlepattern[, 4]
                selectsample <- intersect(selectsample, which(score < 
                  cutoff))
            }
            else {
                stop(paste("Second Column of pattern in", singlegeneset, 
                  "is not correctly given"))
            }
        }
        else {
            stop(paste("Cutoff type pattern of geneset", singlegeneset, 
                "is not correctly given"))
        }
        genesetcutoff[genesetid] <- cutoff
    }
    ExpID <- tab[selectsample, "ExperimentID"]
    tmpTypes <- tab[selectsample, "SampleType"]
    tabTWO <- table(tab$SampleType)
    tabTWO <- names(tabTWO)[tabTWO > 2]
    tab <- tab[tab$SampleType %in% tabTWO, ]
    ExpID <- ExpID[tmpTypes %in% tab$SampleType]
    tmpTypes <- tmpTypes[tmpTypes %in% tab$SampleType]
    if (length(tmpTypes) > 0) {
        ttT <- table(tmpTypes)
        sT <- sum(ttT)
        bgT <- table(tab$SampleType)
        bgT <- bgT[names(ttT)]
        ContextN <- sum(table(tab$SampleType) > 2)
        SCORE <- matrix(0, nrow = length(ttT), ncol = 4)
        ExperimentID <- rep("0", length(bgT))
        for (i in 1:length(bgT)) {
            r1c1 <- ttT[i]
            r1c2 <- sT - ttT[i]
            r2c1 <- bgT[i] - ttT[i]
            r2c2 <- length(tab$SampleType) - r1c1 - r1c2 - r2c1
            tmpmat <- matrix(c(r1c1, r2c1, r1c2, r2c2), ncol = 2)
            SCORE[i, 1] <- fisher.test(tmpmat, alternative = "greater")$p.value
            SCORE[i, 2] <- round(((as.numeric(ttT)[i] + sT/length(tab$SampleType))/(as.numeric(bgT)[i] + 
                1))/(sT/length(tab$SampleType)), 3)
            SCORE[i, 3] <- min(SCORE[i, 1] * ContextN, 1)
            ExperimentID[i] <- paste(unique(unlist(strsplit(paste(ExpID[tmpTypes == 
                names(ttT)[i]], collapse = ";"), ";"))), collapse = ";")
        }
        FIN <- data.frame(as.numeric(ttT), as.numeric(bgT), SCORE[, 
            2], SCORE[, 3], rownames(ttT), ExperimentID, stringsAsFactors = F)
        colnames(FIN) <- c("Active", "Total", "FoldChange", "Adj.Pvalue", 
            "SampleType", "ExperimentID")
        FIN <- FIN[order(as.numeric(FIN[, "Adj.Pvalue"], -1 * 
            as.numeric(FIN[, "Active"]), decreasing = FALSE)), 
            ]
        FIN <- FIN[as.numeric(FIN[, "Adj.Pvalue"]) <= Pval.co, 
            ]
        FIN[, 4] <- signif(FIN[, 4], 3)
        if (!is.null(directory)) {
            expiddex <- unique(unlist(strsplit(as.character(FIN$ExperimentID), 
                ";")))
            for (k in 1:length(expiddex)) {
                filepath <- paste0(directory, "/", expiddex[k])
                Temp <- tabSearch(expiddex[k], chipdata)
                if (nrow(Temp) > 1) {
                  dir.create(filepath)
                  GSCAeda(genedata, pattern, chipdata = chipdata, 
                    SearchOutput = Temp, Pval.co = Pval.co, Ordering = "Average", 
                    Title = expiddex[k], outputdir = filepath)
                }
            }
        }
        if (is.null(dim(FIN)) | nrow(FIN) == 0) {
            message("No significant biological contexts found.")
        }
        else {
            FIN <- cbind(1:nrow(FIN), FIN)
            colnames(FIN)[1] <- "Rank"
            rownames(FIN) <- 1:nrow(FIN)
        }
        colnames(activity) <- tabsamplename
        return(list(Ranking = FIN, Score = activity, Pattern = pattern, 
            Cutoff = genesetcutoff, SelectedSample = selectsample, 
            Totalgene = genesettotalgenenum, Missinggene = genesetmissinggene, 
            Chipdata = chipdata))
    }
    else {
        stop("No samples show the pattern of interest.\n       Try relaxing cutoffs.")
    }
}
<bytecode: 0x09a5dac8>
<environment: namespace:GSCA>
 --- function search by body ---
Function GSCA in namespace GSCA has this body.
 ----------- END OF FAILURE REPORT -------------- 
Fatal error: length > 1 in coercion to logical

** running examples for arch 'x64' ... ERROR
Running examples in 'GSCA-Ex.R' failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: GSCA
> ### Title: GSCA
> ### Aliases: GSCA
> ### Keywords: GSCA
> 
> ### ** Examples
> 
> ## First load the TF target genes derived from Oct4 ChIPx data
> ## in embryonic stem cells. The data is in the form of a list
> ## where the first item contains the activated (+) target genes in
> ## Entrez GeneID format and the second item contains the repressed (-)
> ## target genes in Entrez GeneID format.
> data(Oct4ESC_TG)
> 
> ## We want to analyze Oct4, so we need to specify the EntrezGeneID for Oct4
> ## and input the activated (+) and repressed (-) target genes of Oct4.
> ## Constucting the input genedata required by GSCA. There are two genesets
> ## one is the TF and another is the TF target genes. Note that constructing genedata
> ## with many genesets could be laborious, so using the interactive UI is recommended to 
> ## easily start up the analysis.
> activenum <- length(Oct4ESC_TG[[1]])
> repressnum <- length(Oct4ESC_TG[[2]])
> Octgenedata <- data.frame(gsname=c("GS1",rep("GS2",activenum+repressnum)),gene=c(18999,Oct4ESC_TG[[1]],Oct4ESC_TG[[2]]),weight=c(rep(1,1+activenum),rep(-1,repressnum)),stringsAsFactors=FALSE)
> 
> ## We are interested in the pattern that TF and its target genes are all highly expressed.
> ## We also need to define how high the cutoffs should be such
> ## that each cutoff corresponds to the p-value of 0.1
> ## based on fitted normal distributions.
> ## Constructing pattern required by GSCA, all geneset names in genedata should appear
> ## exactly once in the first column
> Octpattern <- data.frame(gsname=c("GS1","GS2"),acttype="High",cotype="Norm",cutoff=0.1,stringsAsFactors=FALSE)
> 
> ## Lastly, we specify the chipdata to be "moe4302" and the significance of enriched
> ## biological contexts must be at least 0.05 to be reported.
> Octoutput <- GSCA(Octgenedata,Octpattern,"moe4302",Pval.co=0.05)
Loading required package: Affymoe4302Expr
 ----------- FAILURE REPORT -------------- 
 --- failure: length > 1 in coercion to logical ---
 --- srcref --- 
: 
 --- package (from environment) --- 
GSCA
 --- call from context --- 
GSCA(Octgenedata, Octpattern, "moe4302", Pval.co = 0.05)
 --- call from argument --- 
genedata[, 1] == singlegeneset && genedata[, 2] %in% geneid
 --- R stacktrace ---
where 1: GSCA(Octgenedata, Octpattern, "moe4302", Pval.co = 0.05)

 --- value of length: 857 type: logical ---
  [1]  TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
 [13] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
 [25] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
 [37] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
 [49] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
 [61] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
 [73] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
 [85] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
 [97] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[109] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[121] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[133] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[145] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[157] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[169] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[181] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[193] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[205] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[217] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[229] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[241] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[253] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[265] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[277] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[289] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[301] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[313] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[325] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[337] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[349] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[361] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[373] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[385] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[397] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[409] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[421] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[433] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[445] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[457] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[469] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[481] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[493] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[505] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[517] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[529] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[541] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[553] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[565] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[577] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[589] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[601] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[613] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[625] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[637] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[649] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[661] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[673] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[685] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[697] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[709] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[721] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[733] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[745] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[757] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[769] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[781] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[793] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[805] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[817] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[829] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[841] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
[853] FALSE FALSE FALSE FALSE FALSE
 --- function from context --- 
function (genedata, pattern, chipdata, scaledata = F, Pval.co = 0.05, 
    directory = NULL) 
{
    genedata[, 1] <- as.character(genedata[, 1])
    pattern[, 1] <- as.character(pattern[, 1])
    path <- system.file("extdata", package = paste0("Affy", chipdata, 
        "Expr"))
    load(paste0(path, "/geneid.rda"))
    if (chipdata == "hgu133a") {
        if (!require(Affyhgu133aExpr)) {
            stop("Affyhgu133aExpr Package is not found")
        }
        else {
            data(Affyhgu133aExprtab)
            tab <- Affyhgu133aExprtab
        }
    }
    else if (chipdata == "moe4302") {
        if (!require(Affymoe4302Expr)) {
            stop("Affymoe4302Expr Package is not found")
        }
        else {
            data(Affymoe4302Exprtab)
            tab <- Affymoe4302Exprtab
        }
    }
    else if (chipdata == "hgu133A2") {
        if (!require(Affyhgu133A2Expr)) {
            stop("Affyhgu133A2Expr Package is not found")
        }
        else {
            data(Affyhgu133A2Exprtab)
            tab <- Affyhgu133A2Exprtab
        }
    }
    else if (chipdata == "hgu133Plus2") {
        if (!require(Affyhgu133Plus2Expr)) {
            stop("Affyhgu133Plus2Expr Package is not found")
        }
        else {
            data(Affyhgu133Plus2Exprtab)
            tab <- Affyhgu133Plus2Exprtab
        }
    }
    else {
        stop("Please enter valid name for chipdata. Current Supported chipdata: 'hgu133a', 'moe4302', 'hgu133Plus2', 'hgu133A2'")
    }
    tabsamplename <- tab$SampleName
    genesetname <- NULL
    for (tmpgenesetname in unique(genedata[, 1])) {
        if (sum(geneid %in% genedata[genedata[, 1] == tmpgenesetname, 
            2]) == 0) {
            warning(paste("No matching target genes found on the compendium for gene set", 
                tmpgenesetname))
        }
        else {
            genesetname <- c(genesetname, tmpgenesetname)
        }
    }
    if (length(genesetname) == 0) 
        stop("No matching target genes found on the compendium for all gene sets")
    selectsample <- 1:nrow(tab)
    activity <- matrix(0, nrow = length(genesetname), ncol = nrow(tab))
    rownames(activity) <- genesetname
    genesetcutoff <- genesettotalgenenum <- genesetmissinggene <- rep(0, 
        length(genesetname))
    names(genesetcutoff) <- names(genesettotalgenenum) <- names(genesetmissinggene) <- genesetname
    for (genesetid in 1:length(genesetname)) {
        singlegeneset <- genesetname[genesetid]
        currentgeneset <- genedata[genedata[, 1] == singlegeneset & 
            genedata[, 2] %in% geneid, ]
        tmpgeneexpr <- t(h5read(paste0(path, "/data.h5"), "expr", 
            index = list(NULL, match(currentgeneset[, 2], geneid))))/1000
        if (scaledata) 
            tmpgeneexpr <- t(apply(tmpgeneexpr, 1, scale))
        tmpgeneexpr <- sweep(tmpgeneexpr, 1, currentgeneset[, 
            3], "*")
        score <- colMeans(tmpgeneexpr)
        activity[genesetid, ] <- score
    }
    for (genesetid in 1:length(genesetname)) {
        score <- activity[genesetid, ]
        singlegeneset <- genesetname[genesetid]
        missinggene <- setdiff(genedata[singlegeneset == genedata[, 
            1], 2], geneid)
        genesetmissinggene[genesetid] <- length(missinggene)
        genesettotalgenenum[genesetid] <- length(genedata[, 1] == 
            singlegeneset && genedata[, 2] %in% geneid)
        singlepattern <- pattern[pattern[, 1] == singlegeneset, 
            ]
        if (singlepattern[, 3] == "Norm") {
            if (singlepattern[, 2] == "High") {
                cutoff <- qnorm(1 - singlepattern[, 4], mean(score), 
                  sd(score))
                selectsample <- intersect(selectsample, which(score >= 
                  cutoff))
            }
            else if (singlepattern[, 2] == "Low") {
                cutoff <- qnorm(singlepattern[, 4], mean(score), 
                  sd(score))
                selectsample <- intersect(selectsample, which(score < 
                  cutoff))
            }
            else {
                stop(paste("Second Column of pattern in", singlegeneset, 
                  "is not correctly given"))
            }
        }
        else if (singlepattern[, 3] == "Quantile") {
            if (singlepattern[, 2] == "High") {
                cutoff <- quantile(score, 1 - singlepattern[, 
                  4])
                selectsample <- intersect(selectsample, which(score >= 
                  cutoff))
            }
            else if (singlepattern[, 2] == "Low") {
                cutoff <- quantile(score, singlepattern[, 4])
                selectsample <- intersect(selectsample, which(score < 
                  cutoff))
            }
            else {
                stop(paste("Second Column of pattern in", singlegeneset, 
                  "is not correctly given"))
            }
        }
        else if (singlepattern[, 3] == "Exprs") {
            if (singlepattern[, 2] == "High") {
                cutoff <- singlepattern[, 4]
                selectsample <- intersect(selectsample, which(score >= 
                  cutoff))
            }
            else if (singlepattern[, 2] == "Low") {
                cutoff <- singlepattern[, 4]
                selectsample <- intersect(selectsample, which(score < 
                  cutoff))
            }
            else {
                stop(paste("Second Column of pattern in", singlegeneset, 
                  "is not correctly given"))
            }
        }
        else {
            stop(paste("Cutoff type pattern of geneset", singlegeneset, 
                "is not correctly given"))
        }
        genesetcutoff[genesetid] <- cutoff
    }
    ExpID <- tab[selectsample, "ExperimentID"]
    tmpTypes <- tab[selectsample, "SampleType"]
    tabTWO <- table(tab$SampleType)
    tabTWO <- names(tabTWO)[tabTWO > 2]
    tab <- tab[tab$SampleType %in% tabTWO, ]
    ExpID <- ExpID[tmpTypes %in% tab$SampleType]
    tmpTypes <- tmpTypes[tmpTypes %in% tab$SampleType]
    if (length(tmpTypes) > 0) {
        ttT <- table(tmpTypes)
        sT <- sum(ttT)
        bgT <- table(tab$SampleType)
        bgT <- bgT[names(ttT)]
        ContextN <- sum(table(tab$SampleType) > 2)
        SCORE <- matrix(0, nrow = length(ttT), ncol = 4)
        ExperimentID <- rep("0", length(bgT))
        for (i in 1:length(bgT)) {
            r1c1 <- ttT[i]
            r1c2 <- sT - ttT[i]
            r2c1 <- bgT[i] - ttT[i]
            r2c2 <- length(tab$SampleType) - r1c1 - r1c2 - r2c1
            tmpmat <- matrix(c(r1c1, r2c1, r1c2, r2c2), ncol = 2)
            SCORE[i, 1] <- fisher.test(tmpmat, alternative = "greater")$p.value
            SCORE[i, 2] <- round(((as.numeric(ttT)[i] + sT/length(tab$SampleType))/(as.numeric(bgT)[i] + 
                1))/(sT/length(tab$SampleType)), 3)
            SCORE[i, 3] <- min(SCORE[i, 1] * ContextN, 1)
            ExperimentID[i] <- paste(unique(unlist(strsplit(paste(ExpID[tmpTypes == 
                names(ttT)[i]], collapse = ";"), ";"))), collapse = ";")
        }
        FIN <- data.frame(as.numeric(ttT), as.numeric(bgT), SCORE[, 
            2], SCORE[, 3], rownames(ttT), ExperimentID, stringsAsFactors = F)
        colnames(FIN) <- c("Active", "Total", "FoldChange", "Adj.Pvalue", 
            "SampleType", "ExperimentID")
        FIN <- FIN[order(as.numeric(FIN[, "Adj.Pvalue"], -1 * 
            as.numeric(FIN[, "Active"]), decreasing = FALSE)), 
            ]
        FIN <- FIN[as.numeric(FIN[, "Adj.Pvalue"]) <= Pval.co, 
            ]
        FIN[, 4] <- signif(FIN[, 4], 3)
        if (!is.null(directory)) {
            expiddex <- unique(unlist(strsplit(as.character(FIN$ExperimentID), 
                ";")))
            for (k in 1:length(expiddex)) {
                filepath <- paste0(directory, "/", expiddex[k])
                Temp <- tabSearch(expiddex[k], chipdata)
                if (nrow(Temp) > 1) {
                  dir.create(filepath)
                  GSCAeda(genedata, pattern, chipdata = chipdata, 
                    SearchOutput = Temp, Pval.co = Pval.co, Ordering = "Average", 
                    Title = expiddex[k], outputdir = filepath)
                }
            }
        }
        if (is.null(dim(FIN)) | nrow(FIN) == 0) {
            message("No significant biological contexts found.")
        }
        else {
            FIN <- cbind(1:nrow(FIN), FIN)
            colnames(FIN)[1] <- "Rank"
            rownames(FIN) <- 1:nrow(FIN)
        }
        colnames(activity) <- tabsamplename
        return(list(Ranking = FIN, Score = activity, Pattern = pattern, 
            Cutoff = genesetcutoff, SelectedSample = selectsample, 
            Totalgene = genesettotalgenenum, Missinggene = genesetmissinggene, 
            Chipdata = chipdata))
    }
    else {
        stop("No samples show the pattern of interest.\n       Try relaxing cutoffs.")
    }
}
<bytecode: 0x000000000f7cfbe8>
<environment: namespace:GSCA>
 --- function search by body ---
Function GSCA in namespace GSCA has this body.
 ----------- END OF FAILURE REPORT -------------- 
Fatal error: length > 1 in coercion to logical

* checking for unstated dependencies in vignettes ... OK
* checking package vignettes in 'inst/doc' ... OK
* checking running R code from vignettes ... SKIPPED
* checking re-building of vignette outputs ... SKIPPED
* checking PDF version of manual ... OK
* DONE

Status: 2 ERRORs, 3 NOTEs
See
  'C:/Users/biocbuild/bbs-3.11-bioc/meat/GSCA.Rcheck/00check.log'
for details.


Installation output

GSCA.Rcheck/00install.out

##############################################################################
##############################################################################
###
### Running command:
###
###   C:\cygwin\bin\curl.exe -O https://malbec2.bioconductor.org/BBS/3.11/bioc/src/contrib/GSCA_2.18.0.tar.gz && rm -rf GSCA.buildbin-libdir && mkdir GSCA.buildbin-libdir && C:\Users\biocbuild\bbs-3.11-bioc\R\bin\R.exe CMD INSTALL --merge-multiarch --build --library=GSCA.buildbin-libdir GSCA_2.18.0.tar.gz && C:\Users\biocbuild\bbs-3.11-bioc\R\bin\R.exe CMD INSTALL GSCA_2.18.0.zip && rm GSCA_2.18.0.tar.gz GSCA_2.18.0.zip
###
##############################################################################
##############################################################################


  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 2156k  100 2156k    0     0  22.8M      0 --:--:-- --:--:-- --:--:-- 24.4M

install for i386

* installing *source* package 'GSCA' ...
** using staged installation
** R
** data
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
  converting help for package 'GSCA'
    finding HTML links ... done
    ConstructTG                             html  
    GSCA-package                            html  
    GSCA                                    html  
    GSCAeda                                 html  
    GSCAplot                                html  
    GSCAui                                  html  
    Oct4ESC_TG                              html  
    STAT1_TG                                html  
    annotatePeaks                           html  
    geneIDdata                              html  
    tabSearch                               html  
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path

install for x64

* installing *source* package 'GSCA' ...
** testing if installed package can be loaded
* MD5 sums
packaged installation of 'GSCA' as GSCA_2.18.0.zip
* DONE (GSCA)
* installing to library 'C:/Users/biocbuild/bbs-3.11-bioc/R/library'
package 'GSCA' successfully unpacked and MD5 sums checked

Tests output


Example timings

GSCA.Rcheck/examples_i386/GSCA-Ex.timings

nameusersystemelapsed
ConstructTG4.890.067.73

GSCA.Rcheck/examples_x64/GSCA-Ex.timings

nameusersystemelapsed
ConstructTG5.360.045.41