Skip to content

0.6.0 🌈

Compare
Choose a tag to compare
@github-actions github-actions released this 19 Dec 10:48
· 133 commits to refs/heads/main since this release

Changes

πŸš€ Features

Breaking changes

  • Move information on numerical/non_numerical/encoded_non_numerical from .uns to .var (#630) @eroell

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

πŸ› Bug Fixes

🧰 Maintenance