https://github.com/ctlab/phantasus
Tip revision: bcd9d807055b490961edbebb49afb0f967249245 authored by Alexey Sergushichev on 13 May 2020, 11:00:43 UTC
Merge branch 'master' of git.bioconductor.org:packages/phantasus
Merge branch 'master' of git.bioconductor.org:packages/phantasus
Tip revision: bcd9d80
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)
}