spared.filtering.get_slide_from_collection

spared.filtering.get_slide_from_collection(collection: AnnData, slide: str) AnnData[source]

Retrieve a slide from a collection of slides.

This function receives a slide name and returns an AnnData object of the specified slide based on the collection of slides in the collection parameter.

Parameters:
  • collection (ad.AnnData) – AnnData object with all the slides concatenated.

  • slide (str) – Name of the slide to get from the collection. Must be in the slide_id column of the collection.obs dataframe.

Returns:

An AnnData object with the specified slide. The object is a copy and not a view from the original collection.

Return type:

ad.AnnData