assay_sample_info: Retrieve assay-specific metadata for a set of samples

View source: R/api.R

assay_sample_infoR Documentation

Retrieve assay-specific metadata for a set of samples

Description

This will retrieve assay-specific metadata for samples. For RNAseq assay, for instance, this would retrieve things like the library size and normalization factor for the given sample.

Usage

assay_sample_info(x, assay_name, drop_samples = TRUE, ...)

Arguments

x

FacileDataStore

assay_name

the name of the assay

samples

a sample descriptor

Details

Depending on the type of FacileDataStore is used, we can also return things like the hdf5_index for a FacileDataSet.

FacileData::testFacileDataSet() |> 
  assay_sample_info("scrnaseq") |>
  head()
# A tibble: 6 × 6
  dataset sample_id    assay    hdf5_index libsize normfactor
  <chr>   <chr>        <chr>         <int>   <dbl>      <dbl>
1 AKI     CNT.32_10003 scrnaseq          1 2837314       1.15
2 AKI     DCT.32_10003 scrnaseq          2 2262345       1.14
3 AKI     DTL.33_10005 scrnaseq          3  684162       1.19
4 AKI     EC.30_10034  scrnaseq          4  414073       1.33
5 AKI     EC.32_10003  scrnaseq          5  457168       1.20
6 AKI     EC.32_10034  scrnaseq          6  549429       1.09

Value

an updated version of samples decorated with hd5_index, scaling factors, etc. Note that rows in samples that do not appear in assay_name will be returnd here with NA values for hd5_index and such.

Examples

efds <- FacileData::testFacileDataSet()
assay_sample_info(efds, "scrnaseq") |> head()

facileverse/FacileData documentation built on Feb. 24, 2024, 7:59 a.m.