SampleGroup#

missionbio.mosaic.samplegroup.SampleGroup

class SampleGroup(samples: Iterable[Sample])#

A group of samples related to each other

The following constraints are imposed on the samples
  1. All samples must have the same assays.

  2. All the assay ids must be common.

>>> import missionbio.mosaic as ms
>>> group = ms.load_example_dataset('Multisample PBMC')

The group contains the samples attribute to access individual samples

>>> group.samples

Checkout the multi sample analysis vignette for more details.

Functions#

hasassay(name)

Checks if the assay is present in the samples

getassays(name)

Get a list of the given assay across samples

merge_assay([assay_name])

Merges an assay across multiple samples into 1 Assay.

merge()

Merge all the samples into on Sample object.

apply(func[, args_list, kwargs_list])

Apply provided function to all items

Multi-sample visualizations#

barplot([assay, sample_order, label_order, ...])

Draws a bar plot of label counts for each sample

fishplot([assay, labels, parents, ...])

Draws a fish plot and (optionally) graphical representation of the hierarchy of subclones.

Errors#

IncompatibleSamplesError