Data Portal
The filesystem implementation is a concrete implementation of the abstract copick API that reads data from the cryoET
Data Portal and reads/writes data to/from any storage supported by fsspec
.
The filesystem implementation is defined in the copick.impl.cryoet_data_portal
module.
Metadata Models
copick.impl.cryoet_data_portal.CopickConfigCDP
Bases: CopickConfig
Data Entities
copick.impl.cryoet_data_portal.CopickRootCDP
Bases: CopickRoot
copick.impl.cryoet_data_portal.CopickObjectCDP
Bases: CopickObjectOverlay
copick.impl.cryoet_data_portal.CopickRunCDP
Bases: CopickRunOverlay
get_picks(object_name: str = None, user_id: str = None, session_id: str = None, portal_meta_query: Dict[str, Any] = None, portal_author_query: List[str] = None) -> List[CopickPicksCDP]
Get picks by name, user_id or session_id (or combinations). Portal metadata are compared for equality. Portal authors are checked for inclusion in the full author list.
Parameters:
-
object_name
(str
, default:None
) –Name of the object to search for.
-
user_id
(str
, default:None
) –User ID to search for.
-
session_id
(str
, default:None
) –Session ID to search for.
-
portal_meta_query
(Dict[str, Any]
, default:None
) –Dictionary of values to compare against portal metadata of this annotation. Allowed keys are the scalar fields of cryoet_data_portal.Annotation
-
portal_author_query
(List[str]
, default:None
) –List of author names. Segmentations are included if this author is in the portal annotation's author list.
Returns:
-
List[CopickPicksCDP]
–List[CopickPicks]: List of picks that match the search criteria.
get_segmentations(user_id: str = None, session_id: str = None, is_multilabel: bool = None, name: str = None, voxel_size: float = None, portal_meta_query: Dict[str, Any] = None, portal_author_query: List[str] = None) -> List[CopickSegmentationCDP]
Get segmentations by user_id, session_id, name, type or voxel_size (or combinations) and portal metadata and authors. Portal metadata are compared for equality. Portal authors are checked for inclusion in the full author list.
Parameters:
-
user_id
(str
, default:None
) –User ID to search for.
-
session_id
(str
, default:None
) –Session ID to search for.
-
is_multilabel
(bool
, default:None
) –Whether the segmentation is multilabel or not.
-
name
(str
, default:None
) –Name of the segmentation to search for.
-
voxel_size
(float
, default:None
) –Voxel size to search for.
-
portal_meta_query
(Dict[str, Any]
, default:None
) –Dictionary of values to compare against portal metadata of this annotation. Allowed keys are the scalar fields of cryoet_data_portal.Annotation
-
portal_author_query
(List[str]
, default:None
) –List of author names. Segmentations are included if this author is in the portal annotation's author list.
Returns:
-
List[CopickSegmentationCDP]
–List[CopickSegmentation]: List of segmentations that match the search criteria.
ensure(create: bool = False) -> bool
Checks if the run record exists in the static or overlay directory, optionally creating it in the overlay filesystem if it does not.
Parameters:
-
create
(bool
, default:False
) –Whether to create the run record if it does not exist.
Returns:
-
bool
(bool
) –True if the run record exists, False otherwise.
copick.impl.cryoet_data_portal.CopickPicksCDP
Bases: CopickPicksOverlay
copick.impl.cryoet_data_portal.CopickMeshCDP
Bases: CopickMeshOverlay
copick.impl.cryoet_data_portal.CopickSegmentationCDP
Bases: CopickSegmentationOverlay
copick.impl.cryoet_data_portal.CopickVoxelSpacingCDP
Bases: CopickVoxelSpacingOverlay
ensure(create: bool = False) -> bool
Checks if the voxel spacing record exists in the static or overlay directory, optionally creating it in the overlay filesystem if it does not.
Parameters:
-
create
(bool
, default:False
) –Whether to create the voxel spacing record if it does not exist.
Returns:
-
bool
(bool
) –True if the voxel spacing record exists, False otherwise.
get_tomograms(tomo_type: str, portal_meta_query: Dict[str, Any] = None, portal_author_query: List[str] = None) -> List[CopickTomogramCDP]
Get a tomogram by type. Portal metadata are compared for equality. Authors are compared for inclusion.
Parameters:
-
tomo_type
(str
) –The type of tomogram to get. For portal tomograms, this is
cryoet_data_portal.Tomogram.reconstruction_method.
-
portal_meta_query
(Dict[str, Any]
, default:None
) –Dictionary of values to compare against portal metadata of this tomogram. Allowed keys are the scalar fields of cryoet_data_portal.Tomogram
-
portal_author_query
(List[str]
, default:None
) –List of author names. Tomograms are included if this author is in the portal annotation's author list.
Returns:
-
List[CopickTomogramCDP]
–List[CopickTomogram]: The list of tomograms that match the query.
copick.impl.cryoet_data_portal.CopickTomogramCDP
Bases: CopickTomogramOverlay
copick.impl.cryoet_data_portal.CopickFeaturesCDP
Bases: CopickFeaturesOverlay