|
| 1 | +--- |
| 2 | +title: "MultiAssayExperiment Cheatsheet" |
| 3 | +author: "MultiAssay Special Interest Group" |
| 4 | +date: "`r format(Sys.time(), '%B %d, %Y')`" |
| 5 | +vignette: > |
| 6 | + %\VignetteEngine{knitr::rmarkdown} |
| 7 | + %\VignetteIndexEntry{MultiAssayExperiment Cheatsheet} |
| 8 | + %\VignetteEncoding{UTF-8} |
| 9 | +output: |
| 10 | + BiocStyle::html_document: |
| 11 | + number_sections: false |
| 12 | + toc: false |
| 13 | +--- |
| 14 | + |
| 15 | +# Summary of the MultiAssayExperiment API |
| 16 | + |
| 17 | +Updated from Ramos et al., *Cancer Research* 2017; DOI: |
| 18 | +[10.1158/0008-5472.CAN-17-0344](https://doi.org/10.1158/0008-5472.CAN-17-0344) |
| 19 | + |
| 20 | +## API Overview |
| 21 | + |
| 22 | +### Constructors |
| 23 | + |
| 24 | +| Function | Description | Returned Class | |
| 25 | +|:-----------------------|:----------------------------------------------|:-----------------------| |
| 26 | +| `MultiAssayExperiment` | Create a MultiAssayExperiment object | MultiAssayExperiment | |
| 27 | +| `ExperimentList` | Create an ExperimentList from a List or list | ExperimentList | |
| 28 | + |
| 29 | +### Accessors |
| 30 | + |
| 31 | +| Function | Description | Returned Class | |
| 32 | +|:-----------------|:----------------------------------------------------------|:-----------------| |
| 33 | +| `colData` | Get or set data that describe patients / biological units | DataFrame | |
| 34 | +| `experiments` | Get or set the list of experimental data objects | ExperimentList | |
| 35 | +| `assays` | Get the list of experimental numeric matrices | SimpleList | |
| 36 | +| `assay` | Get the first experimental numeric matrix | matrix, matrix-like | |
| 37 | +| `sampleMap` | Get or set the map relating observations to subjects | DataFrame | |
| 38 | +| `metadata` | Get or set additional data descriptions | list | |
| 39 | +| `rownames` | Get row names for all experiments | CharacterList | |
| 40 | +| `colnames` | Get column names for all experiments | CharacterList | |
| 41 | +| `getWithColData` | Extract a single assay with whole or assay colData | (varies) | |
| 42 | + |
| 43 | +### Subsetting |
| 44 | + |
| 45 | +| Syntax | Description | Returned Class | |
| 46 | +|:-----------------|:-------------------------------------------|:-----------------------| |
| 47 | +| `mae[i, j, k]` | Get rows, columns, and/or experiments | MultiAssayExperiment | |
| 48 | +| `mae[i,,]` | -- `i:` GRanges, character, integer, etc. | MultiAssayExperiment | |
| 49 | +| `mae[,j,]` | -- `j:` character, integer, logical, etc. | MultiAssayExperiment | |
| 50 | +| `mae[,,k]` | -- `k:` character, integer, logical | MultiAssayExperiment | |
| 51 | +| `mae[[n]]` | Get/set object from experiments | (varies) | |
| 52 | +| `mae$column` | Get/set `colData` column vector | (varies) | |
| 53 | +| `getWithColData(mae, k)` | Extract a single assay with colData; k: char, int | (varies) | |
| 54 | +| `subsetByColData(mae, ..)` | Select rows from colData and re-harmonize data | MultiAssayExperiment | |
| 55 | + |
| 56 | +### Management |
| 57 | + |
| 58 | +| Function | Description | Returned Class | |
| 59 | +|:---------------------|:-------------------------------------------------------------|:-----------------------| |
| 60 | +| `prepMultiAssay` | Troubleshoot constructor problems constructing class | list | |
| 61 | +| `complete.cases` | Identify subjects with complete data | logical vector | |
| 62 | +| `replicated` | Identify replicate observations per experiment | list of LogicalLists | |
| 63 | +| `anyReplicated` | Whether any replicate observations exist | logical vector | |
| 64 | +| `showReplicated` | Show actual technical replicate obs. in assay | list of CharacterLists | |
| 65 | +| `mergeReplicates` | Merge replicate observations within each experiment | MultiAssayExperiment | |
| 66 | +| `intersectRows` | Features present in all experiments | MultiAssayExperiment | |
| 67 | +| `intersectColumns` | Subjects with data in all experiments | MultiAssayExperiment | |
| 68 | +| `renameColname` | Rename the assay column names for a single assay | MultiAssayExperiment | |
| 69 | +| `renamePrimary` | Rename the colData rownames | MultiAssayExperiment | |
| 70 | +| `splitAssay` | Separate columns from assays using a 'hitList' of logical vectors | MultiAssayExperiment | |
| 71 | +| `makeHitList` | Create a 'hitList' list based on patterns for matching assay colnames | list | |
| 72 | + |
| 73 | +### Reshaping |
| 74 | + |
| 75 | +| Function | Description | Returned Class | |
| 76 | +|:-----------------|:-----------------------------------------------------|:-----------------| |
| 77 | +| `longFormat` | Long tidy DataFrame with optional `colData` columns | DataFrame | |
| 78 | +| `wideFormat` | Wide format, one row per subject | DataFrame | |
| 79 | + |
| 80 | +### Combining |
| 81 | + |
| 82 | +| Function | Description | Returned Class | |
| 83 | +|:---------|:-------------------------------------------------|:-----------------------| |
| 84 | +| `c` | Concatenate experiment to MAE | MultiAssayExperiment | |
| 85 | + |
| 86 | +### Coercion |
| 87 | + |
| 88 | +| Function | Description | Returned Class | |
| 89 | +|:---------|:-------------------------------------------------|:-----------------------| |
| 90 | +| `MultiAssayExperimentToMAF` | Convert MAE to `MAF` using 'non_syn' and 'syn' assays | maftools::MAF | |
| 91 | + |
| 92 | +### Export |
| 93 | + |
| 94 | +| Function | Description | Returned Class | |
| 95 | +|:---------|:-------------------------------------------------|:-----------------------| |
| 96 | +| `exportClass` | Save all data from a MAE to a series of text files ('.csv') | (files) | |
| 97 | +| `saveHDF5MultiAssayExperiment` | Save a MAE in '.h5' and '.rds' formats similar to `HDF5Array::saveHDF5SummarizedExperiment` | (files) | |
| 98 | + |
| 99 | +--- |
| 100 | + |
| 101 | +## Notes |
| 102 | + |
| 103 | +- **assay**: Procedure for measuring biological activity (e.g., RNA-seq). |
| 104 | +- **experiment**: Application of an assay to a sample set. |
| 105 | +- **mae**: A `MultiAssayExperiment` object. |
| 106 | +- **subject**: Patient, cell line, or other biological unit. |
| 107 | +- **observation**: Results of an assay (e.g., gene expression). |
| 108 | +- **features**: Measurement units labeled by row names or genomic ranges. |
| 109 | +- `duplicated()` was deprecated in Bioconductor 3.7 and replaced by `replicated()`. |
| 110 | + |
0 commit comments