GSForge.operations.core module

class GSForge.operations.core.get_gem_data(**kwargs)

Bases: GSForge.models._Interface.CallableInterface

Gets the GEM matrix and an optional annotation column from either an AnnotatedGEM or GeneSetCollection.

For both cases the user may:

  • Have gene N/A values masked, dropped gene-wise, or zero-filled.

  • Have a transform (e.g. log) run on the resultant count array.

  • Return the count [and annotation] data be returned as a numpy.ndarray, pandas.DataFrame, or a xarray.DataArray [and xarray.DataSet].

agem = gsf.AnnotatedGEM('my_gem.nc')
count_xr, empty_labels = gsf.get_gem_data(agem, count_mask='complete')
count_xr, labels = gsf.get_gem_data(agem, count_mask='complete', annotation_variables=['class', 'treatment'])

For the GeneSetCollection case users may select genes by their membership in one or more GeneSets, and some set operation:

  • Union of the genes within the selected sets.

  • Intersection of the genes within the selected sets.

  • Unique to selected sets.

Parameters inherited from:

GSForge.models._Interface.Interface: gem, gene_set_collection, selected_gene_sets, selected_genes, gene_set_mode, sample_subset, count_variable, annotation_variables, count_mask, annotation_mask, count_transform

single_object = param.Boolean(readonly=False)

output_type = param.ObjectSelector(readonly=False)

single_object = False
output_type = 'xarray'
name = 'get_gem_data'