missionbio.mosaic.io.to_zip#

missionbio.mosaic.io.to_zip(sample: Union[missionbio.mosaic.sample.Sample, missionbio.mosaic.samplegroup.SampleGroup], path: Union[str, pathlib.Path]) None#

Export the sample to a zip file.

Within the zip file, there is a folder for each assay.
  1. Dna = dna_variants

  2. Cnv = dna_read_counts

  3. Protein = protein_read_counts

The folder has a similar structure as the assay itself. Within each folder there is:

  1. layers folder

  2. row attributes folder

  3. col attributes folder

  4. metadata.json

All the rows, columns, and layers are saved as a csv. An extra label column is added to the row attributes and the layers.

Parameters
sampleUnion[Sample, SampleGroup]

The sample to be exported. SampleGroup objects are merged using SampleGroup.merge() before exporting

pathstr, pathlib.Path

The path to the zip file