allensdk.brain_observatory.behavior.data_objects.metadata.subject_metadata.reporter_line module

class allensdk.brain_observatory.behavior.data_objects.metadata.subject_metadata.reporter_line.ReporterLine(reporter_line: str | None)[source]

Bases: DataObject, LimsReadableInterface, JsonReadableInterface, NwbReadableInterface

the genotype name(s) of the reporter line(s)

classmethod from_json(dict_repr: dict) ReporterLine[source]

Populates a DataFile from a JSON compatible dict (likely parsed by argschema)

Returns:
DataObject:

An instantiated DataObject which has name and value properties

classmethod from_lims(behavior_session_id: int, lims_db: PostgresQueryMixin, allow_none: bool = True) ReporterLine[source]
Parameters:
behavior_session_id: int
lims_db: PostgresQueryMixin
allow_none: bool

if True, allow None as a valid result

Returns:
An instance of ReporterLine with the value resulting
from a query to the LIMS database
classmethod from_nwb(nwbfile: NWBFile) ReporterLine[source]

Populate a DataObject from a pyNWB file object.

Parameters:
nwbfile:

The file object (NWBFile) of a pynwb dataset file.

Returns:
DataObject:

An instantiated DataObject which has name and value properties

static parse(reporter_line: List[str] | None | str, warn=False) str | None[source]

There can be multiple reporter lines, so it is returned from LIMS as a list. But there shouldn’t be more than 1 for behavior. This tries to convert to str

Parameters:
reporter_line

List of reporter line

warn

Whether to output warnings if parsing fails

Returns:
single reporter line, or None if not possible
parse_indicator(warn=False) str | None[source]

Parses indicator from reporter