Skip to content

Add SE and MAE support#351

Open
TuomasBorman wants to merge 5 commits into
mixOmicsTeam:masterfrom
TuomasBorman:master
Open

Add SE and MAE support#351
TuomasBorman wants to merge 5 commits into
mixOmicsTeam:masterfrom
TuomasBorman:master

Conversation

@TuomasBorman

Copy link
Copy Markdown

Related to this issue: #347

This PR adds support for SummarizedExperiment and MultiAssayExperiment classes. They are primary data containers in Bioconductor which is why I think that the support benefits both mixOmics and whole Bioconductor ecosystem.

Comment thread DESCRIPTION
person("Florian", "Rohart", role = "aut"),
person("Ignacio", "Gonzalez", role = "aut"),
person("Sebastien", "Dejean", role = "aut"),
## key contributors

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comments are not supported, and they lead to an error

Comment thread R/mixOmics.R
Comment on lines +220 to +294
setMethod("mixOmics", signature = c(X = "matrix"), function(
X,
Y,
indY,
study,
ncomp,
keepX,
keepY,
design,
tau = NULL,
mode = c("regression", "canonical", "invariant", "classic"),
scale,
tol = 1e-06,
max.iter = 100,
near.zero.var = FALSE){
res <- internal_mixOmics(
X,
Y,
indY,
study,
ncomp,
keepX,
keepY,
design,
tau = NULL,
mode = c("regression", "canonical", "invariant", "classic"),
scale,
tol = 1e-06,
max.iter = 100,
near.zero.var = FALSE
)
return(res)
}
)

#' @rdname mixOmics
#' @export
setMethod("mixOmics", signature = c(X = "list"), function(
X,
Y,
indY,
study,
ncomp,
keepX,
keepY,
design,
tau = NULL,
mode = c("regression", "canonical", "invariant", "classic"),
scale,
tol = 1e-06,
max.iter = 100,
near.zero.var = FALSE,
...){
res <- internal_mixOmics(
X,
Y,
indY,
study,
ncomp,
keepX,
keepY,
design,
tau = NULL,
mode = c("regression", "canonical", "invariant", "classic"),
scale,
tol = 1e-06,
max.iter = 100,
near.zero.var = FALSE,
...
)
return(res)
}
)

internal_mixOmics <- function(X,

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The old mixOmics function is converted into generic function. Otherwise I have not touched the existing code

@TuomasBorman

Copy link
Copy Markdown
Author

Hello @evaham1 !

Is this SE/MAE support something that you could consider?

-Tuomas

@TuomasBorman

Copy link
Copy Markdown
Author

Hi @dereklei12 !

Is this something that you could consider?

-Tuomas

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant