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

Description Usage Arguments Details See Also Examples

Description

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

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
TourExperiment(.data, ..., basisSets = SimpleList(),
  neighborSets = SimpleList())

## S4 method for signature 'TourExperiment'
show(object)

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

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

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

## S4 method for signature '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

generate_bases(), basisSets(), estimate_neighbors(), neighborSets()

Examples

1
2
3
4
5
6
7
8
sphere <- generate_sphere(1000, 10, mean =  5, sd = 2)
te_sphere <- TourExperiment(sphere)
te_sphere

# 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

sa-lee/sneezy documentation built on Nov. 25, 2019, 12:38 p.m.