https://github.com/ctlab/phantasus
Revision e13e02cb8e6c65da545fb67c41b9eb3e5f9bdcd0 authored by Vladislav Kamenev on 19 February 2019, 20:27:22 UTC, committed by Vladislav Kamenev on 19 February 2019, 20:27:22 UTC
1 parent ac9ce3b
Tip revision: e13e02cb8e6c65da545fb67c41b9eb3e5f9bdcd0 authored by Vladislav Kamenev on 19 February 2019, 20:27:22 UTC
Typo fix
Typo fix
Tip revision: e13e02c
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)
}
Computing file changes ...