Genentech / FacileDataSet

A fluent API for accessing multi-assay high-throughput genomics data.
MIT License
4 stars 0 forks source link

as.SummarizedExperiment() fails with example FacileDataSet #5

Open Tazovsky opened 6 years ago

Tazovsky commented 6 years ago

as.SummarizedExperiment fails with example FacileDataSet:

MWE: data: cast_covariate_bug.rdata.zip

library(FacileDataSet) # or library(FacileData)
library(magrittr)

getTestFDS <- function(
  path = system.file("extdata", "exampleFacileDataSet", package = "FacileData"),
  cache_size = 2e+05,
  db.loc = c("reference", "temporary", "memory")) {
  db.loc <- match.arg(db.loc)
  FacileDataSet(path, cache_size = cache_size, db.loc = db.loc)
}

test.fds <- getTestFDS()
load("cast_covariate_bug.RData")

genes.dat <- test.fds %>%
  fetch_assay_data(feature_ids,
                   samples = active_samples,
                   normalized = TRUE)

se <- FacileDataSet::as.SummarizedExperiment(genes.dat)

Throws error:

> se <- FacileDataSet::as.SummarizedExperiment(genes.dat)
Aggregation function missing: defaulting to length
Error: is.character(values) is not TRUE
lianos commented 6 years ago

This does not throw an error for me using the latest code in the develop branch.

I'm guessing you're not use the latest develop code, or? I'm guessing not because you are still referencing the functions using the FaclieDataSet package and namespace (as opposed to just FacileData... or?

Tazovsky commented 6 years ago

It seems like random bug, because everything works fine for Natalia and Vincent too ;) I'll keep eye on that.