Coverage for ibllib/atlas/regions.py: 86%

14 statements  

« prev     ^ index     » next       coverage.py v7.5.4, created at 2024-07-08 17:16 +0100

1"""Brain region mappings. 

2 

3Four mappings are currently available within the IBL, these are: 

4 

5* Allen Atlas - total of 1328 annotation regions provided by Allen Atlas. 

6* Beryl Atlas - total of 308 annotation regions determined by Nick Steinmetz for the brain wide map, mainly at the level of 

7 major cortical areas, nuclei/ganglia. Thus annotations relating to layers and nuclear subregions are absent. 

8* Cosmos Atlas - total of 10 annotation regions determined by Nick Steinmetz for coarse analysis. Annotations include the major 

9 divisions of the brain only. 

10* Swanson Atlas - total of 319 annotation regions provided by the Swanson atlas (FIXME which one?). 

11 

12Terminology 

13----------- 

14* **Name** - The full anatomical name of a brain region. 

15* **Acronymn** - A shortened version of a brain region name. 

16* **Index** - The index of the of the brain region within the ordered list of brain regions. 

17* **ID** - A unique numerical identifier of a brain region. These are typically integers that 

18 therefore take up less space than storing the region names or acronyms. 

19* **Mapping** - A function that maps one ordered list of brain region IDs to another, allowing one 

20 to control annotation granularity and brain region hierarchy, or to translate brain region names 

21 from one atlas to another. The default mapping is identity. See 

22 [atlas package documentation](./ibllib.atlas.html#mappings) for other mappings. 

23* **Order** - Each structure is assigned a consistent position within the flattened graph. This 

24 value is known as the annotation index, i.e. the annotation volume contains the brain region 

25 order at each point in the image. 

26 

27FIXME Document the two structure trees. Which Website did they come from, and which publication/edition? 

28""" 

29import logging 

30from iblatlas import regions 

31from ibllib.atlas import deprecated_decorator 

32 

33_logger = logging.getLogger(__name__) 

34 

35 

36@deprecated_decorator 

37def BrainRegions(): 

38 return regions.BrainRegions() 

39 

40 

41@deprecated_decorator 

42def FranklinPaxinosRegions(): 

43 return regions.FranklinPaxinosRegions() 

44 

45 

46@deprecated_decorator 

47def regions_from_allen_csv(): 

48 """ 

49 (DEPRECATED) Reads csv file containing the ALlen Ontology and instantiates a BrainRegions object. 

50 

51 NB: Instantiate BrainRegions directly instead. 

52 

53 :return: BrainRegions object 

54 """ 

55 _logger.warning("ibllib.atlas.regions.regions_from_allen_csv() is deprecated. " 

56 "Use BrainRegions() instead") 

57 return BrainRegions()