| Back to Multiple platform build/check report for BioC 3.11 |
|
This page was generated on 2020-10-17 11:56:57 -0400 (Sat, 17 Oct 2020).
| TO THE DEVELOPERS/MAINTAINERS OF THE LINC PACKAGE: Please make sure to use the following settings in order to reproduce any error or warning you see on this page. |
| Package 938/1905 | Hostname | OS / Arch | INSTALL | BUILD | CHECK | BUILD BIN | ||||||
| LINC 1.16.0 Manuel Goepferich
| 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 |
| Package: LINC |
| Version: 1.16.0 |
| Command: C:\Users\biocbuild\bbs-3.11-bioc\R\bin\R.exe CMD check --force-multiarch --install=check:LINC.install-out.txt --library=C:\Users\biocbuild\bbs-3.11-bioc\R\library --no-vignettes --timings LINC_1.16.0.tar.gz |
| StartedAt: 2020-10-17 05:31:03 -0400 (Sat, 17 Oct 2020) |
| EndedAt: 2020-10-17 05:38:47 -0400 (Sat, 17 Oct 2020) |
| EllapsedTime: 464.2 seconds |
| RetCode: 1 |
| Status: ERROR |
| CheckDir: LINC.Rcheck |
| Warnings: NA |
##############################################################################
##############################################################################
###
### Running command:
###
### C:\Users\biocbuild\bbs-3.11-bioc\R\bin\R.exe CMD check --force-multiarch --install=check:LINC.install-out.txt --library=C:\Users\biocbuild\bbs-3.11-bioc\R\library --no-vignettes --timings LINC_1.16.0.tar.gz
###
##############################################################################
##############################################################################
* using log directory 'C:/Users/biocbuild/bbs-3.11-bioc/meat/LINC.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 'LINC/DESCRIPTION' ... OK
* checking extension type ... Package
* this is package 'LINC' version '1.16.0'
* checking package namespace information ... OK
* checking package dependencies ... OK
* 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 'LINC' 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 ... OK
* checking S3 generic/method consistency ... OK
* checking replacement functions ... OK
* checking foreign function calls ... OK
* checking R code for possible problems ... OK
* 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 R/sysdata.rda ... NOTE
Note: significantly better compression could be obtained
by using R CMD build --resave-data
old_size new_size compress
sysdata.rda 449Kb 297Kb xz
* checking line endings in C/C++/Fortran sources/headers ... OK
* checking compiled code ... NOTE
Note: information on .o files for i386 is not available
Note: information on .o files for x64 is not available
File 'C:/Users/biocbuild/bbs-3.11-bioc/R/library/LINC/libs/i386/LINC.dll':
Found 'abort', possibly from 'abort' (C), 'runtime' (Fortran)
Found 'exit', possibly from 'exit' (C), 'stop' (Fortran)
Found 'printf', possibly from 'printf' (C)
File 'C:/Users/biocbuild/bbs-3.11-bioc/R/library/LINC/libs/x64/LINC.dll':
Found 'abort', possibly from 'abort' (C), 'runtime' (Fortran)
Found 'exit', possibly from 'exit' (C), 'stop' (Fortran)
Found 'printf', possibly from 'printf' (C)
Compiled code should not call entry points which might terminate R nor
write to stdout/stderr instead of to the console, nor use Fortran I/O
nor system RNGs. The detected symbols are linked into the code but
might come from libraries and not actually be called.
See 'Writing portable packages' in the 'Writing R Extensions' manual.
* checking files in 'vignettes' ... OK
* checking examples ...
** running examples for arch 'i386' ... ERROR
Running examples in 'LINC-Ex.R' failed
The error most likely occurred in:
> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: linc-methods
> ### Title: Compute A Correlation Matrix of Co-expressed Coding And
> ### Non-Coding Genes
> ### Aliases: linc-methods linc,data.frame,ANY-method
> ### linc,ExpressionSet,ANY-method linc,LINCmatrix,missing-method
> ### linc,matrix,ANY-method linc
> ### Keywords: methods linc
>
> ### ** Examples
>
> data(BRAIN_EXPR)
>
> # call 'linc' with no further arguments
> crbl_matrix <- linc(cerebellum, codingGenes = pcgenes_crbl)
linc: gene system(s) assumed:
ENTREZID
Warning in linc(cerebellum, codingGenes = pcgenes_crbl) :
single outliers and high sample variance were detected
by ESD and ANOVA; statistical correction is recommended
linc: Correlation function with 'everything' called
linc: Computation of correlation matrix started
----------- FAILURE REPORT --------------
--- failure: the condition has length > 1 ---
--- srcref ---
:
--- package (from environment) ---
LINC
--- call from context ---
linc(cerebellum, codingGenes = pcgenes_crbl)
--- call from argument ---
if (class(out_cormatrix) == "try-error") stop(errorm12)
--- R stacktrace ---
where 1: linc(cerebellum, codingGenes = pcgenes_crbl)
where 2: linc(cerebellum, codingGenes = pcgenes_crbl)
--- value of length: 2 type: logical ---
[1] FALSE FALSE
--- function from context ---
Method Definition:
function (object, codingGenes = NULL, corMethod = "spearman",
batchGroups = NULL, nsv = 1, rmPC = NULL, outlier = NULL,
userFun = NULL, verbose = TRUE)
{
errorm00 <- paste("Assignment of protein-coding genes", "in 'codingGenes' is required")
errorm01 <- paste("'codingGenes' must have the same", "length as 'nrow(object)'")
errorm02 <- paste("'corMethod' needs to be 'pearson',", "'kendall' or 'spearman'")
errorm03 <- "A numeric matrix is required as input"
errorm04 <- "Size or content of matrix insufficient"
errorm05 <- "Gene names as 'rownames(object)' required"
errorm06 <- paste("'batchGroups' need to be of the", "same length as the columns")
errorm07 <- paste("Not allowed to use the same name", "for every entry in 'batchGroups'")
errorm08 <- paste("unable to use 'rmPC' as an index", "vector for the removal of pcs")
errorm09 <- paste("'outlier' needs to be 'zscore',", "or 'esd'")
errorm10 <- paste("'codingGenes' needs to be a gene", "annotation or a logical vector")
errorm11 <- paste("Error in argument 'codingGenes',", "not enough protein-coding genes")
errorm12 <- paste("unable to compute correlation matrix:",
"1. check input for infinite values / NAs", "2. check user-defined correlation function",
sep = "\n")
errorm13 <- "computation of cor. matrix lnc vs lnc failed"
warnim01 <- "Input 'object' contains infinite values"
warnim02 <- "'linc' was unable to identify a gene system"
warnim03 <- paste("single outliers and high sample variance were detected",
"by ESD and ANOVA; statistical correction is recommended",
sep = "\n")
warnim04 <- paste("Subsequent use of sva and removal of",
"principle components is not intended")
warnim05 <- paste("correlation matrix contains infinite",
"or missing values; converted to 0")
inform01 <- quote(paste("linc: removed ", infrm, "rows contaning only infinite values"))
inform02 <- quote(paste("removed", length(obvar[obvar ==
0]), "zero variance genes from input"))
inform22 <- "removed genes with duplicated names"
inform03 <- "linc: gene system(s) assumed:"
inform04 <- "linc: correction by sva was called"
inform05 <- "linc: remove principle components"
inform06 <- quote(paste("linc: The outlier method '", ol_promise,
"' was called"))
inform07 <- quote(paste("linc: Correlation function", " with '",
cor_use, "' called", sep = ""))
inform08 <- paste("linc: Computation of correlation", "matrix started")
store <- new.env(parent = emptyenv())
out_history <- new.env(parent = emptyenv())
if (is.null(codingGenes))
stop(errorm00)
if (length(codingGenes) != nrow(object))
stop(errorm01)
pc_promise <- codingGenes
if (class(verbose) != "logical") {
verbose <- TRUE
}
else {
if (!any(verbose))
verbose <- FALSE
if (any(verbose))
verbose <- TRUE
}
if (!verbose)
message <- function(x) x
cM_promise <- try(match.arg(corMethod, c("pearson", "kendall",
"spearman")), silent = TRUE)
if (class(cM_promise) == "try-error")
stop(errorm02)
if (!is.null(userFun))
cor_Method <- "user-defined"
if (!is.numeric(object))
stop(errorm03)
if (!all(is.finite(object))) {
warning(warnim01)
mobject <- object[apply(object, 1, function(x) {
any(is.finite(x))
}), ]
pcobject <- object
rownames(pcobject) <- pc_promise
pcobject <- pcobject[apply(pcobject, 1, function(x) {
any(is.finite(x))
}), ]
infrm <- nrow(object) - nrow(mobject)
if (infrm != 0) {
message(inform01)
object <- mobject
pc_promise <- rownames(pcobject)
}
}
obvar <- apply(object, 1, var)
if (is.element(0, obvar)) {
object <- object[obvar != 0, ]
pc_promise <- pc_promise[obvar != 0]
message(eval(inform02))
}
if (any(duplicated(rownames(object)))) {
pc_promise <- pc_promise[!duplicated(rownames(object))]
object <- object[(!duplicated(rownames(object))), ]
message(inform22)
}
out_object <- object
object <- object[!is.na(rownames(object)), ]
pc_promise <- pc_promise[!is.na(pc_promise)]
if (!all(dim(object) > 5))
stop(errorm04)
colnum <- ncol(object)
gN_promise <- rownames(object)
if (is.null(gN_promise))
stop(errorm05)
gD_promise <- try(identifyGenes(gN_promise), silent = TRUE)
if (class(gD_promise) == "try-error" | length(gD_promise) ==
0) {
warning(warnim02)
out_history$gene_system <- NA
}
else {
out_history$gene_system <- gD_promise
message(inform03)
sapply(gD_promise, function(x) message(x))
}
if (!is.null(batchGroups)) {
if (length(batchGroups) != colnum)
stop(errorm06)
if (1 == length(unique(batchGroups)))
stop(errorm07)
store$SVA <- TRUE
message(inform04)
if (length(nsv) == 1 && is.numeric(nsv) && is.vector(nsv)) {
bn_promise <- nsv
}
else {
bn_promise <- 1
}
}
if (!is.null(rmPC)) {
col_sel <- try(seq_len(colnum)[-rmPC], silent = TRUE)
if (class(col_sel) == "try-error")
stop(errorm08)
if (length(col_sel) == 0 | anyNA(col_sel))
stop(errorm08)
rm_promise <- seq_len(colnum)[-rmPC]
store$PCA <- TRUE
message(inform05)
}
if (!is.null(outlier)) {
ol_promise <- try(match.arg(outlier, c("zscore", "esd")),
silent = TRUE)
if (class(ol_promise) == "try-error")
stop(errorm09)
store$outlier <- TRUE
message(eval(inform06))
}
av_promise <- suppressMessages(reshape2::melt(data.frame(object)))
colnames(av_promise) <- c("group", "y")
anova_test <- anova(lm(y ~ group, data = av_promise))
f_sample <- anova_test$`F value`[1]
f_df <- anova_test$Df
f_critical <- df(0.95, df1 = f_df[1], df2 = f_df[2])
anova_passed <- (f_sample <= f_critical)
out_history$F_critical <- round(f_critical, 2)
out_history$F_sample <- round(f_sample, 2)
out_history$F_anova <- anova_passed
out_genes <- apply(object, 1, detectesd, alpha = 0.05, rmax = 4)
outlier_det <- (100 * sum(out_genes, na.rm = TRUE))/nrow(object)
out_history$outlier_detected <- round(outlier_det, 1)
stats_fail <- all((outlier_det > 10) && !anova_passed)
if (!exists("SVA", store) & !exists("PCA", store) & !exists("outlier",
store)) {
out_sobject <- object
sobject <- out_sobject
stats_applied <- "none"
if (stats_fail)
warning(warnim03)
}
else {
stats_applied <- paste(ls(store), collapse = ",")
}
if (exists("SVA", store) & exists("PCA", store))
warning(warnim04)
if (exists("outlier", store)) {
if (ol_promise == "esd") {
sobject <- t(apply(object, 1, correctESD, alpha = 0.05,
rmax = 4))
}
if (ol_promise == "zscore") {
sobject <- t(apply(object, 1, modZscore))
}
out_sobject <- sobject
}
else {
sobject <- object
out_sobject <- object
}
if (exists("PCA", store)) {
pca_object <- prcomp(sobject, center = FALSE, scale. = FALSE)
out_sobject <- pca_object$x[, rm_promise] %*% t(pca_object$rotation[,
rm_promise])
sobject <- out_sobject
}
if (exists("SVA", store)) {
exbatch <- as.factor(batchGroups)
mod1 <- model.matrix(~exbatch)
mod0 <- cbind(mod1[, 1])
svse <- svaseq(sobject, mod1, mod0, n.sv = bn_promise)$sv
out_sobject <- svaSolv(sobject, mod1, svse)
sobject <- out_sobject
}
if (anyNA(sobject)) {
cor_use <- "pairwise"
}
else {
cor_use <- "everything"
}
if (is.vector(pc_promise) && is.logical(pc_promise)) {
store$pc_index <- pc_promise
out_assignment <- gN_promise[store$pc_index]
}
if (is.vector(pc_promise) && is.character(pc_promise)) {
store$pc_index <- is.element(pc_promise, c("protein_coding",
"coding", "protein", "protein-coding", "protein coding"))
out_assignment <- gN_promise[store$pc_index]
}
if (!exists("pc_index", store))
stop(errorm10)
if (length(which(store$pc_index)) < 5)
stop(errorm11)
pc_matrix <- sobject[store$pc_index, ]
nc_matrix <- sobject[!store$pc_index, ]
message(eval(inform07))
message(inform08)
out_cormatrix <- try(callCor(corMethod, userFun, cor_use)(pc_matrix,
nc_matrix), silent = TRUE)
if (class(out_cormatrix) == "try-error")
stop(errorm12)
rownames(out_cormatrix) <- rownames(pc_matrix)
colnames(out_cormatrix) <- rownames(nc_matrix)
if (!all(is.finite(out_cormatrix))) {
warning(warnim05)
out_cormatrix[is.infinite(out_cormatrix) | is.na(out_cormatrix)] <- 0
}
out_ltlmatrix <- try(callCor(corMethod, userFun, cor_use)(nc_matrix,
nc_matrix), silent = TRUE)
if (class(out_ltlmatrix) == "try-error")
stop(errorm13)
rownames(out_ltlmatrix) <- rownames(nc_matrix)
colnames(out_ltlmatrix) <- rownames(nc_matrix)
if (!all(is.finite(out_ltlmatrix))) {
out_ltlmatrix[is.infinite(out_ltlmatrix) | is.na(out_ltlmatrix)] <- 0
}
out_history$cor_max <- round(max(out_cormatrix, na.rm = TRUE),
2)
out_history$corMethod <- corMethod
out_history$cor_use <- cor_use
out_history$pc_matrix <- pc_matrix
out_history$nc_matrix <- nc_matrix
out_history$stats_use <- stats_applied
out_linc <- new("LINCmatrix")
results(out_linc) <- list(statscorr = out_sobject)
assignment(out_linc) <- out_assignment
correlation(out_linc) <- list(cormatrix = out_cormatrix,
lnctolnc = out_ltlmatrix)
express(out_linc) <- out_object
history(out_linc) <- out_history
out_linCenvir <- NULL
out_linCenvir <- new.env(parent = emptyenv())
out_linCenvir$linc <- out_linc
linCenvir(out_linc) <- out_linCenvir
return(out_linc)
}
<bytecode: 0x1a03a0c0>
<environment: namespace:LINC>
Signatures:
object codingGenes
target "matrix" "logical"
defined "matrix" "ANY"
--- function search by body ---
S4 Method linc:LINC defined in namespace LINC with signature matrix#ANY has this body.
----------- END OF FAILURE REPORT --------------
Fatal error: the condition has length > 1
** running examples for arch 'x64' ... ERROR
Running examples in 'LINC-Ex.R' failed
The error most likely occurred in:
> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: linc-methods
> ### Title: Compute A Correlation Matrix of Co-expressed Coding And
> ### Non-Coding Genes
> ### Aliases: linc-methods linc,data.frame,ANY-method
> ### linc,ExpressionSet,ANY-method linc,LINCmatrix,missing-method
> ### linc,matrix,ANY-method linc
> ### Keywords: methods linc
>
> ### ** Examples
>
> data(BRAIN_EXPR)
>
> # call 'linc' with no further arguments
> crbl_matrix <- linc(cerebellum, codingGenes = pcgenes_crbl)
linc: gene system(s) assumed:
ENTREZID
Warning in linc(cerebellum, codingGenes = pcgenes_crbl) :
single outliers and high sample variance were detected
by ESD and ANOVA; statistical correction is recommended
linc: Correlation function with 'everything' called
linc: Computation of correlation matrix started
----------- FAILURE REPORT --------------
--- failure: the condition has length > 1 ---
--- srcref ---
:
--- package (from environment) ---
LINC
--- call from context ---
linc(cerebellum, codingGenes = pcgenes_crbl)
--- call from argument ---
if (class(out_cormatrix) == "try-error") stop(errorm12)
--- R stacktrace ---
where 1: linc(cerebellum, codingGenes = pcgenes_crbl)
where 2: linc(cerebellum, codingGenes = pcgenes_crbl)
--- value of length: 2 type: logical ---
[1] FALSE FALSE
--- function from context ---
Method Definition:
function (object, codingGenes = NULL, corMethod = "spearman",
batchGroups = NULL, nsv = 1, rmPC = NULL, outlier = NULL,
userFun = NULL, verbose = TRUE)
{
errorm00 <- paste("Assignment of protein-coding genes", "in 'codingGenes' is required")
errorm01 <- paste("'codingGenes' must have the same", "length as 'nrow(object)'")
errorm02 <- paste("'corMethod' needs to be 'pearson',", "'kendall' or 'spearman'")
errorm03 <- "A numeric matrix is required as input"
errorm04 <- "Size or content of matrix insufficient"
errorm05 <- "Gene names as 'rownames(object)' required"
errorm06 <- paste("'batchGroups' need to be of the", "same length as the columns")
errorm07 <- paste("Not allowed to use the same name", "for every entry in 'batchGroups'")
errorm08 <- paste("unable to use 'rmPC' as an index", "vector for the removal of pcs")
errorm09 <- paste("'outlier' needs to be 'zscore',", "or 'esd'")
errorm10 <- paste("'codingGenes' needs to be a gene", "annotation or a logical vector")
errorm11 <- paste("Error in argument 'codingGenes',", "not enough protein-coding genes")
errorm12 <- paste("unable to compute correlation matrix:",
"1. check input for infinite values / NAs", "2. check user-defined correlation function",
sep = "\n")
errorm13 <- "computation of cor. matrix lnc vs lnc failed"
warnim01 <- "Input 'object' contains infinite values"
warnim02 <- "'linc' was unable to identify a gene system"
warnim03 <- paste("single outliers and high sample variance were detected",
"by ESD and ANOVA; statistical correction is recommended",
sep = "\n")
warnim04 <- paste("Subsequent use of sva and removal of",
"principle components is not intended")
warnim05 <- paste("correlation matrix contains infinite",
"or missing values; converted to 0")
inform01 <- quote(paste("linc: removed ", infrm, "rows contaning only infinite values"))
inform02 <- quote(paste("removed", length(obvar[obvar ==
0]), "zero variance genes from input"))
inform22 <- "removed genes with duplicated names"
inform03 <- "linc: gene system(s) assumed:"
inform04 <- "linc: correction by sva was called"
inform05 <- "linc: remove principle components"
inform06 <- quote(paste("linc: The outlier method '", ol_promise,
"' was called"))
inform07 <- quote(paste("linc: Correlation function", " with '",
cor_use, "' called", sep = ""))
inform08 <- paste("linc: Computation of correlation", "matrix started")
store <- new.env(parent = emptyenv())
out_history <- new.env(parent = emptyenv())
if (is.null(codingGenes))
stop(errorm00)
if (length(codingGenes) != nrow(object))
stop(errorm01)
pc_promise <- codingGenes
if (class(verbose) != "logical") {
verbose <- TRUE
}
else {
if (!any(verbose))
verbose <- FALSE
if (any(verbose))
verbose <- TRUE
}
if (!verbose)
message <- function(x) x
cM_promise <- try(match.arg(corMethod, c("pearson", "kendall",
"spearman")), silent = TRUE)
if (class(cM_promise) == "try-error")
stop(errorm02)
if (!is.null(userFun))
cor_Method <- "user-defined"
if (!is.numeric(object))
stop(errorm03)
if (!all(is.finite(object))) {
warning(warnim01)
mobject <- object[apply(object, 1, function(x) {
any(is.finite(x))
}), ]
pcobject <- object
rownames(pcobject) <- pc_promise
pcobject <- pcobject[apply(pcobject, 1, function(x) {
any(is.finite(x))
}), ]
infrm <- nrow(object) - nrow(mobject)
if (infrm != 0) {
message(inform01)
object <- mobject
pc_promise <- rownames(pcobject)
}
}
obvar <- apply(object, 1, var)
if (is.element(0, obvar)) {
object <- object[obvar != 0, ]
pc_promise <- pc_promise[obvar != 0]
message(eval(inform02))
}
if (any(duplicated(rownames(object)))) {
pc_promise <- pc_promise[!duplicated(rownames(object))]
object <- object[(!duplicated(rownames(object))), ]
message(inform22)
}
out_object <- object
object <- object[!is.na(rownames(object)), ]
pc_promise <- pc_promise[!is.na(pc_promise)]
if (!all(dim(object) > 5))
stop(errorm04)
colnum <- ncol(object)
gN_promise <- rownames(object)
if (is.null(gN_promise))
stop(errorm05)
gD_promise <- try(identifyGenes(gN_promise), silent = TRUE)
if (class(gD_promise) == "try-error" | length(gD_promise) ==
0) {
warning(warnim02)
out_history$gene_system <- NA
}
else {
out_history$gene_system <- gD_promise
message(inform03)
sapply(gD_promise, function(x) message(x))
}
if (!is.null(batchGroups)) {
if (length(batchGroups) != colnum)
stop(errorm06)
if (1 == length(unique(batchGroups)))
stop(errorm07)
store$SVA <- TRUE
message(inform04)
if (length(nsv) == 1 && is.numeric(nsv) && is.vector(nsv)) {
bn_promise <- nsv
}
else {
bn_promise <- 1
}
}
if (!is.null(rmPC)) {
col_sel <- try(seq_len(colnum)[-rmPC], silent = TRUE)
if (class(col_sel) == "try-error")
stop(errorm08)
if (length(col_sel) == 0 | anyNA(col_sel))
stop(errorm08)
rm_promise <- seq_len(colnum)[-rmPC]
store$PCA <- TRUE
message(inform05)
}
if (!is.null(outlier)) {
ol_promise <- try(match.arg(outlier, c("zscore", "esd")),
silent = TRUE)
if (class(ol_promise) == "try-error")
stop(errorm09)
store$outlier <- TRUE
message(eval(inform06))
}
av_promise <- suppressMessages(reshape2::melt(data.frame(object)))
colnames(av_promise) <- c("group", "y")
anova_test <- anova(lm(y ~ group, data = av_promise))
f_sample <- anova_test$`F value`[1]
f_df <- anova_test$Df
f_critical <- df(0.95, df1 = f_df[1], df2 = f_df[2])
anova_passed <- (f_sample <= f_critical)
out_history$F_critical <- round(f_critical, 2)
out_history$F_sample <- round(f_sample, 2)
out_history$F_anova <- anova_passed
out_genes <- apply(object, 1, detectesd, alpha = 0.05, rmax = 4)
outlier_det <- (100 * sum(out_genes, na.rm = TRUE))/nrow(object)
out_history$outlier_detected <- round(outlier_det, 1)
stats_fail <- all((outlier_det > 10) && !anova_passed)
if (!exists("SVA", store) & !exists("PCA", store) & !exists("outlier",
store)) {
out_sobject <- object
sobject <- out_sobject
stats_applied <- "none"
if (stats_fail)
warning(warnim03)
}
else {
stats_applied <- paste(ls(store), collapse = ",")
}
if (exists("SVA", store) & exists("PCA", store))
warning(warnim04)
if (exists("outlier", store)) {
if (ol_promise == "esd") {
sobject <- t(apply(object, 1, correctESD, alpha = 0.05,
rmax = 4))
}
if (ol_promise == "zscore") {
sobject <- t(apply(object, 1, modZscore))
}
out_sobject <- sobject
}
else {
sobject <- object
out_sobject <- object
}
if (exists("PCA", store)) {
pca_object <- prcomp(sobject, center = FALSE, scale. = FALSE)
out_sobject <- pca_object$x[, rm_promise] %*% t(pca_object$rotation[,
rm_promise])
sobject <- out_sobject
}
if (exists("SVA", store)) {
exbatch <- as.factor(batchGroups)
mod1 <- model.matrix(~exbatch)
mod0 <- cbind(mod1[, 1])
svse <- svaseq(sobject, mod1, mod0, n.sv = bn_promise)$sv
out_sobject <- svaSolv(sobject, mod1, svse)
sobject <- out_sobject
}
if (anyNA(sobject)) {
cor_use <- "pairwise"
}
else {
cor_use <- "everything"
}
if (is.vector(pc_promise) && is.logical(pc_promise)) {
store$pc_index <- pc_promise
out_assignment <- gN_promise[store$pc_index]
}
if (is.vector(pc_promise) && is.character(pc_promise)) {
store$pc_index <- is.element(pc_promise, c("protein_coding",
"coding", "protein", "protein-coding", "protein coding"))
out_assignment <- gN_promise[store$pc_index]
}
if (!exists("pc_index", store))
stop(errorm10)
if (length(which(store$pc_index)) < 5)
stop(errorm11)
pc_matrix <- sobject[store$pc_index, ]
nc_matrix <- sobject[!store$pc_index, ]
message(eval(inform07))
message(inform08)
out_cormatrix <- try(callCor(corMethod, userFun, cor_use)(pc_matrix,
nc_matrix), silent = TRUE)
if (class(out_cormatrix) == "try-error")
stop(errorm12)
rownames(out_cormatrix) <- rownames(pc_matrix)
colnames(out_cormatrix) <- rownames(nc_matrix)
if (!all(is.finite(out_cormatrix))) {
warning(warnim05)
out_cormatrix[is.infinite(out_cormatrix) | is.na(out_cormatrix)] <- 0
}
out_ltlmatrix <- try(callCor(corMethod, userFun, cor_use)(nc_matrix,
nc_matrix), silent = TRUE)
if (class(out_ltlmatrix) == "try-error")
stop(errorm13)
rownames(out_ltlmatrix) <- rownames(nc_matrix)
colnames(out_ltlmatrix) <- rownames(nc_matrix)
if (!all(is.finite(out_ltlmatrix))) {
out_ltlmatrix[is.infinite(out_ltlmatrix) | is.na(out_ltlmatrix)] <- 0
}
out_history$cor_max <- round(max(out_cormatrix, na.rm = TRUE),
2)
out_history$corMethod <- corMethod
out_history$cor_use <- cor_use
out_history$pc_matrix <- pc_matrix
out_history$nc_matrix <- nc_matrix
out_history$stats_use <- stats_applied
out_linc <- new("LINCmatrix")
results(out_linc) <- list(statscorr = out_sobject)
assignment(out_linc) <- out_assignment
correlation(out_linc) <- list(cormatrix = out_cormatrix,
lnctolnc = out_ltlmatrix)
express(out_linc) <- out_object
history(out_linc) <- out_history
out_linCenvir <- NULL
out_linCenvir <- new.env(parent = emptyenv())
out_linCenvir$linc <- out_linc
linCenvir(out_linc) <- out_linCenvir
return(out_linc)
}
<bytecode: 0x000000001a72ba98>
<environment: namespace:LINC>
Signatures:
object codingGenes
target "matrix" "logical"
defined "matrix" "ANY"
--- function search by body ---
S4 Method linc:LINC defined in namespace LINC with signature matrix#ANY has this body.
----------- END OF FAILURE REPORT --------------
Fatal error: the condition has length > 1
* checking for unstated dependencies in 'tests' ... OK
* checking tests ...
** running tests for arch 'i386' ...
Running 'runTests.R'
ERROR
Running the tests in 'tests/runTests.R' failed.
Last 13 lines of output:
linCenvir(out_linc) <- out_linCenvir
return(out_linc)
}
<bytecode: 0x19fa7118>
<environment: namespace:LINC>
Signatures:
object codingGenes
target "matrix" "logical"
defined "matrix" "ANY"
--- function search by body ---
S4 Method linc:LINC defined in namespace LINC with signature matrix#ANY has this body.
----------- END OF FAILURE REPORT --------------
Fatal error: the condition has length > 1
** running tests for arch 'x64' ...
Running 'runTests.R'
ERROR
Running the tests in 'tests/runTests.R' failed.
Last 13 lines of output:
linCenvir(out_linc) <- out_linCenvir
return(out_linc)
}
<bytecode: 0x000000001a9fa2a8>
<environment: namespace:LINC>
Signatures:
object codingGenes
target "matrix" "logical"
defined "matrix" "ANY"
--- function search by body ---
S4 Method linc:LINC defined in namespace LINC with signature matrix#ANY has this body.
----------- END OF FAILURE REPORT --------------
Fatal error: the condition has length > 1
* 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: 4 ERRORs, 2 NOTEs
See
'C:/Users/biocbuild/bbs-3.11-bioc/meat/LINC.Rcheck/00check.log'
for details.
LINC.Rcheck/00install.out
##############################################################################
##############################################################################
###
### Running command:
###
### C:\cygwin\bin\curl.exe -O https://malbec2.bioconductor.org/BBS/3.11/bioc/src/contrib/LINC_1.16.0.tar.gz && rm -rf LINC.buildbin-libdir && mkdir LINC.buildbin-libdir && C:\Users\biocbuild\bbs-3.11-bioc\R\bin\R.exe CMD INSTALL --merge-multiarch --build --library=LINC.buildbin-libdir LINC_1.16.0.tar.gz && C:\Users\biocbuild\bbs-3.11-bioc\R\bin\R.exe CMD INSTALL LINC_1.16.0.zip && rm LINC_1.16.0.tar.gz LINC_1.16.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 2518k 100 2518k 0 0 19.3M 0 --:--:-- --:--:-- --:--:-- 20.3M
install for i386
* installing *source* package 'LINC' ...
** using staged installation
** libs
"C:/rtools40/mingw32/bin/"g++ -std=gnu++11 -I"C:/Users/BIOCBU~1/BBS-3~1.11-/R/include" -DNDEBUG -I'C:/Users/biocbuild/bbs-3.11-bioc/R/library/Rcpp/include' -I"C:/extsoft/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c Cppspear.cpp -o Cppspear.o
Cppspear.cpp: In function 'Rcpp::NumericMatrix Cppspear(Rcpp::NumericMatrix, Rcpp::NumericMatrix)':
Cppspear.cpp:78:14: warning: unused variable 'qspear' [-Wunused-variable]
double qspear;double nfraction;
^~~~~~
"C:/rtools40/mingw32/bin/"gcc -I"C:/Users/BIOCBU~1/BBS-3~1.11-/R/include" -DNDEBUG -I'C:/Users/biocbuild/bbs-3.11-bioc/R/library/Rcpp/include' -I"C:/extsoft/include" -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c LINC_init.c -o LINC_init.o
"C:/rtools40/mingw32/bin/"g++ -std=gnu++11 -I"C:/Users/BIOCBU~1/BBS-3~1.11-/R/include" -DNDEBUG -I'C:/Users/biocbuild/bbs-3.11-bioc/R/library/Rcpp/include' -I"C:/extsoft/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c RcppExports.cpp -o RcppExports.o
"C:/rtools40/mingw32/bin/"g++ -std=gnu++11 -I"C:/Users/BIOCBU~1/BBS-3~1.11-/R/include" -DNDEBUG -I'C:/Users/biocbuild/bbs-3.11-bioc/R/library/Rcpp/include' -I"C:/extsoft/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c docdd.cpp -o docdd.o
"C:/rtools40/mingw32/bin/"g++ -std=gnu++11 -I"C:/Users/BIOCBU~1/BBS-3~1.11-/R/include" -DNDEBUG -I'C:/Users/biocbuild/bbs-3.11-bioc/R/library/Rcpp/include' -I"C:/extsoft/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c doesd.cpp -o doesd.o
C:/rtools40/mingw32/bin/g++ -std=gnu++11 -shared -s -static-libgcc -o LINC.dll tmp.def Cppspear.o LINC_init.o RcppExports.o docdd.o doesd.o -LC:/extsoft/lib/i386 -LC:/extsoft/lib -LC:/Users/BIOCBU~1/BBS-3~1.11-/R/bin/i386 -lR
installing to C:/Users/biocbuild/bbs-3.11-bioc/meat/LINC.buildbin-libdir/00LOCK-LINC/00new/LINC/libs/i386
** R
** data
** inst
** byte-compile and prepare package for lazy loading
Creating a new generic function for 'history' in package 'LINC'
** help
*** installing help indices
converting help for package 'LINC'
finding HTML links ... done
Arith-methods html
BRAIN_EXPR html
LINCbio-class html
LINCcluster-class html
LINCfeature-class html
LINCmatrix-class html
LINCsingle-class html
assignment-methods html
changeOrgDb html
clusterlinc-methods html
correlation-methods html
express-methods html
feature html
getbio-methods html
getcoexpr html
getlinc-methods html
history-methods html
justlinc-methods html
linCenvir-methods html
linc-methods html
linctable-methods html
plotlinc-methods html
querycluster html
results-methods html
singlelinc-methods 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 'LINC' ...
** libs
"C:/rtools40/mingw64/bin/"g++ -std=gnu++11 -I"C:/Users/BIOCBU~1/BBS-3~1.11-/R/include" -DNDEBUG -I'C:/Users/biocbuild/bbs-3.11-bioc/R/library/Rcpp/include' -I"C:/extsoft/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c Cppspear.cpp -o Cppspear.o
Cppspear.cpp: In function 'Rcpp::NumericMatrix Cppspear(Rcpp::NumericMatrix, Rcpp::NumericMatrix)':
Cppspear.cpp:78:14: warning: unused variable 'qspear' [-Wunused-variable]
double qspear;double nfraction;
^~~~~~
"C:/rtools40/mingw64/bin/"gcc -I"C:/Users/BIOCBU~1/BBS-3~1.11-/R/include" -DNDEBUG -I'C:/Users/biocbuild/bbs-3.11-bioc/R/library/Rcpp/include' -I"C:/extsoft/include" -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c LINC_init.c -o LINC_init.o
"C:/rtools40/mingw64/bin/"g++ -std=gnu++11 -I"C:/Users/BIOCBU~1/BBS-3~1.11-/R/include" -DNDEBUG -I'C:/Users/biocbuild/bbs-3.11-bioc/R/library/Rcpp/include' -I"C:/extsoft/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c RcppExports.cpp -o RcppExports.o
"C:/rtools40/mingw64/bin/"g++ -std=gnu++11 -I"C:/Users/BIOCBU~1/BBS-3~1.11-/R/include" -DNDEBUG -I'C:/Users/biocbuild/bbs-3.11-bioc/R/library/Rcpp/include' -I"C:/extsoft/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c docdd.cpp -o docdd.o
"C:/rtools40/mingw64/bin/"g++ -std=gnu++11 -I"C:/Users/BIOCBU~1/BBS-3~1.11-/R/include" -DNDEBUG -I'C:/Users/biocbuild/bbs-3.11-bioc/R/library/Rcpp/include' -I"C:/extsoft/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c doesd.cpp -o doesd.o
C:/rtools40/mingw64/bin/g++ -std=gnu++11 -shared -s -static-libgcc -o LINC.dll tmp.def Cppspear.o LINC_init.o RcppExports.o docdd.o doesd.o -LC:/extsoft/lib/x64 -LC:/extsoft/lib -LC:/Users/BIOCBU~1/BBS-3~1.11-/R/bin/x64 -lR
installing to C:/Users/biocbuild/bbs-3.11-bioc/meat/LINC.buildbin-libdir/LINC/libs/x64
** testing if installed package can be loaded
* MD5 sums
packaged installation of 'LINC' as LINC_1.16.0.zip
* DONE (LINC)
* installing to library 'C:/Users/biocbuild/bbs-3.11-bioc/R/library'
package 'LINC' successfully unpacked and MD5 sums checked
|
LINC.Rcheck/tests_i386/runTests.Rout.fail
R version 4.0.3 (2020-10-10) -- "Bunny-Wunnies Freak Out"
Copyright (C) 2020 The R Foundation for Statistical Computing
Platform: i386-w64-mingw32/i386 (32-bit)
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 an HTML browser interface to help.
Type 'q()' to quit R.
> BiocGenerics:::testPackage("LINC")
This is LINC - Co-Expression Analysis of lincRNAs
(Manuel Goepferich & Carl Herrmann)
Attaching package: 'LINC'
The following object is masked from 'package:utils':
history
removed 4 zero variance genes from input
removed genes with duplicated names
linc: gene system(s) assumed:
ENTREZID
linc: Correlation function with 'everything' called
linc: Computation of correlation matrix started
----------- FAILURE REPORT --------------
--- failure: the condition has length > 1 ---
--- srcref ---
:
--- package (from environment) ---
LINC
--- call from context ---
linc(cor_test_mat, codingGenes = c(TRUE, FALSE, TRUE, TRUE, FALSE,
TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, rep(FALSE,
7)))
--- call from argument ---
if (class(out_cormatrix) == "try-error") stop(errorm12)
--- R stacktrace ---
where 1: linc(cor_test_mat, codingGenes = c(TRUE, FALSE, TRUE, TRUE, FALSE,
TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, rep(FALSE,
7)))
where 2: linc(cor_test_mat, codingGenes = c(TRUE, FALSE, TRUE, TRUE, FALSE,
TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, rep(FALSE,
7)))
where 3: func()
where 4: system.time(func(), gcFirst = RUnitEnv$.gcBeforeTest)
where 5: doTryCatch(return(expr), name, parentenv, handler)
where 6: tryCatchOne(expr, names, parentenv, handlers[[1L]])
where 7: tryCatchList(expr, classes, parentenv, handlers)
where 8: tryCatch(expr, error = function(e) {
call <- conditionCall(e)
if (!is.null(call)) {
if (identical(call[[1L]], quote(doTryCatch)))
call <- sys.call(-4L)
dcall <- deparse(call)[1L]
prefix <- paste("Error in", dcall, ": ")
LONG <- 75L
sm <- strsplit(conditionMessage(e), "\n")[[1L]]
w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")
if (is.na(w))
w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L],
type = "b")
if (w > LONG)
prefix <- paste0(prefix, "\n ")
}
else prefix <- "Error : "
msg <- paste0(prefix, conditionMessage(e), "\n")
.Internal(seterrmessage(msg[1L]))
if (!silent && isTRUE(getOption("show.error.messages"))) {
cat(msg, file = outFile)
.Internal(printDeferredWarnings())
}
invisible(structure(msg, class = "try-error", condition = e))
})
where 9: try(system.time(func(), gcFirst = RUnitEnv$.gcBeforeTest))
where 10: .executeTestCase(funcName, envir = sandbox, setUpFunc = .setUp,
tearDownFunc = .tearDown)
where 11: .sourceTestFile(testFile, testSuite$testFuncRegexp)
where 12: RUnit::runTestSuite(suite)
where 13: BiocGenerics:::testPackage("LINC")
--- value of length: 2 type: logical ---
[1] FALSE FALSE
--- function from context ---
Method Definition:
function (object, codingGenes = NULL, corMethod = "spearman",
batchGroups = NULL, nsv = 1, rmPC = NULL, outlier = NULL,
userFun = NULL, verbose = TRUE)
{
errorm00 <- paste("Assignment of protein-coding genes", "in 'codingGenes' is required")
errorm01 <- paste("'codingGenes' must have the same", "length as 'nrow(object)'")
errorm02 <- paste("'corMethod' needs to be 'pearson',", "'kendall' or 'spearman'")
errorm03 <- "A numeric matrix is required as input"
errorm04 <- "Size or content of matrix insufficient"
errorm05 <- "Gene names as 'rownames(object)' required"
errorm06 <- paste("'batchGroups' need to be of the", "same length as the columns")
errorm07 <- paste("Not allowed to use the same name", "for every entry in 'batchGroups'")
errorm08 <- paste("unable to use 'rmPC' as an index", "vector for the removal of pcs")
errorm09 <- paste("'outlier' needs to be 'zscore',", "or 'esd'")
errorm10 <- paste("'codingGenes' needs to be a gene", "annotation or a logical vector")
errorm11 <- paste("Error in argument 'codingGenes',", "not enough protein-coding genes")
errorm12 <- paste("unable to compute correlation matrix:",
"1. check input for infinite values / NAs", "2. check user-defined correlation function",
sep = "\n")
errorm13 <- "computation of cor. matrix lnc vs lnc failed"
warnim01 <- "Input 'object' contains infinite values"
warnim02 <- "'linc' was unable to identify a gene system"
warnim03 <- paste("single outliers and high sample variance were detected",
"by ESD and ANOVA; statistical correction is recommended",
sep = "\n")
warnim04 <- paste("Subsequent use of sva and removal of",
"principle components is not intended")
warnim05 <- paste("correlation matrix contains infinite",
"or missing values; converted to 0")
inform01 <- quote(paste("linc: removed ", infrm, "rows contaning only infinite values"))
inform02 <- quote(paste("removed", length(obvar[obvar ==
0]), "zero variance genes from input"))
inform22 <- "removed genes with duplicated names"
inform03 <- "linc: gene system(s) assumed:"
inform04 <- "linc: correction by sva was called"
inform05 <- "linc: remove principle components"
inform06 <- quote(paste("linc: The outlier method '", ol_promise,
"' was called"))
inform07 <- quote(paste("linc: Correlation function", " with '",
cor_use, "' called", sep = ""))
inform08 <- paste("linc: Computation of correlation", "matrix started")
store <- new.env(parent = emptyenv())
out_history <- new.env(parent = emptyenv())
if (is.null(codingGenes))
stop(errorm00)
if (length(codingGenes) != nrow(object))
stop(errorm01)
pc_promise <- codingGenes
if (class(verbose) != "logical") {
verbose <- TRUE
}
else {
if (!any(verbose))
verbose <- FALSE
if (any(verbose))
verbose <- TRUE
}
if (!verbose)
message <- function(x) x
cM_promise <- try(match.arg(corMethod, c("pearson", "kendall",
"spearman")), silent = TRUE)
if (class(cM_promise) == "try-error")
stop(errorm02)
if (!is.null(userFun))
cor_Method <- "user-defined"
if (!is.numeric(object))
stop(errorm03)
if (!all(is.finite(object))) {
warning(warnim01)
mobject <- object[apply(object, 1, function(x) {
any(is.finite(x))
}), ]
pcobject <- object
rownames(pcobject) <- pc_promise
pcobject <- pcobject[apply(pcobject, 1, function(x) {
any(is.finite(x))
}), ]
infrm <- nrow(object) - nrow(mobject)
if (infrm != 0) {
message(inform01)
object <- mobject
pc_promise <- rownames(pcobject)
}
}
obvar <- apply(object, 1, var)
if (is.element(0, obvar)) {
object <- object[obvar != 0, ]
pc_promise <- pc_promise[obvar != 0]
message(eval(inform02))
}
if (any(duplicated(rownames(object)))) {
pc_promise <- pc_promise[!duplicated(rownames(object))]
object <- object[(!duplicated(rownames(object))), ]
message(inform22)
}
out_object <- object
object <- object[!is.na(rownames(object)), ]
pc_promise <- pc_promise[!is.na(pc_promise)]
if (!all(dim(object) > 5))
stop(errorm04)
colnum <- ncol(object)
gN_promise <- rownames(object)
if (is.null(gN_promise))
stop(errorm05)
gD_promise <- try(identifyGenes(gN_promise), silent = TRUE)
if (class(gD_promise) == "try-error" | length(gD_promise) ==
0) {
warning(warnim02)
out_history$gene_system <- NA
}
else {
out_history$gene_system <- gD_promise
message(inform03)
sapply(gD_promise, function(x) message(x))
}
if (!is.null(batchGroups)) {
if (length(batchGroups) != colnum)
stop(errorm06)
if (1 == length(unique(batchGroups)))
stop(errorm07)
store$SVA <- TRUE
message(inform04)
if (length(nsv) == 1 && is.numeric(nsv) && is.vector(nsv)) {
bn_promise <- nsv
}
else {
bn_promise <- 1
}
}
if (!is.null(rmPC)) {
col_sel <- try(seq_len(colnum)[-rmPC], silent = TRUE)
if (class(col_sel) == "try-error")
stop(errorm08)
if (length(col_sel) == 0 | anyNA(col_sel))
stop(errorm08)
rm_promise <- seq_len(colnum)[-rmPC]
store$PCA <- TRUE
message(inform05)
}
if (!is.null(outlier)) {
ol_promise <- try(match.arg(outlier, c("zscore", "esd")),
silent = TRUE)
if (class(ol_promise) == "try-error")
stop(errorm09)
store$outlier <- TRUE
message(eval(inform06))
}
av_promise <- suppressMessages(reshape2::melt(data.frame(object)))
colnames(av_promise) <- c("group", "y")
anova_test <- anova(lm(y ~ group, data = av_promise))
f_sample <- anova_test$`F value`[1]
f_df <- anova_test$Df
f_critical <- df(0.95, df1 = f_df[1], df2 = f_df[2])
anova_passed <- (f_sample <= f_critical)
out_history$F_critical <- round(f_critical, 2)
out_history$F_sample <- round(f_sample, 2)
out_history$F_anova <- anova_passed
out_genes <- apply(object, 1, detectesd, alpha = 0.05, rmax = 4)
outlier_det <- (100 * sum(out_genes, na.rm = TRUE))/nrow(object)
out_history$outlier_detected <- round(outlier_det, 1)
stats_fail <- all((outlier_det > 10) && !anova_passed)
if (!exists("SVA", store) & !exists("PCA", store) & !exists("outlier",
store)) {
out_sobject <- object
sobject <- out_sobject
stats_applied <- "none"
if (stats_fail)
warning(warnim03)
}
else {
stats_applied <- paste(ls(store), collapse = ",")
}
if (exists("SVA", store) & exists("PCA", store))
warning(warnim04)
if (exists("outlier", store)) {
if (ol_promise == "esd") {
sobject <- t(apply(object, 1, correctESD, alpha = 0.05,
rmax = 4))
}
if (ol_promise == "zscore") {
sobject <- t(apply(object, 1, modZscore))
}
out_sobject <- sobject
}
else {
sobject <- object
out_sobject <- object
}
if (exists("PCA", store)) {
pca_object <- prcomp(sobject, center = FALSE, scale. = FALSE)
out_sobject <- pca_object$x[, rm_promise] %*% t(pca_object$rotation[,
rm_promise])
sobject <- out_sobject
}
if (exists("SVA", store)) {
exbatch <- as.factor(batchGroups)
mod1 <- model.matrix(~exbatch)
mod0 <- cbind(mod1[, 1])
svse <- svaseq(sobject, mod1, mod0, n.sv = bn_promise)$sv
out_sobject <- svaSolv(sobject, mod1, svse)
sobject <- out_sobject
}
if (anyNA(sobject)) {
cor_use <- "pairwise"
}
else {
cor_use <- "everything"
}
if (is.vector(pc_promise) && is.logical(pc_promise)) {
store$pc_index <- pc_promise
out_assignment <- gN_promise[store$pc_index]
}
if (is.vector(pc_promise) && is.character(pc_promise)) {
store$pc_index <- is.element(pc_promise, c("protein_coding",
"coding", "protein", "protein-coding", "protein coding"))
out_assignment <- gN_promise[store$pc_index]
}
if (!exists("pc_index", store))
stop(errorm10)
if (length(which(store$pc_index)) < 5)
stop(errorm11)
pc_matrix <- sobject[store$pc_index, ]
nc_matrix <- sobject[!store$pc_index, ]
message(eval(inform07))
message(inform08)
out_cormatrix <- try(callCor(corMethod, userFun, cor_use)(pc_matrix,
nc_matrix), silent = TRUE)
if (class(out_cormatrix) == "try-error")
stop(errorm12)
rownames(out_cormatrix) <- rownames(pc_matrix)
colnames(out_cormatrix) <- rownames(nc_matrix)
if (!all(is.finite(out_cormatrix))) {
warning(warnim05)
out_cormatrix[is.infinite(out_cormatrix) | is.na(out_cormatrix)] <- 0
}
out_ltlmatrix <- try(callCor(corMethod, userFun, cor_use)(nc_matrix,
nc_matrix), silent = TRUE)
if (class(out_ltlmatrix) == "try-error")
stop(errorm13)
rownames(out_ltlmatrix) <- rownames(nc_matrix)
colnames(out_ltlmatrix) <- rownames(nc_matrix)
if (!all(is.finite(out_ltlmatrix))) {
out_ltlmatrix[is.infinite(out_ltlmatrix) | is.na(out_ltlmatrix)] <- 0
}
out_history$cor_max <- round(max(out_cormatrix, na.rm = TRUE),
2)
out_history$corMethod <- corMethod
out_history$cor_use <- cor_use
out_history$pc_matrix <- pc_matrix
out_history$nc_matrix <- nc_matrix
out_history$stats_use <- stats_applied
out_linc <- new("LINCmatrix")
results(out_linc) <- list(statscorr = out_sobject)
assignment(out_linc) <- out_assignment
correlation(out_linc) <- list(cormatrix = out_cormatrix,
lnctolnc = out_ltlmatrix)
express(out_linc) <- out_object
history(out_linc) <- out_history
out_linCenvir <- NULL
out_linCenvir <- new.env(parent = emptyenv())
out_linCenvir$linc <- out_linc
linCenvir(out_linc) <- out_linCenvir
return(out_linc)
}
<bytecode: 0x19fa7118>
<environment: namespace:LINC>
Signatures:
object codingGenes
target "matrix" "logical"
defined "matrix" "ANY"
--- function search by body ---
S4 Method linc:LINC defined in namespace LINC with signature matrix#ANY has this body.
----------- END OF FAILURE REPORT --------------
Fatal error: the condition has length > 1
|
LINC.Rcheck/tests_x64/runTests.Rout.fail
R version 4.0.3 (2020-10-10) -- "Bunny-Wunnies Freak Out"
Copyright (C) 2020 The R Foundation for Statistical Computing
Platform: x86_64-w64-mingw32/x64 (64-bit)
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 an HTML browser interface to help.
Type 'q()' to quit R.
> BiocGenerics:::testPackage("LINC")
This is LINC - Co-Expression Analysis of lincRNAs
(Manuel Goepferich & Carl Herrmann)
Attaching package: 'LINC'
The following object is masked from 'package:utils':
history
removed 4 zero variance genes from input
removed genes with duplicated names
linc: gene system(s) assumed:
ENTREZID
linc: Correlation function with 'everything' called
linc: Computation of correlation matrix started
----------- FAILURE REPORT --------------
--- failure: the condition has length > 1 ---
--- srcref ---
:
--- package (from environment) ---
LINC
--- call from context ---
linc(cor_test_mat, codingGenes = c(TRUE, FALSE, TRUE, TRUE, FALSE,
TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, rep(FALSE,
7)))
--- call from argument ---
if (class(out_cormatrix) == "try-error") stop(errorm12)
--- R stacktrace ---
where 1: linc(cor_test_mat, codingGenes = c(TRUE, FALSE, TRUE, TRUE, FALSE,
TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, rep(FALSE,
7)))
where 2: linc(cor_test_mat, codingGenes = c(TRUE, FALSE, TRUE, TRUE, FALSE,
TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, rep(FALSE,
7)))
where 3: func()
where 4: system.time(func(), gcFirst = RUnitEnv$.gcBeforeTest)
where 5: doTryCatch(return(expr), name, parentenv, handler)
where 6: tryCatchOne(expr, names, parentenv, handlers[[1L]])
where 7: tryCatchList(expr, classes, parentenv, handlers)
where 8: tryCatch(expr, error = function(e) {
call <- conditionCall(e)
if (!is.null(call)) {
if (identical(call[[1L]], quote(doTryCatch)))
call <- sys.call(-4L)
dcall <- deparse(call)[1L]
prefix <- paste("Error in", dcall, ": ")
LONG <- 75L
sm <- strsplit(conditionMessage(e), "\n")[[1L]]
w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")
if (is.na(w))
w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L],
type = "b")
if (w > LONG)
prefix <- paste0(prefix, "\n ")
}
else prefix <- "Error : "
msg <- paste0(prefix, conditionMessage(e), "\n")
.Internal(seterrmessage(msg[1L]))
if (!silent && isTRUE(getOption("show.error.messages"))) {
cat(msg, file = outFile)
.Internal(printDeferredWarnings())
}
invisible(structure(msg, class = "try-error", condition = e))
})
where 9: try(system.time(func(), gcFirst = RUnitEnv$.gcBeforeTest))
where 10: .executeTestCase(funcName, envir = sandbox, setUpFunc = .setUp,
tearDownFunc = .tearDown)
where 11: .sourceTestFile(testFile, testSuite$testFuncRegexp)
where 12: RUnit::runTestSuite(suite)
where 13: BiocGenerics:::testPackage("LINC")
--- value of length: 2 type: logical ---
[1] FALSE FALSE
--- function from context ---
Method Definition:
function (object, codingGenes = NULL, corMethod = "spearman",
batchGroups = NULL, nsv = 1, rmPC = NULL, outlier = NULL,
userFun = NULL, verbose = TRUE)
{
errorm00 <- paste("Assignment of protein-coding genes", "in 'codingGenes' is required")
errorm01 <- paste("'codingGenes' must have the same", "length as 'nrow(object)'")
errorm02 <- paste("'corMethod' needs to be 'pearson',", "'kendall' or 'spearman'")
errorm03 <- "A numeric matrix is required as input"
errorm04 <- "Size or content of matrix insufficient"
errorm05 <- "Gene names as 'rownames(object)' required"
errorm06 <- paste("'batchGroups' need to be of the", "same length as the columns")
errorm07 <- paste("Not allowed to use the same name", "for every entry in 'batchGroups'")
errorm08 <- paste("unable to use 'rmPC' as an index", "vector for the removal of pcs")
errorm09 <- paste("'outlier' needs to be 'zscore',", "or 'esd'")
errorm10 <- paste("'codingGenes' needs to be a gene", "annotation or a logical vector")
errorm11 <- paste("Error in argument 'codingGenes',", "not enough protein-coding genes")
errorm12 <- paste("unable to compute correlation matrix:",
"1. check input for infinite values / NAs", "2. check user-defined correlation function",
sep = "\n")
errorm13 <- "computation of cor. matrix lnc vs lnc failed"
warnim01 <- "Input 'object' contains infinite values"
warnim02 <- "'linc' was unable to identify a gene system"
warnim03 <- paste("single outliers and high sample variance were detected",
"by ESD and ANOVA; statistical correction is recommended",
sep = "\n")
warnim04 <- paste("Subsequent use of sva and removal of",
"principle components is not intended")
warnim05 <- paste("correlation matrix contains infinite",
"or missing values; converted to 0")
inform01 <- quote(paste("linc: removed ", infrm, "rows contaning only infinite values"))
inform02 <- quote(paste("removed", length(obvar[obvar ==
0]), "zero variance genes from input"))
inform22 <- "removed genes with duplicated names"
inform03 <- "linc: gene system(s) assumed:"
inform04 <- "linc: correction by sva was called"
inform05 <- "linc: remove principle components"
inform06 <- quote(paste("linc: The outlier method '", ol_promise,
"' was called"))
inform07 <- quote(paste("linc: Correlation function", " with '",
cor_use, "' called", sep = ""))
inform08 <- paste("linc: Computation of correlation", "matrix started")
store <- new.env(parent = emptyenv())
out_history <- new.env(parent = emptyenv())
if (is.null(codingGenes))
stop(errorm00)
if (length(codingGenes) != nrow(object))
stop(errorm01)
pc_promise <- codingGenes
if (class(verbose) != "logical") {
verbose <- TRUE
}
else {
if (!any(verbose))
verbose <- FALSE
if (any(verbose))
verbose <- TRUE
}
if (!verbose)
message <- function(x) x
cM_promise <- try(match.arg(corMethod, c("pearson", "kendall",
"spearman")), silent = TRUE)
if (class(cM_promise) == "try-error")
stop(errorm02)
if (!is.null(userFun))
cor_Method <- "user-defined"
if (!is.numeric(object))
stop(errorm03)
if (!all(is.finite(object))) {
warning(warnim01)
mobject <- object[apply(object, 1, function(x) {
any(is.finite(x))
}), ]
pcobject <- object
rownames(pcobject) <- pc_promise
pcobject <- pcobject[apply(pcobject, 1, function(x) {
any(is.finite(x))
}), ]
infrm <- nrow(object) - nrow(mobject)
if (infrm != 0) {
message(inform01)
object <- mobject
pc_promise <- rownames(pcobject)
}
}
obvar <- apply(object, 1, var)
if (is.element(0, obvar)) {
object <- object[obvar != 0, ]
pc_promise <- pc_promise[obvar != 0]
message(eval(inform02))
}
if (any(duplicated(rownames(object)))) {
pc_promise <- pc_promise[!duplicated(rownames(object))]
object <- object[(!duplicated(rownames(object))), ]
message(inform22)
}
out_object <- object
object <- object[!is.na(rownames(object)), ]
pc_promise <- pc_promise[!is.na(pc_promise)]
if (!all(dim(object) > 5))
stop(errorm04)
colnum <- ncol(object)
gN_promise <- rownames(object)
if (is.null(gN_promise))
stop(errorm05)
gD_promise <- try(identifyGenes(gN_promise), silent = TRUE)
if (class(gD_promise) == "try-error" | length(gD_promise) ==
0) {
warning(warnim02)
out_history$gene_system <- NA
}
else {
out_history$gene_system <- gD_promise
message(inform03)
sapply(gD_promise, function(x) message(x))
}
if (!is.null(batchGroups)) {
if (length(batchGroups) != colnum)
stop(errorm06)
if (1 == length(unique(batchGroups)))
stop(errorm07)
store$SVA <- TRUE
message(inform04)
if (length(nsv) == 1 && is.numeric(nsv) && is.vector(nsv)) {
bn_promise <- nsv
}
else {
bn_promise <- 1
}
}
if (!is.null(rmPC)) {
col_sel <- try(seq_len(colnum)[-rmPC], silent = TRUE)
if (class(col_sel) == "try-error")
stop(errorm08)
if (length(col_sel) == 0 | anyNA(col_sel))
stop(errorm08)
rm_promise <- seq_len(colnum)[-rmPC]
store$PCA <- TRUE
message(inform05)
}
if (!is.null(outlier)) {
ol_promise <- try(match.arg(outlier, c("zscore", "esd")),
silent = TRUE)
if (class(ol_promise) == "try-error")
stop(errorm09)
store$outlier <- TRUE
message(eval(inform06))
}
av_promise <- suppressMessages(reshape2::melt(data.frame(object)))
colnames(av_promise) <- c("group", "y")
anova_test <- anova(lm(y ~ group, data = av_promise))
f_sample <- anova_test$`F value`[1]
f_df <- anova_test$Df
f_critical <- df(0.95, df1 = f_df[1], df2 = f_df[2])
anova_passed <- (f_sample <= f_critical)
out_history$F_critical <- round(f_critical, 2)
out_history$F_sample <- round(f_sample, 2)
out_history$F_anova <- anova_passed
out_genes <- apply(object, 1, detectesd, alpha = 0.05, rmax = 4)
outlier_det <- (100 * sum(out_genes, na.rm = TRUE))/nrow(object)
out_history$outlier_detected <- round(outlier_det, 1)
stats_fail <- all((outlier_det > 10) && !anova_passed)
if (!exists("SVA", store) & !exists("PCA", store) & !exists("outlier",
store)) {
out_sobject <- object
sobject <- out_sobject
stats_applied <- "none"
if (stats_fail)
warning(warnim03)
}
else {
stats_applied <- paste(ls(store), collapse = ",")
}
if (exists("SVA", store) & exists("PCA", store))
warning(warnim04)
if (exists("outlier", store)) {
if (ol_promise == "esd") {
sobject <- t(apply(object, 1, correctESD, alpha = 0.05,
rmax = 4))
}
if (ol_promise == "zscore") {
sobject <- t(apply(object, 1, modZscore))
}
out_sobject <- sobject
}
else {
sobject <- object
out_sobject <- object
}
if (exists("PCA", store)) {
pca_object <- prcomp(sobject, center = FALSE, scale. = FALSE)
out_sobject <- pca_object$x[, rm_promise] %*% t(pca_object$rotation[,
rm_promise])
sobject <- out_sobject
}
if (exists("SVA", store)) {
exbatch <- as.factor(batchGroups)
mod1 <- model.matrix(~exbatch)
mod0 <- cbind(mod1[, 1])
svse <- svaseq(sobject, mod1, mod0, n.sv = bn_promise)$sv
out_sobject <- svaSolv(sobject, mod1, svse)
sobject <- out_sobject
}
if (anyNA(sobject)) {
cor_use <- "pairwise"
}
else {
cor_use <- "everything"
}
if (is.vector(pc_promise) && is.logical(pc_promise)) {
store$pc_index <- pc_promise
out_assignment <- gN_promise[store$pc_index]
}
if (is.vector(pc_promise) && is.character(pc_promise)) {
store$pc_index <- is.element(pc_promise, c("protein_coding",
"coding", "protein", "protein-coding", "protein coding"))
out_assignment <- gN_promise[store$pc_index]
}
if (!exists("pc_index", store))
stop(errorm10)
if (length(which(store$pc_index)) < 5)
stop(errorm11)
pc_matrix <- sobject[store$pc_index, ]
nc_matrix <- sobject[!store$pc_index, ]
message(eval(inform07))
message(inform08)
out_cormatrix <- try(callCor(corMethod, userFun, cor_use)(pc_matrix,
nc_matrix), silent = TRUE)
if (class(out_cormatrix) == "try-error")
stop(errorm12)
rownames(out_cormatrix) <- rownames(pc_matrix)
colnames(out_cormatrix) <- rownames(nc_matrix)
if (!all(is.finite(out_cormatrix))) {
warning(warnim05)
out_cormatrix[is.infinite(out_cormatrix) | is.na(out_cormatrix)] <- 0
}
out_ltlmatrix <- try(callCor(corMethod, userFun, cor_use)(nc_matrix,
nc_matrix), silent = TRUE)
if (class(out_ltlmatrix) == "try-error")
stop(errorm13)
rownames(out_ltlmatrix) <- rownames(nc_matrix)
colnames(out_ltlmatrix) <- rownames(nc_matrix)
if (!all(is.finite(out_ltlmatrix))) {
out_ltlmatrix[is.infinite(out_ltlmatrix) | is.na(out_ltlmatrix)] <- 0
}
out_history$cor_max <- round(max(out_cormatrix, na.rm = TRUE),
2)
out_history$corMethod <- corMethod
out_history$cor_use <- cor_use
out_history$pc_matrix <- pc_matrix
out_history$nc_matrix <- nc_matrix
out_history$stats_use <- stats_applied
out_linc <- new("LINCmatrix")
results(out_linc) <- list(statscorr = out_sobject)
assignment(out_linc) <- out_assignment
correlation(out_linc) <- list(cormatrix = out_cormatrix,
lnctolnc = out_ltlmatrix)
express(out_linc) <- out_object
history(out_linc) <- out_history
out_linCenvir <- NULL
out_linCenvir <- new.env(parent = emptyenv())
out_linCenvir$linc <- out_linc
linCenvir(out_linc) <- out_linCenvir
return(out_linc)
}
<bytecode: 0x000000001a9fa2a8>
<environment: namespace:LINC>
Signatures:
object codingGenes
target "matrix" "logical"
defined "matrix" "ANY"
--- function search by body ---
S4 Method linc:LINC defined in namespace LINC with signature matrix#ANY has this body.
----------- END OF FAILURE REPORT --------------
Fatal error: the condition has length > 1
|
|
LINC.Rcheck/examples_i386/LINC-Ex.timings
|
LINC.Rcheck/examples_x64/LINC-Ex.timings
|