Find peaks in CNV table
cnv_find_peak.Rd
This function is used to identify regions of gain and loss from a CNV table. First, it computes an intensity metric for each location along the transcriptome. TO DO : find peak only in chromosome. No overlapping peaks possible between them
Usage
cnv_find_peak(
table_cnv,
what = "gain",
chr = NULL,
intensity_thresh = NULL,
intensity_quant = 0.8,
noise_thresh = 0.075,
contrib_fun = sum
)
Arguments
- table_cnv
DATAFRAME : dataframe (genes x cells) containing CNV. Genes must be in the transcriptome order (no default).
- what
CHARACTER : either "gain" or "loss" (default to "gain")
- chr
VECTOR : a vector containing the chromosome for each gene. It must be the same length as rownames(table_cnv). If not provided, segments won't be named (default to NULL)
- intensity_thresh
NUMERIC : a threshold in the intensity above which to detect peaks (see aquarius::cnv_plot_intensity to visualize intensity). The threshold can be identify as a quantile in the intensity (see aquarius::cnv_compute_intensity) to compute intensity and then, use quantile() to identify a good quantile to establish intensity_thresh (default to NULL, i.e. quantile
intensity_quant
)- intensity_quant
NUMERIC : quantile in intensity to identify intensity_thresh. Only used if intensity_thresh is NULL (default to 0.8)
- noise_thresh
NUMERIC : a threshold above (or below) which a cell is said to carry an anomaly at a specific region. It is used to compute intensity from table_cnv. Value close to 0 will increase the background. It must be in range(table_cnv). If what = "gain", noise_thresh > 0, and if what = "loss", noise_thresh < 0 (default to 0.075)
- contrib_fun
FUNCTION : function to compute cells contribution to CNV. It could be sum, mean... of cells having a value above noise_thresh (default to sum)