Dynamic Annotation Base Interface¶
dynamicannotationdb.interface module¶
-
class
dynamicannotationdb.interface.
DynamicAnnotationInterface
(sql_uri: str)[source]¶ Bases:
object
-
property
cached_session
¶
-
create_annotation_table
(table_name: str, schema_type: str, description: str, user_id: str, reference_table: Optional[str] = None, flat_segmentation_source: Optional[str] = None)[source]¶ Create new annotation table unless already exists
- Parameters
aligned_volume (str) – name of aligned_volume to attach a new annotation table
table_name (str) – name of table
schema_type (str) –
Type of schema to use, must be a valid type from EMAnnotationSchemas
- description: str
a string with a human readable explanation of what is in the table. Including who made it and any information that helps interpret the fields of the annotations.
user_id (str) – user id for this table
reference_table (str) – reference table name, if required by this schema
flat_segmentation_source (str) –
- a path to a segmentation source associated with this table
i.e. ‘precomputed:\gs:\my_synapse_segexample1’
-
create_or_select_database
(aligned_volume: str, sql_uri: str)[source]¶ Create a new database with the name of the aligned volume. Checks if database exists before creating.
- Parameters
aligned_volume (str) – name of aligned volume which the database name will inherent
sql_uri (str) – base path to the sql server
- Returns
- Return type
sql_url instance
-
create_segmentation_table
(annotation_table_name: str, schema_type: str, pcg_table_name: str)[source]¶ - Create new segmentation table linked to an annotation table
unless it already exists.
- Parameters
annotation_table_name (str) – name of table annotation to link the segmentation table
schema_type (str) – Type of schema to use, must be a valid type from EMAnnotationSchemas
pcg_table_name (str) – name of chunkedgraph segmentation to use
- Returns
description of table that is created
- Return type
dict
-
get_annotation_table_size
(table_name: str) → int[source]¶ Get the number of annotations in a table
- Parameters
table_name (str) – name of table contained within the aligned_volume database
- Returns
number of annotations
- Return type
int
-
property