Skip to content

White whole

get_cache()

Return a cached ConnectomeDataset for this reader, if present.

Source code in cect/readers/White_whole.py
23
24
25
26
def get_cache() -> object:
    """Return a cached ConnectomeDataset for this reader, if present."""
    filename_cache = get_cache_filename(__file__.split("/")[-1].split(".")[0])
    return load_connectome_dataset_file(filename_cache) or None

get_instance(from_cache=LOAD_READERS_FROM_CACHE_BY_DEFAULT, **kwargs)

Uses WhiteDataReader to load data on the whole worm connectome, including pharynx and ventral cord

Returns:

Type Description
ConnectomeDataset or WhiteDataReader

The initialised connectome reader

Source code in cect/readers/White_whole.py
29
30
31
32
33
34
35
36
37
def get_instance(from_cache: bool = LOAD_READERS_FROM_CACHE_BY_DEFAULT, **kwargs):
    """Uses ``WhiteDataReader`` to load data on the whole worm connectome, including pharynx and ventral cord

    Returns:
        (ConnectomeDataset or WhiteDataReader): The initialised connectome reader
    """
    cache = get_cache() if from_cache else None
    instance = cache or WhiteDataReader(kwargs.get("spreadsheet_location", filename))
    return instance