Sample

class missionbio.mosaic.sample.Sample(name=None, dna=None, cnv=None, protein=None, cnv_raw=None, protein_raw=None)

Container for multiple assays.

Just like the missionbio.mosaic.assay._Assay object, Sample can also be filtered using Python’s slice notation.

It accepts only one key - a list of barcodes, a list of the position of the barcodes, or a Boolean list.

Load the sample.

>>> import missionbio.mosaic.io as mio
>>> sample = mio.load('/path/to/h5')

Selecting the first 100 cells (these aren’t necessarily cells with the highest reads, they’re arbitrary cells).

>>> select_bars = sample.dna.barcodes()[:100]

Slice all assays in the sample.

>>> filtered_sample = sample[select_bars]

Once the analysis is complete, it can be saved and shared using:

>>> mio.save(sample)

Methods

reset([assay])

Resets to the original state.

Multi-assay visualizations

heatmap(clusterby, sortby[, drop, flatten])

Multi-assay heatmap.

clone_vs_analyte([analyte, plot_width])

Set of summary plots to give a run overview.

umaps()

Plots umap arrays from assay objects.

Raw count visualizations

assay_scatter([ax, title, highlight])

Plots DNA reads vs Protein reads.

raw_heatmaps()

Protein and DNA read distribution.

read_data()

Plot read statistics of each barcode.