sync_cnr: sync cnr cells to those in the phenotype annotation

View source: R/sync_cnr.R

sync_cnrR Documentation

sync cnr cells to those in the phenotype annotation

Description

sync cnr cells to those in the phenotype annotation

Usage

sync_cnr(
  cnr,
  cell.order = NULL,
  full.sync = TRUE,
  chromosome.order = c(1:22, "X", "Y", "MT")
)

Arguments

cnr

a cnr bundle

cell.order

a specific order of cells. 'cell.order' must contain all cells. For subsetting cells use keepCells or excludeCells. Default: NULL which will syncronize to the in the Y matrix.

full.sync

also order chromInfo and gene.index. default TRUE. Uses bin.chrom, bin.start for ordering bins, and chrom, start for ordering genes. To use other column names , use full.sync = FALSE, and order bins and genes separetly.

chromosome.order

chromosome order to use as levels for arranging chromInfo and gene.index

Value

Function returns a syncronized cnr.

Examples

data(cnr)
names(cnr$X)

cnrS <- sync_cnr(cnr)
names(cnrS$X)

ordered.cells <- cnr$Y[order(cnr$Y$random1), "cellID"]
cnrS <- sync_cnr(cnr, cell.order = ordered.cells)
names(cnrS$X)


SingerLab/gac documentation built on March 23, 2024, 5:15 a.m.