arista.ingest.metadata
Filename + directory-name parsers that recover dimension-table fields.
Two layers:
Animal label (the directory name above each session’s Fiji CSVs):
WT_02_m→ sex=``’m’, animal_number=2, arista_suffix=``None. The leading strain code is captured for sanity-checks but the canonical strain comes from the parent genotype directory (641/605/nomp_Cin Alex’s tree), not from this label.Cell label (the Fiji filename stem itself): handled by
arista.constants.parse_fiji_filename()— already covers every observed pattern.
The deep HCS layout (<genotype>/<date>/<exp>/Arista_<side>/) is
recognised but the full parser is deferred to the next ingest sprint.
Functions
|
Parse an animal-directory name into structured fields. |
Classes
|
Parsed animal-directory components. |
- class arista.ingest.metadata.AnimalLabel(strain_prefix, animal_number, sex, arista_suffix)[source]
Bases:
objectParsed animal-directory components.
- strain_prefix
The leading token (e.g.
'WT'/'nompC') present in the directory name. Informational — the canonical strain comes from the genotype directory one level up.- Type:
- arista.ingest.metadata.parse_animal_label(label)[source]
Parse an animal-directory name into structured fields.
Returns
Noneiflabeldoes not match the expected pattern, so callers canfilter()without try/except boilerplate.- Parameters:
label (str) – Directory base-name, e.g.
'WT_02_m'or'nompC_01_f'or'WT_02b_m'.- Returns:
An
AnimalLabelif the name parses, elseNone.- Return type:
AnimalLabel | None