owmeta.data_trans.connections module¶
- class owmeta.data_trans.connections.ConnectomeCSVDataSource(*args, no_type_decl=False, **kwargs)[source]¶
Bases:
DSMixin
,CSVDataSource
A CSV data source whose CSV file describes a neural connectome
Basically, this is just a marker type to indicate what’s described in the CSV – there’s no consistent schema
- Parameters
- commit_op
CommitOp
,optional
The operation to use for commiting the file changes. The default is
COPY
- commit_op
- class_context = owmeta_core.context.ClassContext(ident="http://schema.openworm.org/2020/07/sci/bio")¶
- class owmeta.data_trans.connections.NeuronConnectomeCSVTranslation(*args, no_type_decl=False, **kwargs)[source]¶
Bases:
GenericTranslation
- class_context = owmeta_core.context.ClassContext(ident="http://schema.openworm.org/2020/07/sci/bio")¶
- class owmeta.data_trans.connections.NeuronConnectomeCSVTranslator(*args, no_type_decl=False, **kwargs)[source]¶
Bases:
DTMixin
,CSVDataTranslator
Input type(s):
ConnectomeCSVDataSource
,DataWithEvidenceDataSource
Output type(s):
DataWithEvidenceDataSource
- output_type¶
alias of
DataWithEvidenceDataSource
- translation_type¶
alias of
NeuronConnectomeCSVTranslation
- make_translation(sources)[source]¶
It’s intended that implementations of
BaseDataTranslator
will override this method to make customTranslations
according with how different arguments totranslate
are (or are not) distinguished.The actual properties of a
Translation
subclass must be assigned within thetranslate
method- Parameters
- sources
tuple
The sources that go into the translation. Sub-classes may choose to pass these to their superclass’ make_translation method or not.
- sources
- Returns
a
description
of
the
translation
- translate(data_source, neurons_source, muscles_source)[source]¶
Notionally, this method takes one or more data sources, and translates them into some other data source that captures essentially the same information, but, possibly, in a different format. Additional sources can be passed in as well for auxiliary information which are not “translated” in their entirety into the output data source. Such auxiliarry data sources should be distinguished from the primary ones in the translation
- Parameters
- *args
Input data sources
- **kwargs
Named input data sources
- Returns
the
output
data
source
- class_context = owmeta_core.context.ClassContext(ident="http://schema.openworm.org/2020/07/sci/bio")¶
- class owmeta.data_trans.connections.NeuronConnectomeSynapseClassTranslation(*args, no_type_decl=False, **kwargs)[source]¶
Bases:
GenericTranslation
- class_context = owmeta_core.context.ClassContext(ident="http://schema.openworm.org/2020/07/sci/bio")¶
- class owmeta.data_trans.connections.NeuronConnectomeSynapseClassTranslator(*args, no_type_decl=False, **kwargs)[source]¶
Bases:
DTMixin
,CSVDataTranslator
Adds synapse classes to existing connections
- output_type¶
alias of
DataWithEvidenceDataSource
- translation_type¶
- make_translation(sources)[source]¶
It’s intended that implementations of
BaseDataTranslator
will override this method to make customTranslations
according with how different arguments totranslate
are (or are not) distinguished.The actual properties of a
Translation
subclass must be assigned within thetranslate
method- Parameters
- sources
tuple
The sources that go into the translation. Sub-classes may choose to pass these to their superclass’ make_translation method or not.
- sources
- Returns
a
description
of
the
translation
- translate(data_source, neurotransmitter_source)[source]¶
Notionally, this method takes one or more data sources, and translates them into some other data source that captures essentially the same information, but, possibly, in a different format. Additional sources can be passed in as well for auxiliary information which are not “translated” in their entirety into the output data source. Such auxiliarry data sources should be distinguished from the primary ones in the translation
- Parameters
- *args
Input data sources
- **kwargs
Named input data sources
- Returns
the
output
data
source
- class_context = owmeta_core.context.ClassContext(ident="http://schema.openworm.org/2020/07/sci/bio")¶