movVizSC: Visualize PACs of a gene in single cells

View source: R/movVizSc.R

movVizSCR Documentation

Visualize PACs of a gene in single cells

Description

movVizSC visualizes PACs of a gene in single cells.

Usage

movVizSC(
  scPACds,
  gene,
  cellGroupName,
  cellGroupColors = NULL,
  txdb = NULL,
  PAwidth = 50,
  showRatio = FALSE
)

Arguments

scPACds

a PACdataset storing single cell PACs. The PACds@anno should have columns chr/strand/coord. If there is no colData in PACds, then the sample label will be set as groupN.

gene

a gene to plot.

cellGroupName

group name of cell type in column names of scPACds@colData.

cellGroupColors

a named vector denoting colors for cell groups, e.g., c('SC="yellow",ES="red",RS="blue"). its names must be the same as the labels of cell groups.

txdb

txdb annotation, a character of file name for .gff3 or .rda, or a list. See parseGenomeAnnotation().

PAwidth

expand the width of a PAC by PAwidth for the plot.

showRatio

default is FALSE. If TRUE then show PAC ratio instead of PAC count.

Details

This function is useful for visualizing distributions of expression levels of PACs among single cells and cell types. (Note: the code of this function was adapted from the Millefy R package [Ozaki, H., Hayashi, T., Umeda, M., et al. Millefy: visualizing cell-to-cell heterogeneity in read coverage of single-cell RNA sequencing datasets. BMC Genomics 2020;21(1):177. ])

Value

a plot with the top panel showing expression levels of PACs in single cells, the middle panel showing expression levels or ratios of PACs among cell types, the bottome panel showing the gene model and PAC.

See Also

[movViz()] to visualize a PACdataset.

Examples

## Not run: 
data("scPACds")
load('txdbmm10.rda')
#gene <- unique(scPACds@anno$gene)[2]
gene='ENSMUSG00000019969'
movVizSC(scPACds, gene, cellGroupName="celltype", cellGroupColors=NULL, txdb=txdbmm10)
movVizSC(scPACds, gene, cellGroupName="celltype",
        cellGroupColors = c(SC="yellow",ES="red",RS="blue"), txdb=txdbmm10, showRatio = T)
movVizSC(scPACds, gene, cellGroupName="celltype", PAwidth=100, txdb=NULL, showRatio = T)

## End(Not run)

BMILAB/movAPA documentation built on Jan. 3, 2024, 11:09 p.m.