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.
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.
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")