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

class allensdk.brain_observatory.behavior.data_objects.metadata.subject_metadata.sex.Sex(sex: 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, allensdk.core._data_object_base.writable_interfaces.JsonWritableInterface

sex of the animal (M/F)

classmethod from_json(dict_repr: dict) → 'Sex'[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) → 'Sex'[source]

Populate a DataObject from an internal database (likely LIMS)

Returns:
DataObject:

An instantiated DataObject which has name and value properties

classmethod from_nwb(nwbfile: pynwb.file.NWBFile) → 'Sex'[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

to_json(self) → dict[source]

Given an already populated DataObject, return the dict that when used with the from_json() classmethod would produce the same DataObject

Returns:
dict:

The JSON (in dict form) that would produce the DataObject.