Migration Guide
Version 0.5.0 sees a major change to the Cell BLAST code base. We switched the
implementation of the Cell BLAST model from Tensorflow to Pytorch, and substituted
our primary data format with the current standard anndata.AnnData
.
API migration
High-level APIs including Cell_BLAST.directi.fit_DIRECTi()
, Cell_BLAST.directi.align_DIRECTi()
, Cell_BLAST.directi.DIRECTi
, Cell_BLAST.blast.BLAST
have been kept largely consistent.
The only small changes and cleanups are summarized in the following tables:
API changes of Cell_BLAST.directi.fit_DIRECTi()
:
Arguments |
Details of changes |
---|---|
optimizer |
No longer supported, ‘RMSpropOptimizer’ used by default |
API changes of Cell_BLAST.directi.align_DIRECTi()
:
Arguments |
Details of changes |
---|---|
optimizer |
No longer supported, ‘RMSpropOptimizer’ used by default |
For Cell_BLAST.blast.BLAST
, no API has changed.
Due to the backend switch, low-level APIs have been completely overhauled.
Data migration
Since the new version of Cell BLAST only support h5ad(anndata) format of data, we provide a function and a script to help to transform the original h5 format data to h5ad(anndata) format.
The function can be called as following:
1import Cell_BLAST as cb
2cb.data.h5_to_h5ad(inputfilename, outputfilename)
Or, you can run the h5_to_h5ad.py script we provided:
1python h5_to_h5ad.py -i <inputfilename> -o <outputfilename>