Skip to contents

getTidyData() pulls data from the indicated assay and/or altExp slot(s), and rearranges it into tidy format. colData (cell metadata) from the top-level/main experiment is included. rowData (probe metadata) from the indicated assay and/or altExp slot(s) is included. Attempts are made to sort by "chr" and "start.pos" columns if they are present to simplify plotting and other downstream operations.

Usage

getTidyData(
  TapestriExperiment,
  alt.exp = NULL,
  assay = NULL,
  feature.id.as.factor = TRUE
)

Arguments

TapestriExperiment

TapestriExperiment object.

alt.exp

Character, altExp slot to use. NULL (default) uses top-level/main experiment.

assay

Character, assay slot to use. NULL (default) uses first-indexed assay (often "counts").

feature.id.as.factor

Logical, if TRUE (default), the feature.id column is returned as a factor.

Value

A tibble of tidy data with corresponding metadata from colData and rowData.

Examples

tap.object <- newTapestriExperimentExample() # example TapestriExperiment object
#>  Moving gRNA probe  to `altExp` slot "grnaCounts".
#>  Moving barcode probe  to `altExp` slot "barcodeCounts".
#>  Moving chrY probe(s) probe_231, probe_232, probe_233, probe_234, probe_235, probe_236, probe_237, probe_238, probe_239, and probe_240 to `altExp` slot "chrYCounts".
tidy.data <- getTidyData(tap.object, alt.exp = "alleleFrequency")