swh:1:snp:0c004a03453a29b80f921a24433f7e780b9ceb53
Tip revision: f40fb807d7e216252ccf42eedf4d41df96db8162 authored by Vladislav Kamenev on 08 October 2018, 14:29:10 UTC
Update JS. Export dataset to R
Update JS. Export dataset to R
Tip revision: f40fb80
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 1:nrow(fDataQuery)) {
row <- fDataQuery[i,]
response[['fdata']][[row$name]] <- fData(es)[[row$name]][row$indices[[1]]]
}
jsonlite::toJSON(response)
}