allensdk.internal.core.mouse_connectivity_cache_prerelease module

class allensdk.internal.core.mouse_connectivity_cache_prerelease.MouseConnectivityCachePrerelease(resolution=None, cache=True, manifest_file='mouse_connectivity_manifest_prerelease.json', ccf_version=None, version=None, cache_storage_directories=True, storage_directories_file_name=None)[source]

Bases: allensdk.core.mouse_connectivity_cache.MouseConnectivityCache

Extends MouseConnectivityCache to use prereleased data from lims.

Parameters:
resolution: int

Resolution of grid data to be downloaded when accessing projection volume, the annotation volume, and the annotation volume. Must be one of (10, 25, 50, 100). Default is 25.

ccf_version: string

Desired version of the Common Coordinate Framework. This affects the annotation volume (get_annotation_volume) and structure masks (get_structure_mask). Must be one of (MouseConnectivityApi.CCF_2015, MouseConnectivityApi.CCF_2016). Default: MouseConnectivityApi.CCF_2016

cache: boolean

Whether the class should save results of API queries to locations specified in the manifest file. Queries for files (as opposed to metadata) must have a file location. If caching is disabled, those locations must be specified in the function call (e.g. get_projection_density(file_name=’file.nrrd’)).

manifest_file: string

File name of the manifest to be read. Default is “mouse_connectivity_manifest.json”.

Attributes:
resolution: int

Resolution of grid data to be downloaded when accessing projection volume, the annotation volume, and the annotation volume. Must be one of (10, 25, 50, 100). Default is 25.

api: MouseConnectivityApiPrerelease instance

Used internally to make API queries.

EXPERIMENTS_PRERELEASE_KEY = 'EXPERIMENTS_PRERELEASE'
STORAGE_DIRECTORIES_PRERELEASE_KEY = 'STORAGE_DIRECTORIES_PRERELEASE'
add_manifest_paths(self, manifest_builder)[source]

Construct a manifest for this Cache class and save it in a file.

Parameters:
file_name: string

File location to save the manifest.

filter_experiments(self, experiments, cre=None, injection_structure_ids=None, age=None, gender=None, workflow_state=None, workflows=None, project_code=None)[source]

Take a list of experiments and filter them by cre status and injection structure.

Parameters:
cre: boolean or list

If True, return only cre-positive experiments. If False, return only cre-negative experiments. If None, return all experients. If list, return all experiments with cre line names in the supplied list. Default None.

injection_structure_ids: list

Only return experiments that were injected in the structures provided here. If None, return all experiments. Default None.

age : list

Only return experiments with specimens with ages provided here. If None, returna all experiments. Default None.

get_experiments(self, dataframe=False, file_name=None, cre=None, injection_structure_ids=None, age=None, gender=None, workflow_state=None, workflows=None, project_code=None)[source]

Read a list of experiments.

If caching is enabled, this will save the whole (unfiltered) list of experiments to a file.

Parameters:
dataframe: boolean

Return the list of experiments as a Pandas DataFrame. If False, return a list of dictionaries. Default False.

file_name: string

File name to save/read the structures table. If file_name is None, the file_name will be pulled out of the manifest. If caching is disabled, no file will be saved. Default is None.