Skip to content

Add SE and MAE support #351

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

TuomasBorman
Copy link

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.

@@ -39,17 +41,16 @@ Authors@R:
person("Florian", "Rohart", role = "aut"),
person("Ignacio", "Gonzalez", role = "aut"),
person("Sebastien", "Dejean", role = "aut"),
## key contributors
Copy link
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 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
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

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