STATegRa Minimum number of samples
0
0
Entering edit mode
@lluis-revilla-sancho
Last seen 8 days ago
European Union

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 • 828 views
ADD COMMENT
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

I can't reproduce the error without data, I can't reproduce the error with the vignette data and I won't post online my data, but I updated to include the relevant part of the code.

ADD REPLY

Login before adding your answer.

Traffic: 744 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6