mcmodels.core.VoxelModelApi¶
-
class
mcmodels.core.VoxelModelApi(base_uri=None)[source]¶ HTTP Client extending MouseConnectivityApi to download model data.
Methods
build_query_url(self, stage_clauses[, fmt])Combine one or more RMA query stages into a single RMA query. build_reference_aligned_image_channel_volumes_url(…)Construct url to download the red, green, and blue channels aligned to the 25um adult mouse brain reference space volume. build_schema_query(self[, clazz, fmt])Build the URL that will fetch the data schema. build_volumetric_data_download_url(self, …)Construct url to download 3D reference model in NRRD format. calculate_injection_centroid(self, …[, …])Compute the centroid of an injection site. cleanup_truncated_file(self, file_path)Helper for removing files. construct_well_known_file_download_url(self, …)Join data api endpoint and id. debug_clause(self[, debug_value])Construct a debug clause for use in an rma::options clause. do_query(self, url_builder_fn, …)Bundle an query url construction function with a corresponding response json traversal function. do_rma_query(self, rma_builder_fn, …)Bundle an RMA query url construction function with a corresponding response json traversal function. download_alignment3d(self, section_data_set_id)Download the parameters of the 3D affine tranformation mapping this section data set’s image-space stack to CCF-space (or vice-versa). download_annotation_volume(self, …)Download the annotation volume at a particular resolution. download_deformation_field(self, …[, …])Download the local alignment parameters for this dataset. download_expression_grid_data(self, …[, …])Download in zipped metaimage format. download_gene_expression_grid_data(self, …)Download a metaimage file containing registered gene expression grid data download_model_files(self, file_name[, …])Download data. download_mouse_atlas_volume(self, age, …)Download a reference volume (annotation, grid annotation, atlas volume) download_projection_grid_data(self, …[, …])Download in NRRD format. download_reference_aligned_image_channel_volumes(…)Returns: download_structure_mask(self, structure_id, …)Download an indicator mask for a specific structure. download_structure_mesh(self, structure_id, …)Download a Wavefront obj file containing a triangulated 3d mesh built from an annotated structure. download_template_volume(self, resolution, …)Download the registration template volume at a particular resolution. download_volumetric_data(self, data_path, …)Download 3D reference model in NRRD format. experiment_correlation_search(self, \*\*kwargs)Select a seed experiment and a domain over which the similarity comparison is to be made. experiment_injection_coordinate_search(self, …)User specifies a seed location within the 3D reference space. experiment_source_search(self, \*\*kwargs)Search over the whole projection signal statistics dataset to find experiments with specific projection profiles. experiment_spatial_search(self, \*\*kwargs)Displays all SectionDataSets with projection signal density >= 0.1 at the seed point. filter(self, key, value)serialize a single RMA query filter clause. filters(self, filters)serialize RMA query filter clauses. get_experiment_detail(self, experiment_id)Retrieve the experiments data. get_experiments(self, structure_ids, \*\*kwargs)Fetch experiment metadata from the Mouse Brain Connectivity Atlas. get_experiments_api(self)Fetch experiment metadata from the Mouse Brain Connectivity Atlas via the ApiConnectivity table. get_manual_injection_summary(self, experiment_id)Retrieve manual injection summary. get_projection_image_info(self, …)Fetch meta-information of one projection image. get_reference_aligned_image_channel_volumes_url(…)Retrieve the download link for a specific data set. get_schema(self[, clazz])Retrieve schema information. json_msg_query(self, url[, dataframe])Common case where the url is fully constructed and the response data is stored in the ‘msg’ field. load_api_schema(self)Download the RMA schema from the current RMA endpoint model_query(self, \*args, \*\*kwargs)Construct and execute a model stage of an RMA query string. model_stage(self, model, \*\*kwargs)Construct a model stage of an RMA query string. only_except_tabular_clause(self, …)Construct a clause to filter which attributes are returned for use in an rma::options clause. options_clause(self, \*\*kwargs)build rma:: options clause. order_clause(self[, order_list])Construct a debug clause for use in an rma::options clause. pipe_stage(self, pipe_name, parameters)Connect model and service stages via their JSON responses. quote_string(self, the_string)Wrap a clause in single quotes. read_data(self, parsed_json)Return the message data from the parsed query. retrieve_file_over_http(self, url, file_path)Get a file from the data api and save it. retrieve_parsed_json_over_http(self, url[, post])Get the document and put it in a Python data structure retrieve_xml_over_http(self, url)Get the document and put it in a Python data structure service_query(self, \*args, \*\*kwargs)Construct and Execute a single-stage RMA query to send a request to a connected service. service_stage(self, service_name[, parameters])Construct an RMA query fragment to send a request to a connected service. set_api_urls(self, api_base_url_string)Set the internal RMA and well known file download endpoint urls based on a api server endpoint. set_default_working_directory(self, …)Set the working directory where files will be saved. tuple_filters(self, filters)Construct an RMA filter clause. download_connection_density download_connection_strength download_data_mask download_injection_density download_injection_fraction download_nodes download_normalized_connection_density download_normalized_connection_strength download_projection_density download_source_mask_params download_target_mask_params download_weights get_structure_unionizes -
__init__(self, base_uri=None)¶
Methods
__init__(self[, base_uri])build_query_url(self, stage_clauses[, fmt])Combine one or more RMA query stages into a single RMA query. build_reference_aligned_image_channel_volumes_url(…)Construct url to download the red, green, and blue channels aligned to the 25um adult mouse brain reference space volume. build_schema_query(self[, clazz, fmt])Build the URL that will fetch the data schema. build_volumetric_data_download_url(self, …)Construct url to download 3D reference model in NRRD format. calculate_injection_centroid(self, …[, …])Compute the centroid of an injection site. cleanup_truncated_file(self, file_path)Helper for removing files. construct_well_known_file_download_url(self, …)Join data api endpoint and id. debug_clause(self[, debug_value])Construct a debug clause for use in an rma::options clause. do_query(self, url_builder_fn, …)Bundle an query url construction function with a corresponding response json traversal function. do_rma_query(self, rma_builder_fn, …)Bundle an RMA query url construction function with a corresponding response json traversal function. download_alignment3d(self, section_data_set_id)Download the parameters of the 3D affine tranformation mapping this section data set’s image-space stack to CCF-space (or vice-versa). download_annotation_volume(self, …)Download the annotation volume at a particular resolution. download_connection_density(self, file_name)download_connection_strength(self, file_name)download_data_mask(self, path, …)download_deformation_field(self, …[, …])Download the local alignment parameters for this dataset. download_expression_grid_data(self, …[, …])Download in zipped metaimage format. download_gene_expression_grid_data(self, …)Download a metaimage file containing registered gene expression grid data download_injection_density(self, path, …)download_injection_fraction(self, path, …)download_model_files(self, file_name[, …])Download data. download_mouse_atlas_volume(self, age, …)Download a reference volume (annotation, grid annotation, atlas volume) download_nodes(self, file_name)download_normalized_connection_density(self, …)download_normalized_connection_strength(…)download_projection_density(self, path, …)download_projection_grid_data(self, …[, …])Download in NRRD format. download_reference_aligned_image_channel_volumes(…)Returns: download_source_mask_params(self, file_name)download_structure_mask(self, structure_id, …)Download an indicator mask for a specific structure. download_structure_mesh(self, structure_id, …)Download a Wavefront obj file containing a triangulated 3d mesh built from an annotated structure. download_target_mask_params(self, file_name)download_template_volume(self, resolution, …)Download the registration template volume at a particular resolution. download_volumetric_data(self, data_path, …)Download 3D reference model in NRRD format. download_weights(self, file_name)experiment_correlation_search(self, \*\*kwargs)Select a seed experiment and a domain over which the similarity comparison is to be made. experiment_injection_coordinate_search(self, …)User specifies a seed location within the 3D reference space. experiment_source_search(self, \*\*kwargs)Search over the whole projection signal statistics dataset to find experiments with specific projection profiles. experiment_spatial_search(self, \*\*kwargs)Displays all SectionDataSets with projection signal density >= 0.1 at the seed point. filter(self, key, value)serialize a single RMA query filter clause. filters(self, filters)serialize RMA query filter clauses. get_experiment_detail(self, experiment_id)Retrieve the experiments data. get_experiments(self, structure_ids, \*\*kwargs)Fetch experiment metadata from the Mouse Brain Connectivity Atlas. get_experiments_api(self)Fetch experiment metadata from the Mouse Brain Connectivity Atlas via the ApiConnectivity table. get_manual_injection_summary(self, experiment_id)Retrieve manual injection summary. get_projection_image_info(self, …)Fetch meta-information of one projection image. get_reference_aligned_image_channel_volumes_url(…)Retrieve the download link for a specific data set. get_schema(self[, clazz])Retrieve schema information. get_structure_unionizes(self, experiment_ids)json_msg_query(self, url[, dataframe])Common case where the url is fully constructed and the response data is stored in the ‘msg’ field. load_api_schema(self)Download the RMA schema from the current RMA endpoint model_query(self, \*args, \*\*kwargs)Construct and execute a model stage of an RMA query string. model_stage(self, model, \*\*kwargs)Construct a model stage of an RMA query string. only_except_tabular_clause(self, …)Construct a clause to filter which attributes are returned for use in an rma::options clause. options_clause(self, \*\*kwargs)build rma:: options clause. order_clause(self[, order_list])Construct a debug clause for use in an rma::options clause. pipe_stage(self, pipe_name, parameters)Connect model and service stages via their JSON responses. quote_string(self, the_string)Wrap a clause in single quotes. read_data(self, parsed_json)Return the message data from the parsed query. retrieve_file_over_http(self, url, file_path)Get a file from the data api and save it. retrieve_parsed_json_over_http(self, url[, post])Get the document and put it in a Python data structure retrieve_xml_over_http(self, url)Get the document and put it in a Python data structure service_query(self, \*args, \*\*kwargs)Construct and Execute a single-stage RMA query to send a request to a connected service. service_stage(self, service_name[, parameters])Construct an RMA query fragment to send a request to a connected service. set_api_urls(self, api_base_url_string)Set the internal RMA and well known file download endpoint urls based on a api server endpoint. set_default_working_directory(self, …)Set the working directory where files will be saved. tuple_filters(self, filters)Construct an RMA filter clause. -