allensdk.api.queries.mouse_connectivity_api module

class allensdk.api.queries.mouse_connectivity_api.MouseConnectivityApi(base_uri=None)[source]

Bases: allensdk.api.queries.reference_space_api.ReferenceSpaceApi, allensdk.api.queries.grid_data_api.GridDataApi

HTTP Client for the Allen Mouse Brain Connectivity Atlas.

See: Mouse Connectivity API

PRODUCT_IDS = [5, 31]
build_reference_aligned_image_channel_volumes_url(data_set_id)[source]

Construct url to download the red, green, and blue channels aligned to the 25um adult mouse brain reference space volume.

Parameters:
data_set_id : integerallensdk.api.queries

aka attachable_id

Notes

See: Reference-aligned Image Channel Volumes for additional documentation.

calculate_injection_centroid(injection_density, injection_fraction, resolution=25)[source]

Compute the centroid of an injection site.

Parameters:
injection_density: np.ndarray

The injection density volume of an experiment

injection_fraction: np.ndarray

The injection fraction volume of an experiment

download_data_mask(**kwargs)[source]
download_injection_density(**kwargs)[source]
download_injection_fraction(**kwargs)[source]
download_projection_density(**kwargs)[source]
download_reference_aligned_image_channel_volumes(data_set_id, save_file_path=None)[source]
Returns:
The well known file is downloaded

Select a seed experiment and a domain over which the similarity comparison is to be made.

Parameters:
row : integer

SectionDataSet.id to correlate against.

structures : list of integers or strings, optional

Integer Structure.id or String Structure.acronym.

hemisphere : string, optional

Use ‘right’ or ‘left’. Defaults to both hemispheres.

transgenic_lines : list of integers or strings, optional

Integer TransgenicLine.id or String TransgenicLine.name. Specify ID 0 to exclude all TransgenicLines.

injection_structures : list of integers or strings, optional

Integer Structure.id or String Structure.acronym.

primary_structure_only : boolean, optional
product_ids : list of integers, optional

Integer Product.id

start_row : integer, optional

For paging purposes. Defaults to 0.

num_rows : integer, optional

For paging purposes. Defaults to 2000.

Notes

See Correlation Search and service::mouse_connectivity_correlation.

User specifies a seed location within the 3D reference space. The service returns a rank list of experiments by distance of its injection site to the specified seed location.

Parameters:
seed_point : list of floats

The coordinates of a point in 3-D SectionDataSet space.

transgenic_lines : list of integers or strings, optional

Integer TransgenicLine.id or String TransgenicLine.name. Specify ID 0 to exclude all TransgenicLines.

injection_structures : list of integers or strings, optional

Integer Structure.id or String Structure.acronym.

primary_structure_only : boolean, optional
product_ids : list of integers, optional

Integer Product.id

start_row : integer, optional

For paging purposes. Defaults to 0.

num_rows : integer, optional

For paging purposes. Defaults to 2000.

Notes

See Injection Coordinate Search and service::mouse_connectivity_injection_coordinate.

Search over the whole projection signal statistics dataset to find experiments with specific projection profiles.

Parameters:
injection_structures : list of integers or strings

Integer Structure.id or String Structure.acronym.

target_domain : list of integers or strings, optional

Integer Structure.id or String Structure.acronym.

injection_hemisphere : string, optional

‘right’ or ‘left’, Defaults to both hemispheres.

target_hemisphere : string, optional

‘right’ or ‘left’, Defaults to both hemispheres.

transgenic_lines : list of integers or strings, optional

Integer TransgenicLine.id or String TransgenicLine.name. Specify ID 0 to exclude all TransgenicLines.

injection_domain : list of integers or strings, optional

Integer Structure.id or String Structure.acronym.

primary_structure_only : boolean, optional
product_ids : list of integers, optional

Integer Product.id

start_row : integer, optional

For paging purposes. Defaults to 0.

num_rows : integer, optional

For paging purposes. Defaults to 2000.

Notes

See Source Search, Target Search, and service::mouse_connectivity_injection_structure.

Displays all SectionDataSets with projection signal density >= 0.1 at the seed point. This service also returns the path along the most dense pixels from the seed point to the center of each injection site..

Parameters:
seed_point : list of floats

The coordinates of a point in 3-D SectionDataSet space.

transgenic_lines : list of integers or strings, optional

Integer TransgenicLine.id or String TransgenicLine.name. Specify ID 0 to exclude all TransgenicLines.

section_data_sets : list of integers, optional

Ids to filter the results.

injection_structures : list of integers or strings, optional

Integer Structure.id or String Structure.acronym.

primary_structure_only : boolean, optional
product_ids : list of integers, optional

Integer Product.id

start_row : integer, optional

For paging purposes. Defaults to 0.

num_rows : integer, optional

For paging purposes. Defaults to 2000.

Notes

See Spatial Search and service::mouse_connectivity_target_spatial.

get_experiment_detail(**kwargs)[source]

Retrieve the experiments data.

get_experiments(**kwargs)[source]

Fetch experiment metadata from the Mouse Brain Connectivity Atlas.

Parameters:
structure_ids : integer or list, optional

injection structure

Returns:
url : string

The constructed URL

get_experiments_api(**kwargs)[source]

Fetch experiment metadata from the Mouse Brain Connectivity Atlas via the ApiConnectivity table.

Returns:
url : string

The constructed URL

get_manual_injection_summary(**kwargs)[source]

Retrieve manual injection summary.

get_projection_image_info(**kwargs)[source]

Fetch meta-information of one projection image.

Parameters:
experiment_id : integer
section_number : integer

Notes

See: image examples under Experimental Overview and Metadata for additional documentation. Download the image using allensdk.api.queries.image_download_api.ImageDownloadApi.download_section_image()

get_reference_aligned_image_channel_volumes_url(data_set_id)[source]

Retrieve the download link for a specific data set. Notes —– See Reference-aligned Image Channel Volumes for additional documentation.

get_structure_unionizes(**kwargs)[source]