sparseOptimization is nice feature that reduces the memory footprint and allows faster computation in CoGAPS. To some reason, sparse matrix is not supported as input, proof:
mat <- Matrix::sparseMatrix(i = sample(1:20, 100, replace = TRUE),
j = sample(1:10, 100, replace = TRUE),
x = runif(100))
params <- CogapsParams(seed = 42,
nIterations = 30,
nPatterns = 2,
sparseOptimization = as.logical(0),
distributed = "genome-wide")
params <- setDistributedParams(params, nSets = 2)
cg <- CoGAPS(mat,
params = params,
BPPARAM = BiocParallel::SerialParam(),
messages = FALSE)
yields:
Error in convertDataToMatrix(data) : unsupported data type
Let's add native sparseMatrix support.
Thanks to Brian@IGS for heads up!
sparseOptimization is nice feature that reduces the memory footprint and allows faster computation in CoGAPS. To some reason, sparse matrix is not supported as input, proof:
yields:
Let's add native sparseMatrix support.
Thanks to Brian@IGS for heads up!