Revision 0d6a5c07279c25af21abfe534b8cbb4a651042e3 authored by Alexey Sergushichev on 20 October 2018, 13:07:06 UTC, committed by Alexey Sergushichev on 20 October 2018, 13:07:06 UTC
1 parent 85f9f43
Raw File
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)
}
back to top