to_zip#
missionbio.mosaic.io.to_zip
- to_zip(sample: Union[Sample, SampleGroup], path: Union[str, Path]) None #
Export the sample to a zip file.
Within the zip file, there is a folder for each assay.
Dna = dna_variants
Cnv = dna_read_counts
Protein = protein_read_counts
The folder has a similar structure as the assay itself. Within each folder there is:
layers folder
row attributes folder
col attributes folder
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
merge()
before exporting- pathstr, pathlib.Path
The path to the zip file
< Module io