waldronlab / MultiAssayExperiment

Bioconductor package for management of multi-assay data
https://waldronlab.io/MultiAssayExperiment/
69 stars 32 forks source link

Define a `$` method for `MultiAssayExperiment` #153

Closed lwaldron closed 8 years ago

lwaldron commented 8 years ago

I would expect $ on an mae object to be equivalent to pData(mae)$, similarly as it acts for ExpressionSet and SummarizedExperiment, e.g.:

> library(SummarizedExperiment)
> example("SummarizedExperiment")
> colData(se)
DataFrame with 6 rows and 1 column
    Treatment
  <character>
A        ChIP
B       Input
C        ChIP
D       Input
E        ChIP
F       Input
> se$Treatment
[1] "ChIP"  "Input" "ChIP"  "Input" "ChIP"  "Input"

For MultiAssayExperiment, I would expect myMultiAssayExperiment$sex to return the same as the following:

> example("MultiAssayExperiment")
> pData(myMultiAssayExperiment)$sex
[1] M F M F
Levels: F M
LiNk-NY commented 8 years ago

There's a way to add search results to the tab completion. More on that soon.

LiNk-NY commented 8 years ago

I added the S3method but it doesn't seem to work. I'm not sure why. Thoughts? I've tried it on the command line and in RStudio 0.99.1283. c53cc745b0c71a0eff28e80c68ed98f73ea79787 @mtmorgan @lwaldron

mtmorgan commented 8 years ago

Going old-school...

MultiAssayExperiment$ R CMD INSTALL .
...
** testing if installed package can be loaded
Warning: S3 method '.DollarNames.MultiAssayExperiment' was declared in NAMESPACE but not found

You've got a typo -- s/Experiement/Experiment/ at https://github.com/vjcitn/MultiAssayExperiment/commit/c53cc745b0c71a0eff28e80c68ed98f73ea79787#diff-6af16999f54fa8e66726c1123746cce9R34

LiNk-NY commented 8 years ago

Haha thanks! Completely missed it ! :sweat_smile: