R/fill_missing_abundance.R
fill_missing_abundance-methods.Rd
fill_missing_abundance() takes as input A `tbl` (with at least three columns for sample, feature and transcript abundance) or `SummarizedExperiment` (more convenient if abstracted to tibble with library(tidySummarizedExperiment)) and returns a consistent object (to the input) with new observations
fill_missing_abundance(
.data,
.sample = NULL,
.transcript = NULL,
.abundance = NULL,
fill_with
)
A consistent object (to the input) non-sparse abundance
This function fills the abundance of missing sample-transcript pair using the median of the sample group defined by the formula
Mangiola, S., Molania, R., Dong, R., Doyle, M. A., & Papenfuss, A. T. (2021). tidybulk: an R tidy framework for modular transcriptomic data analysis. Genome Biology, 22(1), 42. doi:10.1186/s13059-020-02233-7
## Load airway dataset for examples
data('airway', package = 'airway')
# Ensure a 'condition' column exists for examples expecting it
SummarizedExperiment::colData(airway)$condition <- SummarizedExperiment::colData(airway)$dex
print("Not run for build time.")
#> [1] "Not run for build time."
# airway |> fill_missing_abundance( fill_with = 0)