getTidyData {karyotapR}R Documentation

Get tidy-style data from TapestriExperiment objects

Description

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
tidy.data <- getTidyData(tap.object, alt.exp = "alleleFrequency")

[Package karyotapR version 1.0.1 Index]