Revision 66357a4654bfe45c5fe4a9565bdf67d7b5a6f05c authored by clevermx on 18 January 2022, 11:09:39 UTC, committed by Space on 18 January 2022, 11:09:39 UTC
Add meta-files generation for new counts processing.
Add support for 8+ versions of ARCHs4.

Co-authored-by: Alexey Sergushichev <alserg@itmo.ru>
Merge-request: PHANTASUS-MR-21
Merged-by: Maksim Kleverov <klevermx@gmail.com>
1 parent d230978
Raw File
probeDataset.R
probeDataset <- function (es, query) {
    exprsIndices <- query$exprs;
    fDataQuery <- query$fData;
    pDataQuery <- query$pData;
    response <- list()
    response[['dims']] <- dim(exprs(es))
    response[['fvarLabels']] <- colnames(fData(es))
    response[['varLabels']] <- colnames(pData(es))
    response[['probe']] <- exprs(es)[exprsIndices]
    response[['fdata']] <- list()
    response[['pdata']] <- 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]]]
        }
    }
    if (!is.null(nrow(pDataQuery))) {
        for(i in seq_len(nrow(pDataQuery))) {
            row <- pDataQuery[i,]
            response[['pdata']][[row$name]] <- pData(es)[[row$name]][row$indices[[1]]]
        }
    }
    jsonlite::toJSON(response)
}
back to top