pymaid.get_annotated¶
- pymaid.get_annotated(x, include_sub_annotations=False, raise_not_found=True, allow_partial=False, remote_instance=None)[source]¶
Retrieve entities (neurons + annotations) with given annotation(s).
This works similar to CATMAID’s neuron search widget: multiple annotations are intersected! Includes meta-annotations.
- Parameters:
x (str | list of str) – (Meta-)annotations(s) to search for. Like CATMAID’s search widget, you can use regex to search for names by starting the query with a leading
/
. Use a leading~
(tilde) to indicateNOT
condition.include_sub_annotations (bool, optional) – If True, will include entities that have annotations meta-annotated with
x
. Does not work on NOT search conditions.allow_partial (bool, optional) – If True, partially matching annotations are searched too.
raise_not_found (bool, optional) – If True raise Exception if no match for any of the query annotations is found. Else log warning.
remote_instance (CatmaidInstance, optional) – If not passed directly, will try using global.
- Returns:
DataFrame in which each row represents an entity:
id name skeleton_ids type 0 1 2 ...
- Return type:
pandas.DataFrame
See also
pymaid.find_neurons()
Use to retrieve neurons by combining various search criteria. For example names, reviewers, annotations, etc.