Skip to content

module aicafe.definitions

The definitions of some constants.

Examples:

You can access those constants by:

>>> from aicafe import definitions as defn
>>> defn.TYPES_TIFS_REGULAR
['o', 'v', 's', 'b', 'i', 'n', 's.whole']

N_TYPES_SNAKES = 25

The number of snake types.

TYPES_SEQUENCES = list(chain.from_iterable([['S{x}', 'S{x}_ori'] for x in range(100, 110)]))

List of types of tif files of sequences.

Currently, it is ['S100', 'S100_ori', ..., 'S109', 'S109_ori'].

TYPES_SNAKES = ['unknown', 'ICA_L', 'ICA_R', 'M1_L', 'M1_R', 'M2_L', 'M2_R', 'A1_L', 'A1_R', 'A2_L', 'A2_R', 'AComm', 'M3_L', 'M3_R', 'VA_L', 'VA_R', 'BA', 'P1_L', 'P1_R', 'P2_L', 'P2_R', 'PComm_L', 'PComm_R', 'OA_L', 'OA_R']

List of snake types, with length equal to N_TYPES_SNAKES.

Examples:

You can use an integer index to access a snake type, e.g.,

>>> from aicafe import definitions as defn
>>> defn.TYPES_SNAKES[3]
'M1_L'

The correspondence between index and type

index type index type index type
0 'unknown' 9 'A2_L' 17 'P1_L'
1 'ICA_L' 10 'A2_R' 18 'P1_R'
2 'ICA_R' 11 'AComm' 19 'P2_L'
3 'M1_L' 12 'M3_L' 20 'P2_R'
4 'M1_R' 13 'M3_R' 21 'PComm_L'
5 'M2_L' 14 'VA_L' 22 'PComm_R'
6 'M2_R' 15 'VA_R' 23 'OA_L'
7 'A1_L' 16 'BA' 24 'OA_R'
8 'A1_R'

TYPES_TIFS = TYPES_TIFS_REGULAR + TYPES_SEQUENCES

List of types of all tif files, a sum of TYPES_TIFS_REGULAR and TYPES_SEQUENCES.

TYPES_TIFS_REGULAR = ['o', 'v', 's', 'b', 'i', 'n', 's.whole']

List of types of regular tif files that may appear in a case folder.

Currently, it is ['o', 'v', 's', 'b', 'i', 'n', 's.whole'].

Back to top