Revision 8499e74a57ac9b2363de2440ce59e6da4e8b4ba6 authored by Vladislav Kamenev on 19 June 2019, 12:02:59 UTC, committed by Vladislav Kamenev on 20 June 2019, 12:27:23 UTC
1 parent 3b3018d
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()

    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)
}
back to top