Dna.scatterplot#

missionbio.mosaic.dna.Dna.scatterplot

Dna.scatterplot(attribute, colorby=None, features=None, title='')#

Extends scatterplot()

Set specific colorscales for DNA.

Scatter plot for all barcodes.

If colorby is None, then this plot can be used to create custom clusters using the plotly lasso tool. Not selecting any cell deselects all clusters, and double clicking refocuses all points.

Hint

These selected clusters can be accessed through selected_bars and they can be assigned to the assay using set_selected_labels().

Parameters:
attributestr / np.ndarray

The row attribute to use as coordinates, This row attribute must be 2D. Uses get_attribute() to retrieve the values constrained by row. The shape must be (#cells, 2).

colorbystr / np.ndarray

The values used to color the scatterplot. Uses get_attribute() to retrieve the values constrained by row. The shape must be (#cells, *) if 2D, otherwise the shape must be (#cells).

  1. None

    The scatterplot is not colored and highlighting using the lasso tool can be used to select subpopulations.

  2. Any 1D attribute

    In case ‘label’ is provided then the stored paltte is used. If the values are strings, then a discrete color map is assumed. For numerical values a continuous color scale is used.

  3. Any 2D attribute

    One dimension must match the number of cells in the assay.

  4. ‘density’

    Colors the plot based on the density of the nearby points.

featureslist-like

In the case that colorby is a layer then features sets the subset of features to color the plot by.

In the case that colorby is a 2D array features sets the title of each scatterplot. In this case, the length of features must match the number of columns in the colorby 2D array.

titlestr

The title given to the plot after the name of the assay.

Returns:
figplotly.graph_objs.FigureWidget
Raises:
ValueError

Raised when the attribute is not present in the assay or when length of features does not match the second dimension of colorby.