SampleGroup.merge_assay
SampleGroup.merge_assay#
- SampleGroup.merge_assay(assay_name: str = 'dna') Union[missionbio.mosaic.dna.Dna, missionbio.mosaic.cnv.Cnv, missionbio.mosaic.protein.Protein, missionbio.mosaic.rna.Rna] #
Merges an assay across multiple samples into 1 Assay.
Barcodes are renamed to include sample names to avoid clash of barcodes across samples.
A sample group contains a list of samples with assays.
>>> import missionbio.mosaic as ms >>> grp = ms.load_example_dataset("Multisample PBMC") >>> [s.dna.title for s in grp] # Group of assays ['Sample 1', 'Sample 2']
For various analyses data from the assays has to be concatenated. This can be done using the merge_assay command to obtain the _Assay object on which further analysis can be performed.
>>> dna = grp.merge_assay("dna") >>> dna.title # A single assay with all the cells 'Sample 1, Sample 2'
- Parameters
- assay_name:
Which assay to merge. One of {“dna”, “cnv”, “protein”, “rna”}
- Returns
- Assay:
New assay with combined data from all samples