This page was generated on 2020-10-17 11:56:35 -0400 (Sat, 17 Oct 2020).
##############################################################################
##############################################################################
###
### Running command:
###
### C:\Users\biocbuild\bbs-3.11-bioc\R\bin\R.exe CMD check --force-multiarch --install=check:flowType.install-out.txt --library=C:\Users\biocbuild\bbs-3.11-bioc\R\library --no-vignettes --timings flowType_2.26.0.tar.gz
###
##############################################################################
##############################################################################
* using log directory 'C:/Users/biocbuild/bbs-3.11-bioc/meat/flowType.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 'flowType/DESCRIPTION' ... OK
* checking extension type ... Package
* this is package 'flowType' version '2.26.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 'flowType' 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
Namespace in Imports field not imported from: 'grDevices'
All declared Imports should be used.
Packages in Depends field not imported from:
'BH' 'Rcpp'
These packages need to be imported from (in the NAMESPACE file)
for when this namespace is loaded but not attached.
* checking S3 generic/method consistency ... OK
* checking replacement functions ... OK
* checking foreign function calls ... OK
* checking R code for possible problems ... NOTE
flowType: no visible global function definition for 'new'
plot,Phenotypes-flowFrame: no visible global function definition for
'density'
Undefined global functions or variables:
density new
Consider adding
importFrom("methods", "new")
importFrom("stats", "density")
to your NAMESPACE file (and ensure that your DESCRIPTION Imports field
contains 'methods').
* 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 line endings in C/C++/Fortran sources/headers ... OK
* checking line endings in Makefiles ... OK
* checking compilation flags in Makevars ... OK
* checking for GNU extensions in Makefiles ... OK
* checking for portable use of $(BLAS_LIBS) and $(LAPACK_LIBS) ... OK
* checking use of PKG_*FLAGS in Makefiles ... 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/flowType/libs/i386/flowType.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/flowType/libs/x64/flowType.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 'flowType-Ex.R' failed
The error most likely occurred in:
> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: flowType-package
> ### Title: flowType: Phenotyping Flow Cytometry Assays
> ### Aliases: flowType-package
> ### Keywords: clustering classification HIV FlowCytData
>
> ### ** Examples
>
> #Load the library
> library(flowType)
> data(DLBCLExample)
> MarkerNames <- c('Time', 'FSC-A','FSC-H','SSC-A','IgG','CD38','CD19','CD3','CD27','CD20', 'NA', 'NA')
>
> #These markers will be analyzed
> PropMarkers <- 3:5
> MFIMarkers <- PropMarkers
> MarkerNames <- c('FS', 'SS','CD3','CD5','CD19')
>
> #Run flowType
> Res <- flowType(DLBCLExample, PropMarkers, MFIMarkers, 'kmeans', MarkerNames);
----------- FAILURE REPORT --------------
--- failure: length > 1 in coercion to logical ---
--- srcref ---
:
--- package (from environment) ---
flowType
--- call from context ---
flowType(DLBCLExample, PropMarkers, MFIMarkers, "kmeans", MarkerNames)
--- call from argument ---
Methods == "Thresholds" && (!is.list(Thresholds))
--- R stacktrace ---
where 1: flowType(DLBCLExample, PropMarkers, MFIMarkers, "kmeans", MarkerNames)
--- value of length: 3 type: logical ---
kmeans kmeans kmeans
FALSE FALSE FALSE
--- function from context ---
function (Frame, PropMarkers = NULL, MFIMarkers = NULL, Methods = "kmeans",
MarkerNames = NULL, MaxMarkersPerPop = NULL, PartitionsPerMarker = 2,
Thresholds = NULL, MemLimit = 4, verbose = FALSE)
{
if (is.null(PropMarkers))
PropMarkers = c(1:length(exprs(Frame)[1, ]))
if (is.null(MFIMarkers))
MFIMarkers = vector()
if (is.null(MaxMarkersPerPop))
MaxMarkersPerPop <- length(PropMarkers)
if (FALSE %in% is.numeric(PropMarkers))
PropMarkers <- unlist(lapply(1:length(PropMarkers), function(i) {
which(PropMarkers[i] == colnames(exprs(Frame)))
}))
if (FALSE %in% is.numeric(MFIMarkers) && length(MFIMarkers) >
0)
MFIMarkers <- unlist(lapply(1:length(MFIMarkers), function(i) {
which(MFIMarkers[i] == colnames(exprs(Frame)))
}))
VALID_METHODS <- c("Thresholds", "flowMeans", "kmeans", "flowClust")
Methods <- sapply(Methods, function(x) {
sub("thresh", "Thresh", x)
})
if (!all(sapply(Methods, function(x) {
x %in% VALID_METHODS
})))
stop(paste("Invalid method specified. Methods must be one of:",
paste(VALID_METHODS, collapse = ", ")))
if (length(Methods) == 1) {
Methods = rep(Methods, length(PropMarkers))
}
else {
stop("Only one method may be specified")
}
if (Methods == "Thresholds" && (!is.list(Thresholds)))
stop("Thresholds must be provided as a list of vectors.")
if (length(Thresholds) == 1) {
if (length(unique(PartitionsPerMarker)) > 1)
stop("When markers have different numbers of partitions, you must specify Thresholds on a per-marker basis.")
if (length(Thresholds[[1]]) != PartitionsPerMarker[1] -
1)
stop("When a single vector is provided for Thresholds, it must contain exactly PartitionsPerMarker-1 Thresholds.")
Thresholds <- rep(Thresholds, length(PropMarkers))
}
if (length(PartitionsPerMarker) == 1)
PartitionsPerMarker = rep(PartitionsPerMarker, length(PropMarkers))
if (length(PartitionsPerMarker) != length(PropMarkers))
stop("PartitionsPerMarker must either be specified once for all markers, or be of the same length as PropMarkers.")
if (length(Thresholds) == 0 && "Thresholds" %in% Methods)
stop("When Thresholds is specified as a method, You must provide Thresholds via the \"Thresholds\" argument.")
if (is.null(MarkerNames))
MarkerNames <- as.vector(Frame@parameters@data$name)
if (is.null(MarkerNames))
MarkerNames <- PropMarkers
NumPops <- calcNumPops(PartitionsPerMarker, MaxMarkersPerPop)
MemUse <- calcMemUse(NumPops, length(PropMarkers), length(MFIMarkers),
nrow(Frame), MaxMarkersPerPop, max(PartitionsPerMarker))/10^9
if (verbose)
message(sprintf("Estimated memory required: %f GB of RAM",
MemUse))
if (MemUse > MemLimit)
stop(paste("Calling flowType with these parameters would require",
MemUse, "GB of RAM, but MemLimit is", MemLimit, "GB.\n Try reducing MaxMarkersPerPop or the number of MFIMarkers."))
X <- exprs(Frame)[, PropMarkers]
M <- ncol(X)
N <- nrow(X)
Partitions <- matrix(0, M, N)
for (i in 1:M) {
if (Methods[i] == "kmeans") {
km <- kmeans(X[, i], PartitionsPerMarker[i], nstart = 50)$cluster
means <- sapply(unique(km), function(x) {
mean(X[which(km == x), i])
})
names(means) <- unique(km)
means <- sort(means)
new.km <- rep(0, length(km))
for (cluster.ind in 1:PartitionsPerMarker[i]) {
to.replace <- which(names(means) == cluster.ind)
new.km[which(km == cluster.ind)] <- to.replace
}
Partitions[i, ] <- new.km
}
if (Methods[i] == "flowMeans") {
km <- flowMeans(X[, i], NumC = PartitionsPerMarker[i],
MaxN = 10, nstart = 10)@Label
means <- sapply(unique(km), function(x) {
mean(X[which(km == x), i])
})
names(means) <- unique(km)
means <- sort(means)
new.km <- rep(0, length(km))
for (cluster.ind in 1:PartitionsPerMarker[i]) {
to.replace <- which(names(means) == cluster.ind)
new.km[which(km == cluster.ind)] <- to.replace
}
Partitions[i, ] <- new.km
}
if (Methods[i] == "flowClust") {
res <- flowClust(Frame, varNames = colnames(exprs(Frame))[i],
K = PartitionsPerMarker[i], level = 1)
km = map(res@z)
km = replace(km, which(is.na(km)), 1)
means <- sapply(unique(km), function(x) {
mean(X[which(km == x), i])
})
names(means) <- unique(km)
means <- sort(means)
new.km <- rep(0, length(km))
for (cluster.ind in 1:PartitionsPerMarker[i]) {
to.replace <- which(names(means) == cluster.ind)
new.km[which(km == cluster.ind)] <- to.replace
}
Partitions[i, ] <- new.km
}
if (Methods[i] == "Thresholds") {
for (Marker in 1:length(Thresholds)) {
marker.vec <- rep(1, ncol(Partitions))
for (partition in 2:(length(Thresholds[[Marker]]) +
1)) {
marker.vec[which(X[, Marker] >= Thresholds[[Marker]][partition -
1])] <- partition
}
Partitions[Marker, ] <- marker.vec
}
}
}
partToThresh <- function(ThisChan, Partitions, PropMarkers,
ThisExpr) {
if (Methods[ThisChan] == "Thresholds") {
return(Thresholds[[ThisChan]])
}
ThisPart <- t(Partitions)[, ThisChan]
PartLabels <- unique(ThisPart)
MaxParts <- sapply(PartLabels, function(x) {
max(ThisExpr[which(ThisPart == PartLabels[x]), ThisChan])
})
Thresholds <- sort(MaxParts)[1:(length(PartLabels) -
1)]
Thresholds
}
Thresholds <- lapply(1:length(PropMarkers), partToThresh,
Partitions, PropMarkers, X)
for (i in 1:M) {
if (Methods[i] == "flowMeans") {
for (Marker in 1:length(Thresholds)) {
marker.vec <- rep(1, ncol(Partitions))
for (partition in 2:(length(Thresholds[[Marker]]) +
1)) {
marker.vec[which(X[, Marker] >= Thresholds[[Marker]][partition -
1])] <- partition
}
Partitions[Marker, ] <- marker.vec
}
}
}
if (length(MFIMarkers) > 0) {
MFIData <- matrix(exprs(Frame)[, MFIMarkers], ncol = length(MFIMarkers))
}
else {
MFIData <- matrix()
}
res <- .Call("countCells", as.integer(PartitionsPerMarker),
Thresholds, as.integer(MaxMarkersPerPop), PropMarkers,
MFIData, X, NumPops, verbose)
Counts <- res$counts
if (length(MFIMarkers) > 0) {
Means <- res$mfis
Means[which(Counts == 0), ] = NA
}
else {
Means = matrix()
}
Codes <- res$codes
if (length(MFIMarkers) > 0) {
colnames(Means) = colnames(exprs(Frame))[MFIMarkers]
}
Partitions = t(Partitions)
return(new("Phenotypes", CellFreqs = Counts, PhenoCodes = Codes,
MFIs = Means, PropMarkers = PropMarkers, MFIMarkers = MFIMarkers,
MarkerNames = MarkerNames, Partitions = Partitions, PartitionsPerMarker = PartitionsPerMarker,
Thresholds = Thresholds))
}
<bytecode: 0x0e05f798>
<environment: namespace:flowType>
--- function search by body ---
Function flowType in namespace flowType has this body.
----------- END OF FAILURE REPORT --------------
Fatal error: length > 1 in coercion to logical
** running examples for arch 'x64' ... ERROR
Running examples in 'flowType-Ex.R' failed
The error most likely occurred in:
> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: flowType-package
> ### Title: flowType: Phenotyping Flow Cytometry Assays
> ### Aliases: flowType-package
> ### Keywords: clustering classification HIV FlowCytData
>
> ### ** Examples
>
> #Load the library
> library(flowType)
> data(DLBCLExample)
> MarkerNames <- c('Time', 'FSC-A','FSC-H','SSC-A','IgG','CD38','CD19','CD3','CD27','CD20', 'NA', 'NA')
>
> #These markers will be analyzed
> PropMarkers <- 3:5
> MFIMarkers <- PropMarkers
> MarkerNames <- c('FS', 'SS','CD3','CD5','CD19')
>
> #Run flowType
> Res <- flowType(DLBCLExample, PropMarkers, MFIMarkers, 'kmeans', MarkerNames);
----------- FAILURE REPORT --------------
--- failure: length > 1 in coercion to logical ---
--- srcref ---
:
--- package (from environment) ---
flowType
--- call from context ---
flowType(DLBCLExample, PropMarkers, MFIMarkers, "kmeans", MarkerNames)
--- call from argument ---
Methods == "Thresholds" && (!is.list(Thresholds))
--- R stacktrace ---
where 1: flowType(DLBCLExample, PropMarkers, MFIMarkers, "kmeans", MarkerNames)
--- value of length: 3 type: logical ---
kmeans kmeans kmeans
FALSE FALSE FALSE
--- function from context ---
function (Frame, PropMarkers = NULL, MFIMarkers = NULL, Methods = "kmeans",
MarkerNames = NULL, MaxMarkersPerPop = NULL, PartitionsPerMarker = 2,
Thresholds = NULL, MemLimit = 4, verbose = FALSE)
{
if (is.null(PropMarkers))
PropMarkers = c(1:length(exprs(Frame)[1, ]))
if (is.null(MFIMarkers))
MFIMarkers = vector()
if (is.null(MaxMarkersPerPop))
MaxMarkersPerPop <- length(PropMarkers)
if (FALSE %in% is.numeric(PropMarkers))
PropMarkers <- unlist(lapply(1:length(PropMarkers), function(i) {
which(PropMarkers[i] == colnames(exprs(Frame)))
}))
if (FALSE %in% is.numeric(MFIMarkers) && length(MFIMarkers) >
0)
MFIMarkers <- unlist(lapply(1:length(MFIMarkers), function(i) {
which(MFIMarkers[i] == colnames(exprs(Frame)))
}))
VALID_METHODS <- c("Thresholds", "flowMeans", "kmeans", "flowClust")
Methods <- sapply(Methods, function(x) {
sub("thresh", "Thresh", x)
})
if (!all(sapply(Methods, function(x) {
x %in% VALID_METHODS
})))
stop(paste("Invalid method specified. Methods must be one of:",
paste(VALID_METHODS, collapse = ", ")))
if (length(Methods) == 1) {
Methods = rep(Methods, length(PropMarkers))
}
else {
stop("Only one method may be specified")
}
if (Methods == "Thresholds" && (!is.list(Thresholds)))
stop("Thresholds must be provided as a list of vectors.")
if (length(Thresholds) == 1) {
if (length(unique(PartitionsPerMarker)) > 1)
stop("When markers have different numbers of partitions, you must specify Thresholds on a per-marker basis.")
if (length(Thresholds[[1]]) != PartitionsPerMarker[1] -
1)
stop("When a single vector is provided for Thresholds, it must contain exactly PartitionsPerMarker-1 Thresholds.")
Thresholds <- rep(Thresholds, length(PropMarkers))
}
if (length(PartitionsPerMarker) == 1)
PartitionsPerMarker = rep(PartitionsPerMarker, length(PropMarkers))
if (length(PartitionsPerMarker) != length(PropMarkers))
stop("PartitionsPerMarker must either be specified once for all markers, or be of the same length as PropMarkers.")
if (length(Thresholds) == 0 && "Thresholds" %in% Methods)
stop("When Thresholds is specified as a method, You must provide Thresholds via the \"Thresholds\" argument.")
if (is.null(MarkerNames))
MarkerNames <- as.vector(Frame@parameters@data$name)
if (is.null(MarkerNames))
MarkerNames <- PropMarkers
NumPops <- calcNumPops(PartitionsPerMarker, MaxMarkersPerPop)
MemUse <- calcMemUse(NumPops, length(PropMarkers), length(MFIMarkers),
nrow(Frame), MaxMarkersPerPop, max(PartitionsPerMarker))/10^9
if (verbose)
message(sprintf("Estimated memory required: %f GB of RAM",
MemUse))
if (MemUse > MemLimit)
stop(paste("Calling flowType with these parameters would require",
MemUse, "GB of RAM, but MemLimit is", MemLimit, "GB.\n Try reducing MaxMarkersPerPop or the number of MFIMarkers."))
X <- exprs(Frame)[, PropMarkers]
M <- ncol(X)
N <- nrow(X)
Partitions <- matrix(0, M, N)
for (i in 1:M) {
if (Methods[i] == "kmeans") {
km <- kmeans(X[, i], PartitionsPerMarker[i], nstart = 50)$cluster
means <- sapply(unique(km), function(x) {
mean(X[which(km == x), i])
})
names(means) <- unique(km)
means <- sort(means)
new.km <- rep(0, length(km))
for (cluster.ind in 1:PartitionsPerMarker[i]) {
to.replace <- which(names(means) == cluster.ind)
new.km[which(km == cluster.ind)] <- to.replace
}
Partitions[i, ] <- new.km
}
if (Methods[i] == "flowMeans") {
km <- flowMeans(X[, i], NumC = PartitionsPerMarker[i],
MaxN = 10, nstart = 10)@Label
means <- sapply(unique(km), function(x) {
mean(X[which(km == x), i])
})
names(means) <- unique(km)
means <- sort(means)
new.km <- rep(0, length(km))
for (cluster.ind in 1:PartitionsPerMarker[i]) {
to.replace <- which(names(means) == cluster.ind)
new.km[which(km == cluster.ind)] <- to.replace
}
Partitions[i, ] <- new.km
}
if (Methods[i] == "flowClust") {
res <- flowClust(Frame, varNames = colnames(exprs(Frame))[i],
K = PartitionsPerMarker[i], level = 1)
km = map(res@z)
km = replace(km, which(is.na(km)), 1)
means <- sapply(unique(km), function(x) {
mean(X[which(km == x), i])
})
names(means) <- unique(km)
means <- sort(means)
new.km <- rep(0, length(km))
for (cluster.ind in 1:PartitionsPerMarker[i]) {
to.replace <- which(names(means) == cluster.ind)
new.km[which(km == cluster.ind)] <- to.replace
}
Partitions[i, ] <- new.km
}
if (Methods[i] == "Thresholds") {
for (Marker in 1:length(Thresholds)) {
marker.vec <- rep(1, ncol(Partitions))
for (partition in 2:(length(Thresholds[[Marker]]) +
1)) {
marker.vec[which(X[, Marker] >= Thresholds[[Marker]][partition -
1])] <- partition
}
Partitions[Marker, ] <- marker.vec
}
}
}
partToThresh <- function(ThisChan, Partitions, PropMarkers,
ThisExpr) {
if (Methods[ThisChan] == "Thresholds") {
return(Thresholds[[ThisChan]])
}
ThisPart <- t(Partitions)[, ThisChan]
PartLabels <- unique(ThisPart)
MaxParts <- sapply(PartLabels, function(x) {
max(ThisExpr[which(ThisPart == PartLabels[x]), ThisChan])
})
Thresholds <- sort(MaxParts)[1:(length(PartLabels) -
1)]
Thresholds
}
Thresholds <- lapply(1:length(PropMarkers), partToThresh,
Partitions, PropMarkers, X)
for (i in 1:M) {
if (Methods[i] == "flowMeans") {
for (Marker in 1:length(Thresholds)) {
marker.vec <- rep(1, ncol(Partitions))
for (partition in 2:(length(Thresholds[[Marker]]) +
1)) {
marker.vec[which(X[, Marker] >= Thresholds[[Marker]][partition -
1])] <- partition
}
Partitions[Marker, ] <- marker.vec
}
}
}
if (length(MFIMarkers) > 0) {
MFIData <- matrix(exprs(Frame)[, MFIMarkers], ncol = length(MFIMarkers))
}
else {
MFIData <- matrix()
}
res <- .Call("countCells", as.integer(PartitionsPerMarker),
Thresholds, as.integer(MaxMarkersPerPop), PropMarkers,
MFIData, X, NumPops, verbose)
Counts <- res$counts
if (length(MFIMarkers) > 0) {
Means <- res$mfis
Means[which(Counts == 0), ] = NA
}
else {
Means = matrix()
}
Codes <- res$codes
if (length(MFIMarkers) > 0) {
colnames(Means) = colnames(exprs(Frame))[MFIMarkers]
}
Partitions = t(Partitions)
return(new("Phenotypes", CellFreqs = Counts, PhenoCodes = Codes,
MFIs = Means, PropMarkers = PropMarkers, MFIMarkers = MFIMarkers,
MarkerNames = MarkerNames, Partitions = Partitions, PartitionsPerMarker = PartitionsPerMarker,
Thresholds = Thresholds))
}
<bytecode: 0x000000001a63ca68>
<environment: namespace:flowType>
--- function search by body ---
Function flowType in namespace flowType 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/flowType.Rcheck/00check.log'
for details.