https://github.com/ctlab/phantasus
Tip revision: 196f3db2382e89502f3d95664a7f0bee36af7287 authored by Alexey Sergushichev on 20 July 2020, 21:37:31 UTC
version bump
version bump
Tip revision: 196f3db
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()
if (!is.null(nrow(fDataQuery))) {
for(i in seq_len(nrow(fDataQuery))) {
row <- fDataQuery[i,]
response[['fdata']][[row$name]] <- fData(es)[[row$name]][row$indices[[1]]]
}
}
jsonlite::toJSON(response)
}