Dynamic Annotation Materialization Client¶
dynamicannotationdb.materialization_client module¶
-
class
dynamicannotationdb.materialization_client.
DynamicMaterializationClient
(aligned_volume, sql_base_uri)[source]¶ Bases:
dynamicannotationdb.interface.DynamicAnnotationInterface
-
delete_linked_annotation
(table_name: str, pcg_table_name: str, annotation_ids: List[int])[source]¶ Mark annotations by for deletion by list of ids.
- Parameters
table_name (str) – name of annotation table
pcg_table_name (str) – name of chunked graph reference table
annotation_ids (List[int]) – list of ids to delete
-
get_linked_annotations
(table_name: str, pcg_table_name: str, annotation_ids: List[int]) → dict[source]¶ Get list of annotations from database by id.
- Parameters
table_name (str) – name of annotation table
pcg_table_name (str) – name of chunked graph reference table
annotation_ids (int) – annotation id
- Returns
list of annotation data dicts
- Return type
list
-
insert_linked_annotations
(table_name: str, pcg_table_name: str, annotations: List[dict])[source]¶ Insert annotations by type and schema. Limited to 10,000 annotations. If more consider using a bulk insert script.
- Parameters
table_name (str) – name of annotation table
pcg_table_name (str) – name of chunked graph reference table
annotations (dict) – Dictionary of single annotation data.
-
insert_linked_segmentation
(table_name: str, pcg_table_name: str, segmentations: List[dict])[source]¶ Insert segmentations by linking to annotation ids. Limited to 10,000 segmentations. If more consider using a bulk insert script.
- Parameters
table_name (str) – name of annotation table
pcg_table_name (str) – name of chunked graph reference table
segmentations (List[dict]) – List of dictionaries of single segmentation data.
-
property
table
¶
-
update_linked_annotations
(table_name: str, pcg_table_name: str, annotation: dict)[source]¶ Updates an annotation by inserting a new row. The original annotation will refer to the new row with a superceded_id. Does not update inplace.
- Parameters
table_name (str) – name of annotation table
pcg_table_name (str) – name of chunked graph reference table
annotation (dict, annotation to update by ID) –
-