plotGeneCopy: plotGeneCopy

View source: R/plotGeneCopy.R

plotGeneCopyR Documentation

plotGeneCopy

Description

Visualization for gene-wise copy number states

Usage

plotGeneCopy(
  scCNA,
  genes,
  geom = c("swarm", "barplot", "violin"),
  label = NULL,
  facet = NULL,
  dodge.width = 0,
  assay = "segment_ratios"
)

Arguments

scCNA

scCNA object.

genes

A vector of strings containing the HUGO Symbol for the gene of interest.

geom

A string with the geom for plotting.

label

A string with the name of the column from colData to color the points

facet

A string with the name of the column from colData to separate the plot into facets.

dodge.width

A numeric that adds dodge between the label categories.

assay

String with the name of the assay for plotting.

Details

plotGeneCopy finds overlaps of the varbin scaffolds genomic ranges which can be accessed with rowRanges with the genes from the assemblies of either hg19 or hg38. The genomic ranges from hg19 comes from package TxDb.Hsapiens.UCSC.hg19.knownGene whereas for hg38 package TxDb.Hsapiens.UCSC.hg38.knownGene.

If the argument geom is set to 'barplot' plotGeneCopy calculates gene-wise frequencies of each copy number state for the selected genes across all of the cells. Geom 'barplot' can only be used with the argument assay set to 'integer'.

Value

A ggplot object with a plot of the gene-wise copy number states.

Author(s)

Darlan Conterno Minussi

Examples

copykit_obj <- copykit_example_filtered()
copykit_obj <- findClusters(copykit_obj)
plotGeneCopy(copykit_obj, genes = c("FHIT", "PTEN", "FOXO1", "BRCA1"))
plotGeneCopy(copykit_obj,
    genes = c("FHIT", "PTEN", "FOXO1", "BRCA1"),
    label = "subclones"
)
plotGeneCopy(copykit_obj,
    genes = c("FHIT", "PTEN", "FOXO1", "BRCA1"),
    label = "subclones", dodge.width = 0.8
)

navinlabcode/copykit documentation built on Oct. 16, 2024, 2:55 p.m.