scirpy.get.obs_context

Contents

scirpy.get.obs_context#

scirpy.get.obs_context(data, temp_cols)#

Contextmanager that temporarily adds columns to obs.

Example

with ir.get.obs_context(
    mdata,
    {
        "new_col_with_constant_value": "foo",
        "new_col_with_sequence": range(len(mdata)),
        "v_gene_primary_vj_chain": ir.get.airr(mdata, "v_call", "VJ_1"),
    },
) as m:
    ir.pl.group_abundance(m, groupby="v_gene_primary_vj_chain", target_col="new_col_with_constant_value")
Parameters: