Sample#

missionbio.mosaic.sample.Sample

class Sample(name: Optional[str] = None, dna: Optional[Dna] = None, cnv: Optional[Cnv] = None, protein: Optional[Protein] = None, cnv_raw: Optional[Cnv] = None, protein_raw: Optional[Protein] = None, rna: Optional[Rna] = None, rna_raw: Optional[Rna] = None)#

Container for multiple assays.

Just like the _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)

Functions#

reset([assay])

Resets to the original state.

assays([names])

Assays present in the sample

raw_counts()

Raw reads present in the sample

split([row])

Split the sample by the given row attribute.

Multi-assay visualizations#

heatmap([clusterby, attributes, features, ...])

Multi-assay heatmap.

signaturemap([clusterby, attributes, ...])

Multi-assay flattened 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.