0.6.0 π
github-actions
released this
19 Dec 10:48
·
133 commits
to refs/heads/main
since this release
Changes
π Features
Breaking changes
Make older AnnData objects compatible using
def move_type_info_from_uns_to_var(adata, copy=False):
"""
Move type information from adata.uns to adata.var['ehrapy_column_type'].
The latter is the current, updated flavor used by ehrapy.
"""
if copy:
adata = adata.copy()
adata.var['ehrapy_column_type'] = 'unknown'
if 'numerical_columns' in adata.uns.keys():
for key in adata.uns['numerical_columns']:
adata.var.loc[key, 'ehrapy_column_type'] = 'numeric'
if 'non_numerical_columns' in adata.uns.keys():
for key in adata.uns['non_numerical_columns']:
adata.var.loc[key, 'ehrapy_column_type'] = 'non_numeric'
if 'encoded_non_numerical_columns' in adata.uns.keys():
for key in adata.uns['encoded_non_numerical_columns']:
adata.var.loc[key, 'ehrapy_column_type'] = 'non_numeric_encoded'
if copy:
return adata
New features
- Medcat refresh (#623) @eroell
- Rank features groups obs (#622) @eroell
- Add FHIR tutorial and simplify code (#626) @Zethson
- Add input checks for imputers (#625) @Zethson
- Removed unused dependencies (#615) @Zethson
- Refactor encoding (#588) @Zethson