pymaid.get_annotation_details

pymaid.get_annotation_details(x, remote_instance=None)[source]

Retrieve annotations for a set of neuron.

Returns more details than get_annotations() but is slower. Contains timestamps and user IDs (same API as neuron navigator).

Parameters:
  • x

    Neurons to get annotation details for. Can be either:

    1. List of skeleton ID(s) (int or str)

    2. List of neuron name(s) (str, exact match)

    3. An annotation: e.g. ‘annotation:PN right’

    4. CatmaidNeuron or CatmaidNeuronList object

  • remote_instance (CatmaidInstance, optional) – If not passed directly, will try using global.

Returns:

DataFrame in which each row represents a single annotation:

  annotation  skeleton_id  time_annotated  user_id  annotation_id  user
0
1
...

Return type:

pandas.DataFrame

See also

get_annotations()

Gives you annotations for a list of neurons (faster).

Examples

>>> # Get annotations for a set of neurons
>>> an = pymaid.get_annotation_details([ 12, 57003 ])
>>> # Get those for a single neuron
>>> an[ an.skeleton_id == '57003' ]
>>> # Get annotations given by set of users
>>> an[ an.user.isin( ['schlegelp', 'lif'] )]
>>> # Get most recent annotations
>>> import datetime
>>> an[ an.time_annotated > datetime.date(2017, 6, 1) ]