coordinate_framework.py
activate(schema_name, *, create_schema=True, create_tables=True)
¶
Activates the schema.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
schema_name |
str
|
A string containing the name of the probe schema. |
required |
create_schema |
bool
|
If True, schema will be created in the database. |
True
|
create_tables |
bool
|
If True, tables related to the schema will be created in the database. |
True
|
Source code in element_electrode_localization/coordinate_framework.py
15 16 17 18 19 20 21 22 23 24 25 | |
CCF
¶
Bases: dj.Lookup
Common coordinate framework information.
Attributes:
| Name | Type | Description |
|---|---|---|
ccf_id |
foreign key, int
|
CCF ID/atlas ID. |
ccf_version |
varchar(64)
|
Allen CCF version. |
ccf_resolution |
float
|
Voxel resolution in microns. |
ccf_description |
varchar(255)
|
CCF label descriptions. |
Source code in element_electrode_localization/coordinate_framework.py
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | |
Voxel
¶
Bases: dj.Part
CCF voxel coordinates.
Attributes:
| Name | Type | Description |
|---|---|---|
CCF |
foreign key
|
CCF primary key. |
x |
foreign key, int
|
Anterior-to-posterior axis (AP axis) in micrometers. |
y |
foreign key, int
|
Superior-to_inferior axis (DV axis) in micrometers. |
z |
foreign key, int
|
Left-to-right (ML axis) in micrometers. |
Source code in element_electrode_localization/coordinate_framework.py
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | |
BrainRegionAnnotation
¶
Bases: dj.Lookup
Brain region annotation.
Attributes:
| Name | Type | Description |
|---|---|---|
CCF |
foreign key
|
CCF primary key. |
Source code in element_electrode_localization/coordinate_framework.py
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 | |
BrainRegion
¶
Bases: dj.Part
Brain region information.
Attributes:
| Name | Type | Description |
|---|---|---|
BrainRegionAnnotation |
foreign key
|
BrainRegionAnnotation primary key. |
acronym |
foreign key, varchar(32)
|
Brain region acronym. |
region_name |
varchar(128)
|
Brain region full name. |
region_id |
int
|
Brain region ID. |
color_code |
varchar(6)
|
Hex code of the color code for this region. |
Source code in element_electrode_localization/coordinate_framework.py
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 | |
Voxel
¶
Bases: dj.Part
Voxel information from CCF.
Attributes:
| Name | Type | Description |
|---|---|---|
BrainRegion |
foreign key
|
BrainRegionAnnotation.BrainRegion primary key. |
CCF.Voxel |
foreign key
|
CCF.Voxel primary key. |
Source code in element_electrode_localization/coordinate_framework.py
100 101 102 103 104 105 106 107 108 109 110 111 | |
retrieve_acronym(acronym)
classmethod
¶
Retrieve the DataJoint translation of the CCF acronym
Source code in element_electrode_localization/coordinate_framework.py
113 114 115 116 | |
voxel_query(x=None, y=None, z=None)
classmethod
¶
Given one or more coordinates, return unique brain regions
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x |
float
|
x coordinate. |
None
|
y |
float
|
y coordinate. |
None
|
z |
float
|
z coordinate. |
None
|
Raises:
| Type | Description |
|---|---|
ValueError
|
Must specificy at least one dimension. |
NotImplementedError
|
Coming soon. |
Source code in element_electrode_localization/coordinate_framework.py
118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 | |
ParentBrainRegion
¶
Bases: dj.Lookup
Hierarchical structure between the brain regions.
Attributes:
| Name | Type | Description |
|---|---|---|
BrainRegionAnnotation.BrainRegion |
foreign key
|
BrainRegionAnnotation.BrainRegion primary key. |
Parent |
query
|
parent brain region acronym from BrainRegion table |
Source code in element_electrode_localization/coordinate_framework.py
137 138 139 140 141 142 143 144 145 146 147 148 149 150 | |
load_ccf_annotation(ccf_id, version_name, voxel_resolution, nrrd_filepath, ontology_csv_filepath)
¶
Load CCF annotation.
For an example Allen brain atlas for mouse, see: http://download.alleninstitute.org/informatics-archive/current-release/mouse_ccf/annotation/ccf_2017 For the structure/ontology tree, see: https://community.brain-map.org/t/allen-mouse-ccf-accessing-and-using-related-data-and-tools/359 (particularly the ontology file downloadable as CSV)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ccf_id |
int
|
unique id to identify a new CCF dataset to be inserted. |
required |
version_name |
str
|
CCF version. |
required |
voxel_resolution |
float
|
voxel resolution in microns. |
required |
nrrd_filepath |
str
|
path to the .nrrd file for the volume data. |
required |
ontology_csv_filepath |
str
|
path to the .csv file for the brain region ontology. |
required |
Source code in element_electrode_localization/coordinate_framework.py
156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 | |