make_cicero_cds: Create cicero input CDS

Description Usage Arguments Details Value Examples

View source: R/runCicero.R

Description

Function to generate an aggregated input CDS for cicero. run_cicero takes as input an aggregated cicero CDS object. This function will generate the CDS given an input CDS (perhaps generated by make_atac_cds) and a value for k, which is the number of cells to be aggregated per bin. The default value for k is 50.

Usage

1
2
3
4
5
6
7
8
make_cicero_cds(
  cds,
  reduced_coordinates,
  k = 50,
  summary_stats = NULL,
  size_factor_normalize = TRUE,
  silent = FALSE
)

Arguments

cds

Input CDS object.

reduced_coordinates

A data frame with columns representing the coordinates of each cell in reduced dimension space (generally 2-3 dimensions). row.names(reduced_coordinates) should match the cell names in the CDS object. If dimension reduction was done using monocle, tSNE coordinates can be accessed by t(reducedDimA(cds)), and DDRTree coordinates can be accessed by t(reducedDimS(cds)).

k

Number of cells to aggregate per bin.

summary_stats

Which numeric pData(cds) columns you would like summarized (mean) by bin in the resulting CDS object.

size_factor_normalize

Logical, should accessibility values be normalized by size factor?

silent

Logical, should warning and info messages be printed?

Details

Aggregation of similar cells is done using a k-nearest-neighbors graph and a randomized "bagging" procedure. Details are available in the publication that accompanies this package. Run citation("cicero") for publication details. KNN is calculated using knn.index

Value

Aggregated CDS object.

Examples

1
2
3
4
5
6
7
8
9
  data("cicero_data")

  input_cds <- make_atac_cds(cicero_data, binarize = TRUE)
  input_cds <- reduceDimension(input_cds, max_components = 2, num_dim=6,
                               reduction_method = 'tSNE',
                               norm_method = "none")
  tsne_coords <- t(reducedDimA(input_cds))
  row.names(tsne_coords) <- row.names(pData(input_cds))
  cicero_cds <- make_cicero_cds(input_cds, reduced_coordinates = tsne_coords)

cicero documentation built on Dec. 10, 2020, 2 a.m.