Mark if CN states are gains or losses relative to cell ploidy
Source:R/ploidy.R
mark_cn_relative_to_ploidy.RdCNs > 2 are not necessarily amplifications, and CNs < 2 are not necessarily the only states of losses. Ploidy of samples may not be diploid. This function will give you an idea if the CN you see is a gain or loss relative to the ploidy of a sample. For example, if the sample has a ploidy of 4, then a CN of 3 is a loss.
Usage
mark_cn_relative_to_ploidy(
in_df,
df_type = c("reads", "segs"),
sample_col = "cell_id",
...
)Details
Ploidy is inferred by mode CN state using mode_ploidy() and
states > ploidy are marked as gains, states < ploidy losses, and states
matching ploidy as matched.