missionbio.mosaic.io.merge_files

missionbio.mosaic.io.merge_files(folderpath, name, update=False)

Convert the legacy files to .h5.

This is meant to be used with legacy versions of the pipeline to generate new .h5 files.

The files should have the following names:
  • DNA .h5 file : dna.h5

  • Protein .h5 file : protein.h5

  • DNA raw counts : {prefix-}cellfinder.distribution.tsv

  • Protein raw counts: {prefix-}counts.tsv

If the .h5 file has raw counts, the provided files are ignored.

Parameters
folderpathstr

path of the folder which contains the appropriately named files

namestr

the name that is to be given to the new h5 file

updatebool

Whether the h5 file should be updated from the legacy version to a currently supported version of the h5 format.

Raises
KeyError

If “dna.h5” is not availble in the folder.

Exception

If the h5 file format is not supported.