Revision cf8e5559808b24cdcb78eaf0dd1ec95238c38381 authored by Vladislav Kamenev on 29 October 2018, 14:31:24 UTC, committed by Vladislav Kamenev on 29 October 2018, 14:31:24 UTC
1 parent 5b8431b
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