allensdk.api.queries.mouse_connectivity_api module¶
- class allensdk.api.queries.mouse_connectivity_api.MouseConnectivityApi(base_uri=None)[source]¶
Bases:
ReferenceSpaceApi
,GridDataApi
HTTP Client for the Allen Mouse Brain Connectivity Atlas.
- 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_idintegerallensdk.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_reference_aligned_image_channel_volumes(data_set_id, save_file_path=None)[source]¶
- Returns:
- The well known file is downloaded
- experiment_correlation_search(**kwargs)[source]¶
Select a seed experiment and a domain over which the similarity comparison is to be made.
- Parameters:
- rowinteger
SectionDataSet.id to correlate against.
- structureslist of integers or strings, optional
Integer Structure.id or String Structure.acronym.
- hemispherestring, optional
Use ‘right’ or ‘left’. Defaults to both hemispheres.
- transgenic_lineslist of integers or strings, optional
Integer TransgenicLine.id or String TransgenicLine.name. Specify ID 0 to exclude all TransgenicLines.
- injection_structureslist of integers or strings, optional
Integer Structure.id or String Structure.acronym.
- primary_structure_onlyboolean, optional
- product_idslist of integers, optional
Integer Product.id
- start_rowinteger, optional
For paging purposes. Defaults to 0.
- num_rowsinteger, optional
For paging purposes. Defaults to 2000.
Notes
See Correlation Search and service::mouse_connectivity_correlation.
- experiment_injection_coordinate_search(**kwargs)[source]¶
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_pointlist of floats
The coordinates of a point in 3-D SectionDataSet space.
- transgenic_lineslist of integers or strings, optional
Integer TransgenicLine.id or String TransgenicLine.name. Specify ID 0 to exclude all TransgenicLines.
- injection_structureslist of integers or strings, optional
Integer Structure.id or String Structure.acronym.
- primary_structure_onlyboolean, optional
- product_idslist of integers, optional
Integer Product.id
- start_rowinteger, optional
For paging purposes. Defaults to 0.
- num_rowsinteger, optional
For paging purposes. Defaults to 2000.
Notes
See Injection Coordinate Search and service::mouse_connectivity_injection_coordinate.
- experiment_source_search(**kwargs)[source]¶
Search over the whole projection signal statistics dataset to find experiments with specific projection profiles.
- Parameters:
- injection_structureslist of integers or strings
Integer Structure.id or String Structure.acronym.
- target_domainlist of integers or strings, optional
Integer Structure.id or String Structure.acronym.
- injection_hemispherestring, optional
‘right’ or ‘left’, Defaults to both hemispheres.
- target_hemispherestring, optional
‘right’ or ‘left’, Defaults to both hemispheres.
- transgenic_lineslist of integers or strings, optional
Integer TransgenicLine.id or String TransgenicLine.name. Specify ID 0 to exclude all TransgenicLines.
- injection_domainlist of integers or strings, optional
Integer Structure.id or String Structure.acronym.
- primary_structure_onlyboolean, optional
- product_idslist of integers, optional
Integer Product.id
- start_rowinteger, optional
For paging purposes. Defaults to 0.
- num_rowsinteger, optional
For paging purposes. Defaults to 2000.
Notes
See Source Search, Target Search, and service::mouse_connectivity_injection_structure.
- experiment_spatial_search(**kwargs)[source]¶
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_pointlist of floats
The coordinates of a point in 3-D SectionDataSet space.
- transgenic_lineslist of integers or strings, optional
Integer TransgenicLine.id or String TransgenicLine.name. Specify ID 0 to exclude all TransgenicLines.
- section_data_setslist of integers, optional
Ids to filter the results.
- injection_structureslist of integers or strings, optional
Integer Structure.id or String Structure.acronym.
- primary_structure_onlyboolean, optional
- product_idslist of integers, optional
Integer Product.id
- start_rowinteger, optional
For paging purposes. Defaults to 0.
- num_rowsinteger, optional
For paging purposes. Defaults to 2000.
Notes
See Spatial Search and service::mouse_connectivity_target_spatial.
- get_experiments(structure_ids, **kwargs)[source]¶
Fetch experiment metadata from the Mouse Brain Connectivity Atlas.
- Parameters:
- structure_idsinteger or list, optional
injection structure
- Returns:
- urlstring
The constructed URL
- get_experiments_api()[source]¶
Fetch experiment metadata from the Mouse Brain Connectivity Atlas via the ApiConnectivity table.
- Returns:
- urlstring
The constructed URL
- get_projection_image_info(experiment_id, section_number)[source]¶
Fetch meta-information of one projection image.
- Parameters:
- experiment_idinteger
- section_numberinteger
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.