cnaScatterPlot: Visualise Malignant and Non-Malignant Subsets

View source: R/cnaScatterPlot.R

cnaScatterPlotR Documentation

Visualise Malignant and Non-Malignant Subsets

Description

Visualise Malignant and Non-Malignant Subsets of cells. This is achieved by plotting, for each cell, its CNA signal over its CNA correlation. Please see 'infercna::cnaSignal' and 'infercna::cnaCor' for details.

Usage

cnaScatterPlot(
  cna,
  cor.method = "pearson",
  gene.quantile = NULL,
  gene.quantile.for.corr = gene.quantile,
  gene.quantile.for.signal = gene.quantile,
  groups = NULL,
  groups.col = scalop::discrete_colours[1:length(groups)],
  border.col = "black",
  alpha = 0.3,
  cex = 0.8,
  pch = 20,
  hline = NULL,
  vline = NULL,
  refCells = NULL,
  samples = NULL,
  ...
)

Arguments

cna

a matrix of gene rows by cell columns containing CNA values.

cor.method

character string indicating the method to use for the pairwise correlations. E.g. 'pearson', 'spearman'. Default: 'pearson'

gene.quantile

calculate CNA measures including only top / "hotspot" genes according to their squared CNA values across all cells. Value between 0 and 1 denoting the quantile of genes to include. Default: NULL

gene.quantile.for.corr

as above but for CNA correlations specifically. Default: gene.quantile

gene.quantile.for.signal

as above but for CNA signal specifically. Default: gene.quantile

groups

character vector of cell IDs to colour. Default: NULL

groups.col

colour to colour groups by. Default: 'magenta'

border.col

colour for point border. Default: 'black'

alpha

colour transparency. Default: 0.3

hline

y-intercept line. Default: NULL

vline

x-intercept line. Default: NULL

refCells

a character vector of cell ids to exclude from average CNA profile that each cell is correlated to. You can pass reference normal cell ids to this argument if these are known. Default: NULL

samples

if CNA correlations should be calculated within cell subgroups, provide i) a list of cell id groups, ii) a character vector of sample names to groups cells by, iii) TRUE to extract sample names from cell ids and subsequently groups. Default: NULL

...

other arguments passed to base plot

Value

a base R plot. If return value is saved to a variable, instead returns data points for cna correlations and cna signal in list form.


jlaffy/infercna documentation built on Jan. 26, 2024, 11:24 p.m.