https://github.com/ctlab/phantasus
Tip revision: cf8e5559808b24cdcb78eaf0dd1ec95238c38381 authored by Vladislav Kamenev on 29 October 2018, 14:31:24 UTC
Updated tutorial
Updated tutorial
Tip revision: cf8e555
probeDataset.R
probeDataset <- function (es, query) {
exprsIndices <- query$exprs;
fDataQuery <- query$fData;
response <- list()
response[['dims']] <- dim(exprs(es))
response[['fvarLabels']] <- colnames(fData(es))
response[['probe']] <- exprs(es)[exprsIndices]
response[['fdata']] <- list()
for(i in seq_len(nrow(fDataQuery))) {
row <- fDataQuery[i,]
response[['fdata']][[row$name]] <- fData(es)[[row$name]][row$indices[[1]]]
}
jsonlite::toJSON(response)
}