Represent a data.frame or matrix or assay-like object as a TourExperiment

TourExperiment(.data, ..., basisSets = SimpleList(),
  neighborSets = SimpleList())

# S4 method for TourExperiment
show(object)

# S4 method for SingleCellExperiment
TourExperiment(.data,
  basisSets = SimpleList(), neighborSets = SimpleList())

# S4 method for SummarizedExperiment
TourExperiment(.data,
  basisSets = SimpleList(), neighborSets = SimpleList())

# S4 method for matrix
TourExperiment(.data, ..., assayName = "view",
  basisSets = SimpleList(), neighborSets = SimpleList())

# S4 method for data.frame
TourExperiment(.data, ..., assayName = "view",
  assayType = "matrix", basisSets = SimpleList(),
  neighborSets = SimpleList())

Arguments

.data

object to convert to a TourExperiment object

...

if .data is a data.frame the columns to convert to a matrix, every other column not included in ... will become colData, the names of the columns selected with ... will be become row names in the resulting object.

basisSets

a SimpleList object containing tour bases. Default is an empty list.

neighborSets

a SimpleList conatining nearest neighbours Default is an empty list.

object

a TourExperiment object

assayName

the character name of the assay slot in the TourExperiment object. Defaults to 'view'.

assayType

the type of matrix if .data is a data.frame. Defaults to 'matrix'.

Details

A TourExperiment object inherits from the SingleCellExperiment::SingleCellExperiment() class. However, we feel that is more general/useful than just for biological data sets. Briefly, it represents a matrix of homegenous types (n rows 'features' by p columns 'samples'). Each 'feature' is aligned to SummarizedExperiment::rowData() slot which represents data about the rows and SummarizedExperiment::colData() which represents data about the samples. The TourExperiment object includes two additional slots. The first is a slot called basisSets is a SimpleList, which represents the anchor bases from computing a tour. The second is a slot called neighborSets which is a SimpleList that represents nearest neighbour indexes and distances.

See also

Examples

sphere <- generate_sphere(1000, 10, mean = 5, sd = 2) te_sphere <- TourExperiment(sphere) te_sphere
#> class: TourExperiment #> dim: 1000 10 #> metadata(0): #> assays(1): view #> rownames: NULL #> rowData names(0): #> colnames(10): 1 2 ... 9 10 #> colData names(0): #> reducedDimNames(0): #> spikeNames(0): #> altExpNames(0): #> neighborSetNames(0): #> basisSetNames(0):
# convert a data.frame to a TourExperiment object # this allows you to select columns that will form the assay data multi_te <- TourExperiment(multi, X1:X10) multi_te
#> class: TourExperiment #> dim: 10 1000 #> metadata(0): #> assays(1): view #> rownames(10): X1 X2 ... X9 X10 #> rowData names(0): #> colnames: NULL #> colData names(2): key index #> reducedDimNames(0): #> spikeNames(0): #> altExpNames(0): #> neighborSetNames(0): #> basisSetNames(0):