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: Optional[str])[source]¶ Bases:
allensdk.core._data_object_base.data_object.DataObject
,allensdk.core._data_object_base.readable_interfaces.LimsReadableInterface
,allensdk.core._data_object_base.readable_interfaces.JsonReadableInterface
,allensdk.core._data_object_base.readable_interfaces.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: allensdk.internal.api.PostgresQueryMixin, allow_none: bool = False) → '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: pynwb.file.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: Union[List[str], NoneType, str], warn=False) → Union[str, NoneType][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
-
classmethod