VariantSubcloneTable#

missionbio.mosaic.workflows.variant_subclone_table.VariantSubcloneTable

class VariantSubcloneTable(sample: Sample)#

To provide as much similarity to Tapestri Insights as possible. A TI like variant selection table is provided. The following actions can be performed:

  1. The user can click on any variant in the variants table. This calls the group_by_genotype method for the provided sample and a subclone table is shown. The group_by_genotype summary plot is also shown.

  2. The max_ado_score, min_clone_size parameters can be modified to run the clustering using different parameter values.

  3. Variants can then be selected to show violin plots for AF, DP, and GQ distributions for each clone.

  4. The clones can be renamed using the edit button in the subclone table

Note

All clone creation actions modify the label row attribute in the Dna object of the provided sample

Snippets#

An interactive table can be generated using the following code:

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

The table that is created is interactive. The selected variants are stored under the selected_variants attribute

>>> wfv.selected_variants

Variables#

selected_variants

The variants selected by the user in the table

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