SampleGroup.fishplot#
missionbio.mosaic.samplegroup.SampleGroup.fishplot
- SampleGroup.fishplot(assay: str = 'dna', labels: Optional[list] = None, parents: Optional[list] = None, sample_order: Optional[list] = None, relative_times: Optional[list] = None, draw_graph: bool = True, align: Optional[str] = 'center', offset_start: bool = True)#
Draws a fish plot and (optionally) graphical representation of the hierarchy of subclones.
- Parameters:
- assay:
The assay whose labels are selected. One of {“dna”, “cnv”, “protein”, “rna”}.
- labelslist
The list of labels (i.e. subclones) to include in the plot.
- parentslist
The name of the parent subclones, in the same order as labels. If no parent, then specify None.
- sample_orderlist
Names that indicates which samples to include in the plot and the order in which to plot the samples.
- relative_timeslist[int|float]
List of relative time points for the samples. Must be the same length as the number of samples. The timepoints will benormalized to between 0 and 1.
- draw_graphbool
If True, then below the fishplot will also be a graphical representation of the subclone hierarchy.
- align: str
How child clones are aligned within their parent clone. Can be either ‘center’, ‘top’, or ‘bottom’.
- offset_start: bool
If true, if there are 2+ clones that start at the same timepoint then they will be horizontally offset from each other.
- Returns:
- figplotly.graph_objs.figure
- Raises:
- ValueError
If the assay object has only one sample or label.
If one of the given samples or labels is not found in the assay.
If lengths of sample_order and relative_times are unequal.
If a label is its own parent.
< Class SampleGroup