Question: STATegRa Minimum number of samples
0
18 months ago by
European Union
Lluís Revilla Sancho480 wrote:

I observed that the function omicsCompAnalysis fails with less than 9 samples.

Is this a hard requirement or is due to some particularity of my data?

With the same code I got several errors with different subsets of the same data:

subscript out of bounds
arguments imply differing number of rows: 4, 6, 2
argument of length 0
arguments imply differing number of rows: 0, 8

As with these arguments it works depending on the subset I suspect there is something else but I can't figure out what.

Many thanks,

Lluís

Code used, where keep is what is changing for to select a subset of data:

tryCatch({cc <- selectCommonComps(t(otus_i[keep, ]), t(otus_s[keep, ]), Rmax = 3)
PCA.selection(t(otus_i[keep, ]), fac.sel = "single%", varthreshold = 0.03)$numComps PCA.selection(t(otus_s[keep, ]), fac.sel = "single%", varthreshold = 0.03)$numComps
(ms <- modelSelection(list(eS_i, eS_s), Rmax = 7, fac.sel = "single%",
varthreshold = 0.03))

# grid.arrange(cc$pssq, cc$pratios, ncol=2)
# Omics Integration
discoRes <- omicsCompAnalysis(list("Intestinal" = eS_i, "Stools" = eS_s),
Names = c("Intestinal", "Stools"),
method = "DISCOSCA",
Rcommon = ms$common, Rspecific = ms$dist,
center = TRUE, scale = TRUE)
plotVAF(discoRes, main = colnames(keepCol)[i])
}, error = function(e){message(e)})

I am using the latest R 3.4.2 version and the latest Bioconductor version 3.6.

stategra • 262 views
modified 18 months ago • written 18 months ago by Lluís Revilla Sancho480

Reproducible example? Code that you used to produce the error?