Open iimog opened 8 years ago
There are relationships between rows
, columns
, shape
, data
, matrix_type
and matrix_element_type
(and nnz
). So updating one via a setter should either update the others or fail if the change is incompatible. Initialization is a special case because many values are set simultaneously so order of setting is important if there are incompatibilities.
The types of biom attributes are checked in the setter functions. TypeErrors are thrown if there is a mismatch. As the constructor uses the setters types are also checked in the constructor. But there are other possible inconsistencies that are not yet checked:
shape
correct by calculating dynamically (read only)matrix_type
correct by updatingdata
on setrows
andcolumns
are objects containing (unique)id
andmetadata
data
correct by updating whenrows
orcolumns
are setdata
correct by throwing an Error if it is set incorrectlyformat_url
is really an url and not only a stringdate
is really date time in ISO 8601 format