How to use the allensdk.api.queries.ontologies_api.OntologiesApi function in allensdk

To help you get started, we’ve selected a few allensdk examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github BrancoLab / BrainRender / brainrender / atlases / aba.py View on Github external
def __init__(self):
        # get mouse connectivity cache and structure tree
        self.mcc = MouseConnectivityCache(
            manifest_file=os.path.join(
                self.mouse_connectivity_cache, "manifest.json"
            )
        )
        self.structure_tree = self.mcc.get_structure_tree()

        # get ontologies API and brain structures sets
        self.oapi = OntologiesApi()

        # get reference space
        self.space = ReferenceSpaceApi()
        self.spacecache = ReferenceSpaceCache(
            manifest=os.path.join(
                self.annotated_volume_fld, "manifest.json"
            ),  # downloaded files are stored relative to here
            resolution=int(self.resolution[0]),
            reference_space_key="annotation/ccf_2017",  # use the latest version of the CCF
        )
        self.annotated_volume, _ = self.spacecache.get_annotation_volume()

        # mouse connectivity API [used for tractography]
        self.mca = MouseConnectivityApi()

        # Get tree search api
github BrancoLab / BrainRender / brainrender / ABA / atlas_images.py View on Github external
def __init__(self):
        SvgApi.__init__(
            self
        )  # https://github.com/AllenInstitute/AllenSDK/blob/master/allensdk/api/queries/svg_api.py
        ImageDownloadApi.__init__(
            self
        )  # https://github.com/AllenInstitute/AllenSDK/blob/master/allensdk/api/queries/image_download_api.py
        self.annsetsapi = (
            AnnotatedSectionDataSetsApi()
        )  # https://github.com/AllenInstitute/AllenSDK/blob/master/allensdk/api/queries/annotated_section_data_sets_api.py
        self.oapi = (
            OntologiesApi()
        )  # https://github.com/AllenInstitute/AllenSDK/blob/master/allensdk/api/queries/ontologies_api.py

        # Get metadata about atlases
        self.atlases = pd.DataFrame(self.oapi.get_atlases_table())
        self.atlases_names = sorted(list(self.atlases["name"].values))

        self.mouse_coronal_atlas_id = int(
            self.atlases.loc[
                self.atlases["name"] == self.mouse_coronal
            ].id.values[0]
        )
        self.mouse_sagittal_atlas_id = int(
            self.atlases.loc[
                self.atlases["name"] == self.mouse_sagittal
            ].id.values[0]
        )
github BrancoLab / BrainRender / brainrender / atlases / mouse.py View on Github external
def __init__(self, base_dir=None, **kwargs):
        BrainGlobeAtlasBase.__init__(self, base_dir=base_dir, **kwargs)

        # get mouse connectivity cache and structure tree
        self.mcc = MouseConnectivityCache(
            manifest_file=os.path.join(
                self.mouse_connectivity_cache, "manifest.json"
            )
        )
        self.structure_tree = self.mcc.get_structure_tree()

        # get ontologies API and brain structures sets
        self.oapi = OntologiesApi()

        # get reference space
        self.space = ReferenceSpaceApi()
        self.spacecache = ReferenceSpaceCache(
            manifest=os.path.join(
                self.annotated_volume_fld, "manifest.json"
            ),  # downloaded files are stored relative to here
            resolution=self.resolution,
            reference_space_key="annotation/ccf_2017",  # use the latest version of the CCF
        )
        self.annotated_volume, _ = self.spacecache.get_annotation_volume()

        # mouse connectivity API [used for tractography]
        self.mca = MouseConnectivityApi()

        # Get tree search api