CopyNumber#

missionbio.mosaic.workflows.copy_number.CopyNumber

class CopyNumber(sample: Sample, layout_kwargs: Optional[Dict] = None)#

Copy Number estimation workflow.

It filters the cells, normalizes the data, and helps visualize the computed ploidy with various plots. The following actions can be performed:

  1. Cells can be filtered based on their mean read depth

  2. Amplicons can be filtered based on their completeness

  3. Ploidy can be computed using any clone as a reference

  4. Line-plots and heatmaps can be created, sorted by chromosomal positions, genes, or a subset of either of those.

The Cnv assay is filtered based on the given parameters.

Warning

The workflow has to be restarted in case the Dna assay was modified elsewhere.

Snippets#

An interactive table can be generated using the following code:

>>> import missionbio.mosaic as ms
>>> sample = ms.load_example_dataset("3 cell mix")
>>> wfc = ms.workflows.CopyNumber(sample)
>>> wfc.run()

Note

CNV is estimated for the DNA clones only. Denovo CNV is not supported yet. Run VariantSubcloneTable, COMPASS, or a clustering method to find DNA clones.

Functions#

run([mode])

Starts the workflow

stop([port])

Stop the workflow and close the port

set_port([val])

Change the port on which this workflow is executed.

Parameters:
sampleSample

The Sample object used in the workflow. All clone creation actions modify the labels in the Dna object of the provided sample

layout_kwargsDict

Passed to fig.update_layout for the figure that is generated to visualize the copy number