PyOpenWorm package¶
PyOpenWorm¶
OpenWorm Unified Data Abstract Layer.
An introduction to PyOpenWorm can be found in the README on our Github page.
Most statements correspond to some action on the database.
Some of these actions may be complex, but intuitively a.B()
, the Query form,
will query against the database for the value or values that are related to a
through B
;
on the other hand, a.B(c)
, the Update form, will add a statement to the database that a
relates to c
through B
. For the Update form, a Relationship object describing the
relationship stated is returned as a side-effect of the update.
The Update form can also be accessed through the set() method of a Property and the Query form through the get() method like:
a.B.set(c)
and:
a.B.get()
The get() method also allows for parameterizing the query in ways specific to the Property.
Relationship objects are key to the Evidence class
for sourcing statements.
Relationships can themselves be members in a relationship, allowing for fairly complex hierarchical statements to
be made about entities.
Notes:
- Of course, when these methods communicate with an external database, they may fail due to the database being unavailable and the user should be notified if a connection cannot be established in a reasonable time. Also, some objects are created by querying the database; these may be made out-of-date in that case.
a : {x_0,...,x_n}
meansa
could have the value of any one ofx_0
throughx_n
-
PyOpenWorm.
loadData
(data='OpenWormData/WormData.n3', dataFormat='n3', skipIfNewer=False)[source]¶ Load data into the underlying database of this library.
XXX: This is only guaranteed to work with the ZODB database.
Parameters: - data – (Optional) Specify the file to load into the library
- dataFormat – (Optional) Specify the file format to load into the library. Currently n3 is supported
- skipIfNewer – (Optional) Skips loading of data if the database file is newer than the data to be loaded in. This is determined by the modified time on the main database file compared to the modified time on the data file.
-
PyOpenWorm.
connect
(configFile=False, conf=False, do_logging=False, data=False, dataFormat='n3')[source]¶ - Load desired configuration and open the database
Parameters: - configFile – (Optional) The configuration file for PyOpenWorm
- conf – (Optional) If true, initializes a data object with the PyOpenWorm configuration
- do_logging – (Optional) If true, turn on debug level logging
- data – (Optional) If provided, specify the file to load into the library
- dataFormat – (Optional) If provided, specify the file format to load into the library. Currently n3 is supported
Subpackages¶
- PyOpenWorm.data_trans package
- Submodules
- PyOpenWorm.data_trans.common_data module
- PyOpenWorm.data_trans.connections module
- PyOpenWorm.data_trans.csv_ds module
- PyOpenWorm.data_trans.data_with_evidence_ds module
- PyOpenWorm.data_trans.local_file_ds module
- PyOpenWorm.data_trans.neuron_data module
- PyOpenWorm.data_trans.wormatlas module
- PyOpenWorm.data_trans.wormbase module
- Submodules
Submodules¶
- PyOpenWorm.bibtex module
- PyOpenWorm.biology module
- PyOpenWorm.cell module
- PyOpenWorm.channel module
- PyOpenWorm.channelworm module
- PyOpenWorm.command module
- PyOpenWorm.configure module
- PyOpenWorm.connection module
- PyOpenWorm.context module
- PyOpenWorm.contextDataObject module
- PyOpenWorm.context_common module
- PyOpenWorm.context_store module
- PyOpenWorm.contextualize module
- PyOpenWorm.data module
- PyOpenWorm.dataObject module
- PyOpenWorm.dataObjectUtils module
- PyOpenWorm.datasource module
- PyOpenWorm.document module
- PyOpenWorm.documentContext module
- PyOpenWorm.evidence module
- PyOpenWorm.experiment module
- PyOpenWorm.identifier_mixin module
- PyOpenWorm.import_contextualizer module
- PyOpenWorm.import_override module
- PyOpenWorm.inverse_property module
- PyOpenWorm.muscle module
- PyOpenWorm.my_neuroml module
- PyOpenWorm.network module
- PyOpenWorm.neuron module
- PyOpenWorm.pProperty module
- PyOpenWorm.package_utils module
- PyOpenWorm.plot module
- PyOpenWorm.relationship module
- PyOpenWorm.relationshipProxy module
- PyOpenWorm.simpleProperty module
- PyOpenWorm.statement module
- PyOpenWorm.utils module
- PyOpenWorm.website module
- PyOpenWorm.worm module