Test that the matrices returned from fetch_assay_data() and biocbox() return samples in the same order as the query facile_frame, ie.
set.seed(0xBEEF)
afds <- FacileData::an_fds()
asamples <- FacileData::samples(afds) |>
FacileData::with_sample_covariates() |>
dplyr::filter(cell_abbrev %in% c("IMM", "PT")) |>
dplyr::sample_n(10)
genes <- dplyr::tibble(
name = c(
"AOX1", "DPEP1", "CDH6", "NAT8", # PT
"S100A8", "JCHAIN", "CCL4", "FCER1G"), # IMM
class = rep(c("PT", "IMM"), each = 4)) |>
dplyr::inner_join(FacileData::features(afds), by = "name")
A <- fetch_assay_matrix(asamples, genes, as.matrix = TRUE)
y <- biocbox(asamples, "DGEList", features = genes)