Listing with ONEΒΆ
ONE contains a number of list methods that can be used to explore the datasets available.
To list all available datasets we can use
[1]:
from one.api import ONE
one = ONE(base_url='https://openalyx.internationalbrainlab.org', silent=True)
# All datasets in the database
dsets = one.list_datasets()
If you are connected to a database (e.g not using ONE with a local cache directory) you can find out information about a specific dataset by typing,
[2]:
one.describe_dataset(dsets[3])
contrast of left-side stimulus (0...1) nan if trial is on other side
Out[2]:
{'id': '979f9f7c-7d67-48d5-9042-a9000a8e66a2',
'name': 'trials.contrastLeft',
'created_by': None,
'description': 'contrast of left-side stimulus (0...1) nan if trial is on other side',
'filename_pattern': '*trials.contrastLeft.*'}
To find the datasets associated with a specific experiment we can pass in an eid argument
[3]:
eid = 'KS023/2019-12-10/001'
# All datasets for specific session
dsets = one.list_datasets(eid)
print(dsets)
['alf/_ibl_bodyCamera.times.npy' 'alf/_ibl_leftCamera.times.npy'
'alf/_ibl_rightCamera.times.npy' 'alf/_ibl_trials.choice.npy'
'alf/_ibl_trials.contrastLeft.npy' 'alf/_ibl_trials.contrastRight.npy'
'alf/_ibl_trials.feedbackType.npy' 'alf/_ibl_trials.feedback_times.npy'
'alf/_ibl_trials.firstMovement_times.npy'
'alf/_ibl_trials.goCueTrigger_times.npy'
'alf/_ibl_trials.goCue_times.npy' 'alf/_ibl_trials.intervals.npy'
'alf/_ibl_trials.intervals_bpod.npy' 'alf/_ibl_trials.itiDuration.npy'
'alf/_ibl_trials.probabilityLeft.npy'
'alf/_ibl_trials.response_times.npy' 'alf/_ibl_trials.rewardVolume.npy'
'alf/_ibl_trials.stimOff_times.npy' 'alf/_ibl_trials.stimOn_times.npy'
'alf/_ibl_wheel.position.npy' 'alf/_ibl_wheel.times.npy'
'alf/_ibl_wheel.timestamps.npy' 'alf/_ibl_wheelMoves.intervals.npy'
'alf/_ibl_wheelMoves.peakAmplitude.npy'
'alf/probe01/_kilosort_whitening.matrix.npy'
'alf/probe01/_phy_spikes_subset.channels.npy'
'alf/probe01/_phy_spikes_subset.spikes.npy'
'alf/probe01/_phy_spikes_subset.waveforms.npy'
'alf/probe01/channels.brainLocationIds_ccf_2017.npy'
'alf/probe01/channels.localCoordinates.npy'
'alf/probe01/channels.mlapdv.npy' 'alf/probe01/channels.rawInd.npy'
'alf/probe01/clusters.amps.npy'
'alf/probe01/clusters.brainLocationAcronyms_ccf_2017.npy'
'alf/probe01/clusters.brainLocationIds_ccf_2017.npy'
'alf/probe01/clusters.channels.npy' 'alf/probe01/clusters.depths.npy'
'alf/probe01/clusters.metrics.pqt' 'alf/probe01/clusters.mlapdv.npy'
'alf/probe01/clusters.peakToTrough.npy' 'alf/probe01/clusters.uuids.csv'
'alf/probe01/clusters.waveforms.npy'
'alf/probe01/clusters.waveformsChannels.npy'
'alf/probe01/spikes.amps.npy' 'alf/probe01/spikes.clusters.npy'
'alf/probe01/spikes.depths.npy' 'alf/probe01/spikes.samples.npy'
'alf/probe01/spikes.templates.npy' 'alf/probe01/spikes.times.npy'
'alf/probe01/templates.amps.npy' 'alf/probe01/templates.waveforms.npy'
'alf/probe01/templates.waveformsChannels.npy'
'alf/probes.description.json' 'alf/probes.trajectory.json'
'raw_behavior_data/_iblrig_ambientSensorData.raw.jsonable'
'raw_behavior_data/_iblrig_codeFiles.raw.zip'
'raw_behavior_data/_iblrig_encoderEvents.raw.ssv'
'raw_behavior_data/_iblrig_encoderPositions.raw.ssv'
'raw_behavior_data/_iblrig_encoderTrialInfo.raw.ssv'
'raw_behavior_data/_iblrig_taskData.raw.jsonable'
'raw_behavior_data/_iblrig_taskSettings.raw.json'
'raw_ephys_data/_spikeglx_ephysData_g0_t0.nidq.cbin'
'raw_ephys_data/_spikeglx_ephysData_g0_t0.nidq.ch'
'raw_ephys_data/_spikeglx_ephysData_g0_t0.nidq.meta'
'raw_ephys_data/_spikeglx_ephysData_g0_t0.nidq.wiring.json'
'raw_ephys_data/_spikeglx_sync.channels.npy'
'raw_ephys_data/_spikeglx_sync.polarities.npy'
'raw_ephys_data/_spikeglx_sync.times.npy'
'raw_ephys_data/probe01/_iblqc_ephysSpectralDensityAP.freqs.npy'
'raw_ephys_data/probe01/_iblqc_ephysSpectralDensityAP.power.npy'
'raw_ephys_data/probe01/_iblqc_ephysSpectralDensityLF.freqs.npy'
'raw_ephys_data/probe01/_iblqc_ephysSpectralDensityLF.power.npy'
'raw_ephys_data/probe01/_iblqc_ephysTimeRmsAP.rms.npy'
'raw_ephys_data/probe01/_iblqc_ephysTimeRmsAP.timestamps.npy'
'raw_ephys_data/probe01/_iblqc_ephysTimeRmsLF.rms.npy'
'raw_ephys_data/probe01/_iblqc_ephysTimeRmsLF.timestamps.npy'
'raw_ephys_data/probe01/_spikeglx_ephysData_g0_t0.imec1.ap.cbin'
'raw_ephys_data/probe01/_spikeglx_ephysData_g0_t0.imec1.ap.ch'
'raw_ephys_data/probe01/_spikeglx_ephysData_g0_t0.imec1.ap.meta'
'raw_ephys_data/probe01/_spikeglx_ephysData_g0_t0.imec1.lf.cbin'
'raw_ephys_data/probe01/_spikeglx_ephysData_g0_t0.imec1.lf.ch'
'raw_ephys_data/probe01/_spikeglx_ephysData_g0_t0.imec1.lf.meta'
'raw_ephys_data/probe01/_spikeglx_ephysData_g0_t0.imec1.sync.npy'
'raw_ephys_data/probe01/_spikeglx_ephysData_g0_t0.imec1.timestamps.npy'
'raw_ephys_data/probe01/_spikeglx_ephysData_g0_t0.imec1.wiring.json'
'raw_ephys_data/probe01/_spikeglx_sync.channels.probe01.npy'
'raw_ephys_data/probe01/_spikeglx_sync.polarities.probe01.npy'
'raw_ephys_data/probe01/_spikeglx_sync.times.probe01.npy'
'raw_video_data/_iblrig_bodyCamera.raw.mp4'
'raw_video_data/_iblrig_bodyCamera.timestamps.ssv'
'raw_video_data/_iblrig_leftCamera.raw.mp4'
'raw_video_data/_iblrig_leftCamera.timestamps.ssv'
'raw_video_data/_iblrig_rightCamera.raw.mp4'
'raw_video_data/_iblrig_rightCamera.timestamps.ssv'
'spike_sorters/ks2_matlab/probe01/_kilosort_raw.output.tar']
We can also list the available collections by using,
[4]:
# All collections in database
collections = one.list_collections()
# All collections for specific session
collections = one.list_collections(eid)
print(collections)
['alf' 'alf/probe01' 'raw_behavior_data' 'raw_ephys_data'
'raw_ephys_data/probe01' 'raw_video_data'
'spike_sorters/ks2_matlab/probe01']
To find datasets in a given collection, we can use
[5]:
# All datasets for specific session in alf/probe01 collection
datasets = one.list_datasets(eid, collection='alf/probe01')
Revisions can be listed in a similar way,
[6]:
# All revisions in database
revisions = one.list_revisions()
# All revisions for specific session
revisions = one.list_revisions(eid)
The final useful list method allows you to search for subjects in the database,
[7]:
# All subjects in the database
subjects = one.list_subjects()