calculate_logRatio_CNA: Calculate the log2-ratio of tumor vs normal fraction of reads...

View source: R/copy_number.R

calculate_logRatio_CNAR Documentation

Calculate the log2-ratio of tumor vs normal fraction of reads in cytobands

Description

Given a SingleCellExperiment object with the slot "cytoBand" containing the fraction of reads in each cytoband, calculates the log2-ratio of tumor vs normal fraction of reads in cytobands, cell by cell. If the average signal in normal sample in a cytoband is 0, set this value to 1 so that the ratio won't affect the fraction of read value.

Usage

calculate_logRatio_CNA(scExp, controls)

Arguments

scExp

A SingleCellExperiment with "cytoBand" reducedDim slot filled.

  • see calculate_cyto_mat

controls

Sample IDs or Cell IDs of the normal sample to take as reference.

Value

The SCE with the log2-ratio of fraction of reads in each cytobands in each cells (of dimension cell x cytoband ) in the reducedDim slot "logRatio_cytoBand".

Examples


data("scExp")
scExp = calculate_cyto_mat(scExp, ref_genome="hg38")
scExp = calculate_logRatio_CNA(scExp, controls=unique(scExp$sample_id)[1])
SingleCellExperiment::reducedDim(scExp, "logRatio_cytoBand")


vallotlab/ChromSCape documentation built on Oct. 15, 2023, 1:47 p.m.