cellcluster: Cell clustering

View source: R/cellcluster.R

cellclusterR Documentation

Cell clustering

Description

Perform Cell Clustering

Usage

cellcluster(
  satac,
  type = "reads",
  peakOverlapMethod = "full",
  genome = "hg19",
  clunum = NULL,
  perplexity = 30,
  filtervar = TRUE,
  datapath = NULL
)

Arguments

satac

If type='reads', satac should be a list of GRanges object of scATAC-seq reads. Each element corresponds to one single cell. The GRanges should be the middle point of the reads with length of 1 base pair. Use 'satacprocess' to preprocess raw reads. If type='peaks', satac should be a list of data frames of scATAC-seq peaks. For each data frame, first column is chromsome name, second column is start site, third column is end site, and fourth column is the number of reads of the peak.

type

Character variable of either 'reads' or 'peaks'.

peakOverlapMethod

Character variable of either 'full' or 'middle'. Only effective when type = 'peaks'. If peakOverlapMethod='full', then the full range of the peak will be used to find overlap with bins, and all bins overlapping with this peak will be assigned the read counts of this peak. If peakOverlapMethod='middle', only the middle base pair of the peak will be used to find overlap with bins.

genome

Character variable of either "hg19" or "mm10".

clunum

Numeric variable giving the number of clusters. If NULL the cluster number will be determined automatically

perplexity

Numeric variable specifying perplexity for tSNE. Reduce perplexity when sample size is small.

filtervar

If TRUE, filter out features with low variability.

datapath

Character variable of the path to the customized database (eg myfolder/database.rds). The database can be made using 'makedatabase' function. If not null, 'genome' is ignored.

Details

This function generates averaged signals for CRE clusters and cluster cells.

Value

A list of three components: tsne results, clustering results and aggregated signal for CRE cluster.

Author(s)

Zhicheng Ji, Weiqiang Zhou, Wenpin Hou, Hongkai Ji* <whou10@jhu.edu>

Examples

celldata <- lapply(seq_len(50),function(i) {
  pos <- sample(seq_len(1e9),50000)
  GRanges(seqnames=sample(paste0("chr",seq_len(20)),50000,replace=TRUE),IRanges(start=pos,end=pos))
})
names(celldata) <- paste0('cell',seq_len(50))
cellcluster(celldata,type='reads',genome="hg19",filtervar=FALSE,perplexity=1,clunum=3) # reads as input

Winnie09/SCATE documentation built on May 10, 2023, 8:10 a.m.