Cnv.compute_ploidy#

Cnv.compute_ploidy(diploid_cells, normalized_counts='normalized_counts')#

Computes the ploidy of the cells

This method adds a layer called ‘ploidy’

Parameters
diploid_cellslist-like

The barcodes which are known to be diploid. All barcodes are normalized to the median counts of these barcodes for each amplicon.

normalized_countsstr / np.array, default: constants.NORMALIZED_READS

Name of the layer which is to be used for ploidy calculations. A numpy array with the same shape as the assay can also be passed.

Raises
ValueError

When the reads have not yet been normalized. Cnv.normalize_reads() has to be executed before computing ploidy.