Uses WormNeuroAtlasExtSynReader to load data on peptidergic connectivity using the WormNeuroAtlas package
Returns:
| Name | Type |
Description |
WormNeuroAtlasExtSynReader |
|
The initialised connectome reader
|
Source code in cect/WormNeuroAtlasPepReader.py
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43 | def get_instance(from_cache=LOAD_READERS_FROM_CACHE_BY_DEFAULT):
"""Uses ``WormNeuroAtlasExtSynReader`` to load data on peptidergic connectivity using the **[WormNeuroAtlas package](https://github.com/francescorandi/wormneuroatlas)**
Returns:
WormNeuroAtlasExtSynReader: The initialised connectome reader
"""
if from_cache:
from cect.ConnectomeDataset import (
load_connectome_dataset_file,
get_cache_filename,
)
return load_connectome_dataset_file(
get_cache_filename(__file__.split("/")[-1].split(".")[0])
)
else:
try:
return WormNeuroAtlasExtSynReader(PEPTIDERGIC_SYN_CLASS)
except Exception as e:
print(
"Problem loading WormNeuroAtlas data. Can be caused by WormBase url not working. Defaulting to loading from cache... Issue: %s"
% str(e)
)
return get_instance(from_cache=True)
|