List of useful one queriesΒΆ

from import ONE
one = ONE()
Connected to as mayo

Query session for several subjects

subjects = ['DY_003', 'DY_006']
ses ='sessions', 'list', django=f"subject__nickname__in,{subjects}")

Query sessions that have histology available

ses ='sessions', 'list', histology=True)
# the generic way
ses ='sessions', 'list',

Query sessions that do not have matlab in the project name

ses ='sessions', 'list', django='~project__name__icontains,matlab')

Query sessions that do not contain a given dataset type

ses ='sessions', 'list',

Query all sessions not labelled as CRITICAL

ses ='sessions', 'list', django='qc__lt,50')

Query probe insertions for a given task protocol

ins ='insertions', 'list', django='session__task_protocol__icontains,choiceworld')

Query trajectories with channels in given brain region

trajs ='trajectories', 'list', django='channels__brain_region__name__icontains,'
                                                     'Entorhinal area medial part dorsal zone '
                                                     'layer 2')

Query spikesorting tasks that have errored in angelaki lab

errored ='tasks', 'list', status='Errored', lab='angelakilab',

Query ephys sessions that have errored tasks

ses ='sessions', 'list', task_protocol='ephys',

Query insertions that have alignment resolved

ins ='insertions', 'list', django='json__extended_qc__alignment_resolved,True')

Get names of users who have aligned specified insertion

names ='trajectories', 'list', provenance='Ephys aligned histology track',