API reference¶
The Python API client is primarily a GraphQL client that interacts with our GraphQL API endpoint. Install the cryoet-data-portal package to use the following classes with methods for searching and downloading datasets, tomograms, annotations and related files and metadata from the portal.
- class cryoet_data_portal.Alignment¶
Tiltseries Alignment
- annotation_files¶
The annotation files of this alignment
- Type:
List[AnnotationFile]
- per_section_alignments¶
The per section alignment parameters of this alignment
- Type:
- deposition¶
The deposition this alignment is a part of
- Type:
- tiltseries¶
The tilt series this alignment is a part of
- Type:
-
classmethod find(client, query_filters=
None
)¶ Find objects based on a set of search filters.
Search filters are combined with and so all results will match all filters.
Expressions with python-native operators (
==
,!=
,>
,>=
,<
,<=
) must be in the format:ModelSubclass.field
{operator}
{value}
Example:
Tomogram.voxel_spacing.run.name == "RUN1"
Expressions with method operators (
like
,ilike
,_in
) must be in the format:ModelSubclass.field.{operator}({value})
Examples:
Tomogram.voxel_spacing.run.name.like("%RUN1%")
Tomogram.voxel_spacing.run.name._in(["RUN1", "RUN2"])
Supported operators are:
==
,!=
,>
,>=
,<
,<=
,like
,ilike
,_in
like
is a partial match, with the % character being a wildcardilike
is similar tolike
but case-insensitive_in
accepts a list of values that are acceptable matches.
Values may be strings or numbers depending on the type of the field being matched, and _in supports a list of values of the field’s corresponding type.
ModelSubclass.field
may be an arbitrarily nested path to any field on any related model, such as:ModelSubclass.related_class_field.related_field.second_related_class_field.second_field
- Parameters:
- Yields:
Matching Model objects.
Examples
>>> alignments = Alignment.find(client, query_filters=[Alignment.run.name == "TS_026"])
Get all results for this type:
>>> alignments = Alignment.find(client)
- classmethod get_by_id(client, id)¶
Find objects by primary key
- Parameters:
- Returns:
A matching Model object if found, None otherwise.
Examples
Get an Alignment by ID:
>>> alignment = Alignment.get_by_id(client, 1) >>> print(alignment.id)
- to_dict()¶
Return a dictionary representation of this object’s attributes
- class cryoet_data_portal.Annotation¶
Metadata for an annotation
- annotation_shapes¶
The annotation shapes of this annotation
- Type:
List[AnnotationShape]
- method_links¶
The annotation method links of this annotation
- Type:
List[AnnotationMethodLink]
- authors¶
The annotation authors of this annotation
- Type:
List[AnnotationAuthor]
- deposition¶
The deposition this annotation is a part of
- Type:
- annotation_publication¶
DOIs for publications that describe the dataset. Use a comma to separate multiple DOIs.
- Type:
- annotation_method¶
Describe how the annotation is made (e.g. Manual, crYoLO, Positive Unlabeled Learning, template matching)
- Type:
- ground_truth_status¶
Whether an annotation is considered ground truth, as determined by the annotator.
- Type:
- object_id¶
Gene Ontology Cellular Component identifier or UniProtKB accession for the annotation object.
- Type:
- object_name¶
Name of the object being annotated (e.g. ribosome, nuclear pore complex, actin filament, membrane)
- Type:
- object_description¶
A textual description of the annotation object, can be a longer description to include additional information not covered by the Annotation object name and state.
- Type:
- confidence_precision¶
Describe the confidence level of the annotation. Precision is defined as the % of annotation objects being true positive
- Type:
- confidence_recall¶
Describe the confidence level of the annotation. Recall is defined as the % of true positives being annotated correctly
- Type:
- is_curator_recommended¶
Data curator’s subjective choice as the best annotation of the same annotation object ID
- Type:
- method_type¶
The method type for generating the annotation (e.g. manual, hybrid, automated)
- Type:
- deposition_date¶
Date when an annotation set is initially received by the Data Portal.
- Type:
date
- release_date¶
Date when annotation data is made public by the Data Portal.
- Type:
date
- last_modified_date¶
Date when an annotation was last modified in the Data Portal
- Type:
date
-
download(dest_path=
None
, format=None
, shape=None
)¶ Download annotation files for a given format and/or shape
- Parameters:
-
classmethod find(client, query_filters=
None
)¶ Find objects based on a set of search filters.
Search filters are combined with and so all results will match all filters.
Expressions with python-native operators (
==
,!=
,>
,>=
,<
,<=
) must be in the format:ModelSubclass.field
{operator}
{value}
Example:
Tomogram.voxel_spacing.run.name == "RUN1"
Expressions with method operators (
like
,ilike
,_in
) must be in the format:ModelSubclass.field.{operator}({value})
Examples:
Tomogram.voxel_spacing.run.name.like("%RUN1%")
Tomogram.voxel_spacing.run.name._in(["RUN1", "RUN2"])
Supported operators are:
==
,!=
,>
,>=
,<
,<=
,like
,ilike
,_in
like
is a partial match, with the % character being a wildcardilike
is similar tolike
but case-insensitive_in
accepts a list of values that are acceptable matches.
Values may be strings or numbers depending on the type of the field being matched, and _in supports a list of values of the field’s corresponding type.
ModelSubclass.field
may be an arbitrarily nested path to any field on any related model, such as:ModelSubclass.related_class_field.related_field.second_related_class_field.second_field
- Parameters:
- Yields:
Matching Model objects.
Examples
>>> annotations = Annotation.find(client, query_filters=[Annotation.run.name == "TS_026"])
Get all results for this type:
>>> annotations = Annotation.find(client)
- classmethod get_by_id(client, id)¶
Find objects by primary key
- Parameters:
- Returns:
A matching Model object if found, None otherwise.
Examples
Get an Annotation by ID:
>>> annotation = Annotation.get_by_id(client, 1) >>> print(annotation.id)
- to_dict()¶
Return a dictionary representation of this object’s attributes
- class cryoet_data_portal.AnnotationAuthor¶
Metadata for an annotation’s authors
- annotation¶
The annotation this annotation author is a part of
- Type:
- affiliation_name¶
Name of the institution an annotator is affiliated with. Sometimes, one annotator may have multiple affiliations.
- Type:
- affiliation_identifier¶
A unique identifier assigned to the affiliated institution by The Research Organization Registry (ROR).
- Type:
- primary_author_status¶
Indicates whether an author is the main person executing the annotation, especially on manual annotation
- Type:
-
classmethod find(client, query_filters=
None
)¶ Find objects based on a set of search filters.
Search filters are combined with and so all results will match all filters.
Expressions with python-native operators (
==
,!=
,>
,>=
,<
,<=
) must be in the format:ModelSubclass.field
{operator}
{value}
Example:
Tomogram.voxel_spacing.run.name == "RUN1"
Expressions with method operators (
like
,ilike
,_in
) must be in the format:ModelSubclass.field.{operator}({value})
Examples:
Tomogram.voxel_spacing.run.name.like("%RUN1%")
Tomogram.voxel_spacing.run.name._in(["RUN1", "RUN2"])
Supported operators are:
==
,!=
,>
,>=
,<
,<=
,like
,ilike
,_in
like
is a partial match, with the % character being a wildcardilike
is similar tolike
but case-insensitive_in
accepts a list of values that are acceptable matches.
Values may be strings or numbers depending on the type of the field being matched, and _in supports a list of values of the field’s corresponding type.
ModelSubclass.field
may be an arbitrarily nested path to any field on any related model, such as:ModelSubclass.related_class_field.related_field.second_related_class_field.second_field
- Parameters:
- Yields:
Matching Model objects.
Examples
>>> annotation_authors = AnnotationAuthor.find(client, query_filters=[AnnotationAuthor.annotation.run.name._in(['TS_026', 'TS_027']), AnnotationAuthor.annotation.object_name.ilike('%membrane%')])
Get all results for this type:
>>> annotation_authors = AnnotationAuthor.find(client)
- classmethod get_by_id(client, id)¶
Find objects by primary key
- Parameters:
- Returns:
A matching Model object if found, None otherwise.
Examples
Get an AnnotationAuthor by ID:
>>> annotation_author = AnnotationAuthor.get_by_id(client, 1) >>> print(annotation_author.name)
- to_dict()¶
Return a dictionary representation of this object’s attributes
- class cryoet_data_portal.AnnotationFile¶
Metadata for files associated with an annotation
- annotation_shape¶
The annotation shape this annotation file is a part of
- Type:
- tomogram_voxel_spacing¶
The tomogram voxel spacing this annotation file is a part of
- Type:
- is_visualization_default¶
Data curator’s subjective choice of default annotation to display in visualization for an object
- Type:
- source¶
The source type for the annotation file (dataset_author, community, or portal_standard)
- Type:
-
classmethod find(client, query_filters=
None
)¶ Find objects based on a set of search filters.
Search filters are combined with and so all results will match all filters.
Expressions with python-native operators (
==
,!=
,>
,>=
,<
,<=
) must be in the format:ModelSubclass.field
{operator}
{value}
Example:
Tomogram.voxel_spacing.run.name == "RUN1"
Expressions with method operators (
like
,ilike
,_in
) must be in the format:ModelSubclass.field.{operator}({value})
Examples:
Tomogram.voxel_spacing.run.name.like("%RUN1%")
Tomogram.voxel_spacing.run.name._in(["RUN1", "RUN2"])
Supported operators are:
==
,!=
,>
,>=
,<
,<=
,like
,ilike
,_in
like
is a partial match, with the % character being a wildcardilike
is similar tolike
but case-insensitive_in
accepts a list of values that are acceptable matches.
Values may be strings or numbers depending on the type of the field being matched, and _in supports a list of values of the field’s corresponding type.
ModelSubclass.field
may be an arbitrarily nested path to any field on any related model, such as:ModelSubclass.related_class_field.related_field.second_related_class_field.second_field
- Parameters:
- Yields:
Matching Model objects.
Examples
Get all results for this type:
>>> annotation_files = AnnotationFile.find(client)
- classmethod get_by_id(client, id)¶
Find objects by primary key
- Parameters:
- Returns:
A matching Model object if found, None otherwise.
Examples
Get an AnnotationFile by ID:
>>> annotation_file = AnnotationFile.get_by_id(client, 1) >>> print(annotation_file.id)
- to_dict()¶
Return a dictionary representation of this object’s attributes
- class cryoet_data_portal.AnnotationMethodLink¶
A set of links to models, source code, documentation, etc referenced by annotation method
- annotation¶
The annotation this annotation method link is a part of
- Type:
-
classmethod find(client, query_filters=
None
)¶ Find objects based on a set of search filters.
Search filters are combined with and so all results will match all filters.
Expressions with python-native operators (
==
,!=
,>
,>=
,<
,<=
) must be in the format:ModelSubclass.field
{operator}
{value}
Example:
Tomogram.voxel_spacing.run.name == "RUN1"
Expressions with method operators (
like
,ilike
,_in
) must be in the format:ModelSubclass.field.{operator}({value})
Examples:
Tomogram.voxel_spacing.run.name.like("%RUN1%")
Tomogram.voxel_spacing.run.name._in(["RUN1", "RUN2"])
Supported operators are:
==
,!=
,>
,>=
,<
,<=
,like
,ilike
,_in
like
is a partial match, with the % character being a wildcardilike
is similar tolike
but case-insensitive_in
accepts a list of values that are acceptable matches.
Values may be strings or numbers depending on the type of the field being matched, and _in supports a list of values of the field’s corresponding type.
ModelSubclass.field
may be an arbitrarily nested path to any field on any related model, such as:ModelSubclass.related_class_field.related_field.second_related_class_field.second_field
- Parameters:
- Yields:
Matching Model objects.
Examples
>>> annotation_method_links = AnnotationMethodLink.find(client, query_filters=[AnnotationMethodLink.annotation.run.name._in(['TS_026', 'TS_027']), AnnotationMethodLink.annotation.object_name.ilike('%membrane%')])
Get all results for this type:
>>> annotation_method_links = AnnotationMethodLink.find(client)
- classmethod get_by_id(client, id)¶
Find objects by primary key
- Parameters:
- Returns:
A matching Model object if found, None otherwise.
Examples
Get an AnnotationMethodLink by ID:
>>> annotation_method_link = AnnotationMethodLink.get_by_id(client, 1) >>> print(annotation_method_link.name)
- to_dict()¶
Return a dictionary representation of this object’s attributes
- class cryoet_data_portal.AnnotationShape¶
Shapes associated with an annotation
- annotation¶
The annotation this annotation shape is a part of
- Type:
- annotation_files¶
The annotation files of this annotation shape
- Type:
List[AnnotationFile]
- shape_type¶
The shape of the annotation (SegmentationMask, OrientedPoint, Point, InstanceSegmentation, Mesh)
- Type:
-
classmethod find(client, query_filters=
None
)¶ Find objects based on a set of search filters.
Search filters are combined with and so all results will match all filters.
Expressions with python-native operators (
==
,!=
,>
,>=
,<
,<=
) must be in the format:ModelSubclass.field
{operator}
{value}
Example:
Tomogram.voxel_spacing.run.name == "RUN1"
Expressions with method operators (
like
,ilike
,_in
) must be in the format:ModelSubclass.field.{operator}({value})
Examples:
Tomogram.voxel_spacing.run.name.like("%RUN1%")
Tomogram.voxel_spacing.run.name._in(["RUN1", "RUN2"])
Supported operators are:
==
,!=
,>
,>=
,<
,<=
,like
,ilike
,_in
like
is a partial match, with the % character being a wildcardilike
is similar tolike
but case-insensitive_in
accepts a list of values that are acceptable matches.
Values may be strings or numbers depending on the type of the field being matched, and _in supports a list of values of the field’s corresponding type.
ModelSubclass.field
may be an arbitrarily nested path to any field on any related model, such as:ModelSubclass.related_class_field.related_field.second_related_class_field.second_field
- Parameters:
- Yields:
Matching Model objects.
Examples
>>> annotation_shapes = AnnotationShape.find(client, query_filters=[AnnotationShape.annotation.run.name._in(['TS_026', 'TS_027']), AnnotationShape.annotation.object_name.ilike('%membrane%')])
Get all results for this type:
>>> annotation_shapes = AnnotationShape.find(client)
- classmethod get_by_id(client, id)¶
Find objects by primary key
- Parameters:
- Returns:
A matching Model object if found, None otherwise.
Examples
Get an AnnotationShape by ID:
>>> annotation_shape = AnnotationShape.get_by_id(client, 1) >>> print(annotation_shape.id)
- to_dict()¶
Return a dictionary representation of this object’s attributes
- class cryoet_data_portal.Client¶
A GraphQL Client library that can traverse all the metadata in the CryoET Data Portal
- Parameters:
- url : Optional[str]
The API URL to connect to, defaults to the latest portal endpoint.
- Returns:
A GraphQL API Client library
Examples
Generate a client that connects to the default GraphQL API:
>>> client = cryoet_data_portal.Client()
- class cryoet_data_portal.Dataset¶
A collection of imaging experiments on the same organism
- id¶
An identifier for a CryoET dataset, assigned by the Data Portal. Used to identify the dataset as the directory name in data tree
- Type:
- deposition¶
The deposition this dataset is a part of
- Type:
- funding_sources¶
The dataset fundings of this dataset
- Type:
List[DatasetFunding]
- authors¶
The dataset authors of this dataset
- Type:
List[DatasetAuthor]
- description¶
A short description of a CryoET dataset, similar to an abstract for a journal article or dataset.
- Type:
- organism_name¶
Name of the organism from which a biological sample used in a CryoET study is derived from, e.g. homo sapiens
- Type:
- tissue_name¶
Name of the tissue from which a biological sample used in a CryoET study is derived from.
- Type:
- cell_name¶
Name of the cell from which a biological sample used in a CryoET study is derived from.
- Type:
- sample_type¶
Type of samples used in a CryoET study. (cell, tissue, organism, intact organelle, in-vitro mixture, in-silico synthetic data, other)
- Type:
- other_setup¶
Describe other setup not covered by sample preparation or grid preparation that may make this dataset unique in the same publication
- Type:
- cell_component_id¶
If the dataset focuses on a specific part of a cell, the subset is included here
- Type:
- deposition_date¶
Date when a dataset is initially received by the Data Portal.
- Type:
date
- release_date¶
Date when a dataset is made available on the Data Portal.
- Type:
date
- last_modified_date¶
Date when a released dataset is last modified.
- Type:
date
- dataset_publications¶
Comma-separated list of DOIs for publications associated with the dataset.
- Type:
If a CryoET dataset is also deposited into another database, enter the database identifier here (e.g. EMPIAR-11445). Use a comma to separate multiple identifiers.
- Type:
-
classmethod find(client, query_filters=
None
)¶ Find objects based on a set of search filters.
Search filters are combined with and so all results will match all filters.
Expressions with python-native operators (
==
,!=
,>
,>=
,<
,<=
) must be in the format:ModelSubclass.field
{operator}
{value}
Example:
Tomogram.voxel_spacing.run.name == "RUN1"
Expressions with method operators (
like
,ilike
,_in
) must be in the format:ModelSubclass.field.{operator}({value})
Examples:
Tomogram.voxel_spacing.run.name.like("%RUN1%")
Tomogram.voxel_spacing.run.name._in(["RUN1", "RUN2"])
Supported operators are:
==
,!=
,>
,>=
,<
,<=
,like
,ilike
,_in
like
is a partial match, with the % character being a wildcardilike
is similar tolike
but case-insensitive_in
accepts a list of values that are acceptable matches.
Values may be strings or numbers depending on the type of the field being matched, and _in supports a list of values of the field’s corresponding type.
ModelSubclass.field
may be an arbitrarily nested path to any field on any related model, such as:ModelSubclass.related_class_field.related_field.second_related_class_field.second_field
- Parameters:
- Yields:
Matching Model objects.
Examples
Get all results for this type:
>>> datasets = Dataset.find(client)
- classmethod get_by_id(client, id)¶
Find objects by primary key
- Parameters:
- Returns:
A matching Model object if found, None otherwise.
Examples
Get an Dataset by ID:
>>> dataset = Dataset.get_by_id(client, 1) >>> print(dataset.id)
- to_dict()¶
Return a dictionary representation of this object’s attributes
- class cryoet_data_portal.DatasetAuthor¶
An author of a dataset
- affiliation_identifier¶
A unique identifier assigned to the affiliated institution by The Research Organization Registry (ROR).
- Type:
- primary_author_status¶
Indicates whether an author is the main person associated with the corresponding dataset
- Type:
-
classmethod find(client, query_filters=
None
)¶ Find objects based on a set of search filters.
Search filters are combined with and so all results will match all filters.
Expressions with python-native operators (
==
,!=
,>
,>=
,<
,<=
) must be in the format:ModelSubclass.field
{operator}
{value}
Example:
Tomogram.voxel_spacing.run.name == "RUN1"
Expressions with method operators (
like
,ilike
,_in
) must be in the format:ModelSubclass.field.{operator}({value})
Examples:
Tomogram.voxel_spacing.run.name.like("%RUN1%")
Tomogram.voxel_spacing.run.name._in(["RUN1", "RUN2"])
Supported operators are:
==
,!=
,>
,>=
,<
,<=
,like
,ilike
,_in
like
is a partial match, with the % character being a wildcardilike
is similar tolike
but case-insensitive_in
accepts a list of values that are acceptable matches.
Values may be strings or numbers depending on the type of the field being matched, and _in supports a list of values of the field’s corresponding type.
ModelSubclass.field
may be an arbitrarily nested path to any field on any related model, such as:ModelSubclass.related_class_field.related_field.second_related_class_field.second_field
- Parameters:
- Yields:
Matching Model objects.
Examples
Filter dataset authors by attributes, including attributes in related models:
>>> dataset_authors = DatasetAuthor.find(client, query_filters=[DatasetAuthor.name == "TS_026", DatasetAuthor.dataset.id == 10000])
Get all results for this type:
>>> dataset_authors = DatasetAuthor.find(client)
- classmethod get_by_id(client, id)¶
Find objects by primary key
- Parameters:
- Returns:
A matching Model object if found, None otherwise.
Examples
Get an DatasetAuthor by ID:
>>> dataset_author = DatasetAuthor.get_by_id(client, 1) >>> print(dataset_author.name)
- to_dict()¶
Return a dictionary representation of this object’s attributes
- class cryoet_data_portal.DatasetFunding¶
Metadata for a dataset’s funding sources
-
classmethod find(client, query_filters=
None
)¶ Find objects based on a set of search filters.
Search filters are combined with and so all results will match all filters.
Expressions with python-native operators (
==
,!=
,>
,>=
,<
,<=
) must be in the format:ModelSubclass.field
{operator}
{value}
Example:
Tomogram.voxel_spacing.run.name == "RUN1"
Expressions with method operators (
like
,ilike
,_in
) must be in the format:ModelSubclass.field.{operator}({value})
Examples:
Tomogram.voxel_spacing.run.name.like("%RUN1%")
Tomogram.voxel_spacing.run.name._in(["RUN1", "RUN2"])
Supported operators are:
==
,!=
,>
,>=
,<
,<=
,like
,ilike
,_in
like
is a partial match, with the % character being a wildcardilike
is similar tolike
but case-insensitive_in
accepts a list of values that are acceptable matches.
Values may be strings or numbers depending on the type of the field being matched, and _in supports a list of values of the field’s corresponding type.
ModelSubclass.field
may be an arbitrarily nested path to any field on any related model, such as:ModelSubclass.related_class_field.related_field.second_related_class_field.second_field
- Parameters:
- Yields:
Matching Model objects.
Examples
Filter dataset fundings by attributes, including attributes in related models:
>>> dataset_fundings = DatasetFunding.find(client, query_filters=[DatasetFunding.dataset.id == 10000])
Get all results for this type:
>>> dataset_fundings = DatasetFunding.find(client)
- classmethod get_by_id(client, id)¶
Find objects by primary key
- Parameters:
- Returns:
A matching Model object if found, None otherwise.
Examples
Get an DatasetFunding by ID:
>>> dataset_funding = DatasetFunding.get_by_id(client, 1) >>> print(dataset_funding.id)
- to_dict()¶
Return a dictionary representation of this object’s attributes
-
classmethod find(client, query_filters=
- class cryoet_data_portal.Deposition¶
Deposition metadata
- authors¶
The deposition authors of this deposition
- Type:
List[DepositionAuthor]
- annotations¶
The annotations of this deposition
- Type:
List[Annotation]
- tiltseries¶
The tilt series of this deposition
- Type:
List[TiltSeries]
- deposition_types¶
The deposition types of this deposition
- Type:
List[DepositionType]
The related database entries to this deposition
- Type:
- deposition_date¶
The date the deposition was deposited
- Type:
date
- release_date¶
The date the deposition was released
- Type:
date
- last_modified_date¶
The date the deposition was last modified
- Type:
date
-
classmethod find(client, query_filters=
None
)¶ Find objects based on a set of search filters.
Search filters are combined with and so all results will match all filters.
Expressions with python-native operators (
==
,!=
,>
,>=
,<
,<=
) must be in the format:ModelSubclass.field
{operator}
{value}
Example:
Tomogram.voxel_spacing.run.name == "RUN1"
Expressions with method operators (
like
,ilike
,_in
) must be in the format:ModelSubclass.field.{operator}({value})
Examples:
Tomogram.voxel_spacing.run.name.like("%RUN1%")
Tomogram.voxel_spacing.run.name._in(["RUN1", "RUN2"])
Supported operators are:
==
,!=
,>
,>=
,<
,<=
,like
,ilike
,_in
like
is a partial match, with the % character being a wildcardilike
is similar tolike
but case-insensitive_in
accepts a list of values that are acceptable matches.
Values may be strings or numbers depending on the type of the field being matched, and _in supports a list of values of the field’s corresponding type.
ModelSubclass.field
may be an arbitrarily nested path to any field on any related model, such as:ModelSubclass.related_class_field.related_field.second_related_class_field.second_field
- Parameters:
- Yields:
Matching Model objects.
Examples
Get all results for this type:
>>> depositions = Deposition.find(client)
- classmethod get_by_id(client, id)¶
Find objects by primary key
- Parameters:
- Returns:
A matching Model object if found, None otherwise.
Examples
Get an Deposition by ID:
>>> deposition = Deposition.get_by_id(client, 1) >>> print(deposition.id)
- to_dict()¶
Return a dictionary representation of this object’s attributes
- class cryoet_data_portal.DepositionAuthor¶
Authors for a deposition
- deposition¶
The deposition this deposition author is a part of
- Type:
- affiliation_identifier¶
A unique identifier assigned to the affiliated institution by The Research Organization Registry (ROR).
- Type:
- primary_author_status¶
Indicates whether an author is the main person creating the deposition
- Type:
-
classmethod find(client, query_filters=
None
)¶ Find objects based on a set of search filters.
Search filters are combined with and so all results will match all filters.
Expressions with python-native operators (
==
,!=
,>
,>=
,<
,<=
) must be in the format:ModelSubclass.field
{operator}
{value}
Example:
Tomogram.voxel_spacing.run.name == "RUN1"
Expressions with method operators (
like
,ilike
,_in
) must be in the format:ModelSubclass.field.{operator}({value})
Examples:
Tomogram.voxel_spacing.run.name.like("%RUN1%")
Tomogram.voxel_spacing.run.name._in(["RUN1", "RUN2"])
Supported operators are:
==
,!=
,>
,>=
,<
,<=
,like
,ilike
,_in
like
is a partial match, with the % character being a wildcardilike
is similar tolike
but case-insensitive_in
accepts a list of values that are acceptable matches.
Values may be strings or numbers depending on the type of the field being matched, and _in supports a list of values of the field’s corresponding type.
ModelSubclass.field
may be an arbitrarily nested path to any field on any related model, such as:ModelSubclass.related_class_field.related_field.second_related_class_field.second_field
- Parameters:
- Yields:
Matching Model objects.
Examples
Get all results for this type:
>>> deposition_authors = DepositionAuthor.find(client)
- classmethod get_by_id(client, id)¶
Find objects by primary key
- Parameters:
- Returns:
A matching Model object if found, None otherwise.
Examples
Get an DepositionAuthor by ID:
>>> deposition_author = DepositionAuthor.get_by_id(client, 1) >>> print(deposition_author.name)
- to_dict()¶
Return a dictionary representation of this object’s attributes
- class cryoet_data_portal.DepositionType¶
None
- deposition¶
The deposition this deposition type is a part of
- Type:
- type¶
The type of data submitted as a part of this deposition (annotation, dataset, tomogram)
- Type:
-
classmethod find(client, query_filters=
None
)¶ Find objects based on a set of search filters.
Search filters are combined with and so all results will match all filters.
Expressions with python-native operators (
==
,!=
,>
,>=
,<
,<=
) must be in the format:ModelSubclass.field
{operator}
{value}
Example:
Tomogram.voxel_spacing.run.name == "RUN1"
Expressions with method operators (
like
,ilike
,_in
) must be in the format:ModelSubclass.field.{operator}({value})
Examples:
Tomogram.voxel_spacing.run.name.like("%RUN1%")
Tomogram.voxel_spacing.run.name._in(["RUN1", "RUN2"])
Supported operators are:
==
,!=
,>
,>=
,<
,<=
,like
,ilike
,_in
like
is a partial match, with the % character being a wildcardilike
is similar tolike
but case-insensitive_in
accepts a list of values that are acceptable matches.
Values may be strings or numbers depending on the type of the field being matched, and _in supports a list of values of the field’s corresponding type.
ModelSubclass.field
may be an arbitrarily nested path to any field on any related model, such as:ModelSubclass.related_class_field.related_field.second_related_class_field.second_field
- Parameters:
- Yields:
Matching Model objects.
Examples
Get all results for this type:
>>> deposition_types = DepositionType.find(client)
- classmethod get_by_id(client, id)¶
Find objects by primary key
- Parameters:
- Returns:
A matching Model object if found, None otherwise.
Examples
Get an DepositionType by ID:
>>> deposition_type = DepositionType.get_by_id(client, 1) >>> print(deposition_type.id)
- to_dict()¶
Return a dictionary representation of this object’s attributes
- class cryoet_data_portal.Frame¶
None
- deposition¶
The deposition this frame is a part of
- Type:
-
classmethod find(client, query_filters=
None
)¶ Find objects based on a set of search filters.
Search filters are combined with and so all results will match all filters.
Expressions with python-native operators (
==
,!=
,>
,>=
,<
,<=
) must be in the format:ModelSubclass.field
{operator}
{value}
Example:
Tomogram.voxel_spacing.run.name == "RUN1"
Expressions with method operators (
like
,ilike
,_in
) must be in the format:ModelSubclass.field.{operator}({value})
Examples:
Tomogram.voxel_spacing.run.name.like("%RUN1%")
Tomogram.voxel_spacing.run.name._in(["RUN1", "RUN2"])
Supported operators are:
==
,!=
,>
,>=
,<
,<=
,like
,ilike
,_in
like
is a partial match, with the % character being a wildcardilike
is similar tolike
but case-insensitive_in
accepts a list of values that are acceptable matches.
Values may be strings or numbers depending on the type of the field being matched, and _in supports a list of values of the field’s corresponding type.
ModelSubclass.field
may be an arbitrarily nested path to any field on any related model, such as:ModelSubclass.related_class_field.related_field.second_related_class_field.second_field
- Parameters:
- Yields:
Matching Model objects.
Examples
>>> frames = Frame.find(client, query_filters=[Frame.run.name == "TS_026"])
Get all results for this type:
>>> frames = Frame.find(client)
- classmethod get_by_id(client, id)¶
Find objects by primary key
- Parameters:
- Returns:
A matching Model object if found, None otherwise.
Examples
Get an Frame by ID:
>>> frame = Frame.get_by_id(client, 1) >>> print(frame.id)
- to_dict()¶
Return a dictionary representation of this object’s attributes
- class cryoet_data_portal.FrameAcquisitionFile¶
References to files containing more information about frame acquisition
-
classmethod find(client, query_filters=
None
)¶ Find objects based on a set of search filters.
Search filters are combined with and so all results will match all filters.
Expressions with python-native operators (
==
,!=
,>
,>=
,<
,<=
) must be in the format:ModelSubclass.field
{operator}
{value}
Example:
Tomogram.voxel_spacing.run.name == "RUN1"
Expressions with method operators (
like
,ilike
,_in
) must be in the format:ModelSubclass.field.{operator}({value})
Examples:
Tomogram.voxel_spacing.run.name.like("%RUN1%")
Tomogram.voxel_spacing.run.name._in(["RUN1", "RUN2"])
Supported operators are:
==
,!=
,>
,>=
,<
,<=
,like
,ilike
,_in
like
is a partial match, with the % character being a wildcardilike
is similar tolike
but case-insensitive_in
accepts a list of values that are acceptable matches.
Values may be strings or numbers depending on the type of the field being matched, and _in supports a list of values of the field’s corresponding type.
ModelSubclass.field
may be an arbitrarily nested path to any field on any related model, such as:ModelSubclass.related_class_field.related_field.second_related_class_field.second_field
- Parameters:
- Yields:
Matching Model objects.
Examples
>>> frame_acquisition_files = FrameAcquisitionFile.find(client, query_filters=[FrameAcquisitionFile.run.name == "TS_026"])
Get all results for this type:
>>> frame_acquisition_files = FrameAcquisitionFile.find(client)
- classmethod get_by_id(client, id)¶
Find objects by primary key
- Parameters:
- Returns:
A matching Model object if found, None otherwise.
Examples
Get an FrameAcquisitionFile by ID:
>>> frame_acquisition_file = FrameAcquisitionFile.get_by_id(client, 1) >>> print(frame_acquisition_file.id)
- to_dict()¶
Return a dictionary representation of this object’s attributes
-
classmethod find(client, query_filters=
- class cryoet_data_portal.GainFile¶
Gain values for frames in this run
-
classmethod find(client, query_filters=
None
)¶ Find objects based on a set of search filters.
Search filters are combined with and so all results will match all filters.
Expressions with python-native operators (
==
,!=
,>
,>=
,<
,<=
) must be in the format:ModelSubclass.field
{operator}
{value}
Example:
Tomogram.voxel_spacing.run.name == "RUN1"
Expressions with method operators (
like
,ilike
,_in
) must be in the format:ModelSubclass.field.{operator}({value})
Examples:
Tomogram.voxel_spacing.run.name.like("%RUN1%")
Tomogram.voxel_spacing.run.name._in(["RUN1", "RUN2"])
Supported operators are:
==
,!=
,>
,>=
,<
,<=
,like
,ilike
,_in
like
is a partial match, with the % character being a wildcardilike
is similar tolike
but case-insensitive_in
accepts a list of values that are acceptable matches.
Values may be strings or numbers depending on the type of the field being matched, and _in supports a list of values of the field’s corresponding type.
ModelSubclass.field
may be an arbitrarily nested path to any field on any related model, such as:ModelSubclass.related_class_field.related_field.second_related_class_field.second_field
- Parameters:
- Yields:
Matching Model objects.
Examples
>>> gain_files = GainFile.find(client, query_filters=[GainFile.run.name == "TS_026"])
Get all results for this type:
>>> gain_files = GainFile.find(client)
- classmethod get_by_id(client, id)¶
Find objects by primary key
- Parameters:
- Returns:
A matching Model object if found, None otherwise.
Examples
Get an GainFile by ID:
>>> gain_file = GainFile.get_by_id(client, 1) >>> print(gain_file.id)
- to_dict()¶
Return a dictionary representation of this object’s attributes
-
classmethod find(client, query_filters=
- class cryoet_data_portal.PerSectionAlignmentParameters¶
Map alignment parameters to tilt series frames
-
classmethod find(client, query_filters=
None
)¶ Find objects based on a set of search filters.
Search filters are combined with and so all results will match all filters.
Expressions with python-native operators (
==
,!=
,>
,>=
,<
,<=
) must be in the format:ModelSubclass.field
{operator}
{value}
Example:
Tomogram.voxel_spacing.run.name == "RUN1"
Expressions with method operators (
like
,ilike
,_in
) must be in the format:ModelSubclass.field.{operator}({value})
Examples:
Tomogram.voxel_spacing.run.name.like("%RUN1%")
Tomogram.voxel_spacing.run.name._in(["RUN1", "RUN2"])
Supported operators are:
==
,!=
,>
,>=
,<
,<=
,like
,ilike
,_in
like
is a partial match, with the % character being a wildcardilike
is similar tolike
but case-insensitive_in
accepts a list of values that are acceptable matches.
Values may be strings or numbers depending on the type of the field being matched, and _in supports a list of values of the field’s corresponding type.
ModelSubclass.field
may be an arbitrarily nested path to any field on any related model, such as:ModelSubclass.related_class_field.related_field.second_related_class_field.second_field
- Parameters:
- Yields:
Matching Model objects.
Examples
Get all results for this type:
>>> per_section_alignment_parameters = PerSectionAlignmentParameters.find(client)
- classmethod get_by_id(client, id)¶
Find objects by primary key
- Parameters:
- Returns:
A matching Model object if found, None otherwise.
Examples
Get an PerSectionAlignmentParameters by ID:
>>> per_section_alignment_parameters = PerSectionAlignmentParameters.get_by_id(client, 1) >>> print(per_section_alignment_parameters.id)
- to_dict()¶
Return a dictionary representation of this object’s attributes
-
classmethod find(client, query_filters=
- class cryoet_data_portal.Run¶
None
- annotations¶
The annotations of this run
- Type:
List[Annotation]
- frame_acquisition_files¶
The frame acquisition files of this run
- Type:
List[FrameAcquisitionFile]
- tiltseries¶
The tilt series of this run
- Type:
List[TiltSeries]
- tomogram_voxel_spacings¶
The tomogram voxel spacings of this run
- Type:
List[TomogramVoxelSpacing]
-
classmethod find(client, query_filters=
None
)¶ Find objects based on a set of search filters.
Search filters are combined with and so all results will match all filters.
Expressions with python-native operators (
==
,!=
,>
,>=
,<
,<=
) must be in the format:ModelSubclass.field
{operator}
{value}
Example:
Tomogram.voxel_spacing.run.name == "RUN1"
Expressions with method operators (
like
,ilike
,_in
) must be in the format:ModelSubclass.field.{operator}({value})
Examples:
Tomogram.voxel_spacing.run.name.like("%RUN1%")
Tomogram.voxel_spacing.run.name._in(["RUN1", "RUN2"])
Supported operators are:
==
,!=
,>
,>=
,<
,<=
,like
,ilike
,_in
like
is a partial match, with the % character being a wildcardilike
is similar tolike
but case-insensitive_in
accepts a list of values that are acceptable matches.
Values may be strings or numbers depending on the type of the field being matched, and _in supports a list of values of the field’s corresponding type.
ModelSubclass.field
may be an arbitrarily nested path to any field on any related model, such as:ModelSubclass.related_class_field.related_field.second_related_class_field.second_field
- Parameters:
- Yields:
Matching Model objects.
Examples
Filter runs by attributes, including attributes in related models:
>>> runs = Run.find(client, query_filters=[Run.name == "TS_026", Run.dataset.id == 10000]) >>> runs = Run.find(client, query_filters=[Run.name._in(['TS_026', 'TS_027']), Run.annotations.object_name.ilike('%membrane%')])
Get all results for this type:
>>> runs = Run.find(client)
- classmethod get_by_id(client, id)¶
Find objects by primary key
- Parameters:
- Returns:
A matching Model object if found, None otherwise.
Examples
Get an Run by ID:
>>> run = Run.get_by_id(client, 1) >>> print(run.name)
- to_dict()¶
Return a dictionary representation of this object’s attributes
- class cryoet_data_portal.TiltSeries¶
None
- deposition¶
The deposition this tilt series is a part of
- Type:
- spherical_aberration_constant¶
Spherical Aberration Constant of the objective lens in millimeters
- Type:
- microscope_additional_info¶
Other microscope optical setup information, in addition to energy filter, phase plate and image corrector
- Type:
- total_flux¶
Number of Electrons reaching the specimen in a square Angstrom area for the entire tilt series
- Type:
If a tilt series is deposited into EMPIAR, enter the EMPIAR dataset identifier
- Type:
- tilt_series_quality¶
Author assessment of tilt series quality within the dataset (1-5, 5 is best)
- Type:
-
classmethod find(client, query_filters=
None
)¶ Find objects based on a set of search filters.
Search filters are combined with and so all results will match all filters.
Expressions with python-native operators (
==
,!=
,>
,>=
,<
,<=
) must be in the format:ModelSubclass.field
{operator}
{value}
Example:
Tomogram.voxel_spacing.run.name == "RUN1"
Expressions with method operators (
like
,ilike
,_in
) must be in the format:ModelSubclass.field.{operator}({value})
Examples:
Tomogram.voxel_spacing.run.name.like("%RUN1%")
Tomogram.voxel_spacing.run.name._in(["RUN1", "RUN2"])
Supported operators are:
==
,!=
,>
,>=
,<
,<=
,like
,ilike
,_in
like
is a partial match, with the % character being a wildcardilike
is similar tolike
but case-insensitive_in
accepts a list of values that are acceptable matches.
Values may be strings or numbers depending on the type of the field being matched, and _in supports a list of values of the field’s corresponding type.
ModelSubclass.field
may be an arbitrarily nested path to any field on any related model, such as:ModelSubclass.related_class_field.related_field.second_related_class_field.second_field
- Parameters:
- Yields:
Matching Model objects.
Examples
>>> tilt_series = TiltSeries.find(client, query_filters=[TiltSeries.run.name == "TS_026"])
Get all results for this type:
>>> tilt_series = TiltSeries.find(client)
- classmethod get_by_id(client, id)¶
Find objects by primary key
- Parameters:
- Returns:
A matching Model object if found, None otherwise.
Examples
Get an TiltSeries by ID:
>>> tilt_series = TiltSeries.get_by_id(client, 1) >>> print(tilt_series.id)
- to_dict()¶
Return a dictionary representation of this object’s attributes
- class cryoet_data_portal.Tomogram¶
Metadata describing a tomogram.
- authors¶
The tomogram authors of this tomogram
- Type:
List[TomogramAuthor]
- deposition¶
The deposition this tomogram is a part of
- Type:
- tomogram_voxel_spacing¶
The tomogram voxel spacing this tomogram is a part of
- Type:
- size_z¶
Number of pixels in the 3D data slow axis. This is the image projection direction at zero stage tilt
- Type:
- fiducial_alignment_status¶
Fiducial Alignment status: True = aligned with fiducial False = aligned without fiducial
- Type:
- is_author_submitted¶
Whether this tomogram was submitted by the author of the dataset it belongs to.
- Type:
- is_visualization_default¶
Data curator’s subjective choice of default tomogram to display in visualization for a run
- Type:
If a CryoET tomogram is also deposited into another database, enter the database identifier here (e.g. EMPIAR-11445). Use a comma to separate multiple identifiers.
- Type:
- deposition_date¶
The date a data item was received by the cryoET data portal.
- Type:
date
- release_date¶
The date a data item was received by the cryoET data portal.
- Type:
date
- last_modified_date¶
The date a piece of data was last modified on the cryoET data portal.
- Type:
date
-
download_all_annotations(dest_path=
None
, format=None
, shape=None
)¶ Download all annotation files for this tomogram
- Parameters:
-
classmethod find(client, query_filters=
None
)¶ Find objects based on a set of search filters.
Search filters are combined with and so all results will match all filters.
Expressions with python-native operators (
==
,!=
,>
,>=
,<
,<=
) must be in the format:ModelSubclass.field
{operator}
{value}
Example:
Tomogram.voxel_spacing.run.name == "RUN1"
Expressions with method operators (
like
,ilike
,_in
) must be in the format:ModelSubclass.field.{operator}({value})
Examples:
Tomogram.voxel_spacing.run.name.like("%RUN1%")
Tomogram.voxel_spacing.run.name._in(["RUN1", "RUN2"])
Supported operators are:
==
,!=
,>
,>=
,<
,<=
,like
,ilike
,_in
like
is a partial match, with the % character being a wildcardilike
is similar tolike
but case-insensitive_in
accepts a list of values that are acceptable matches.
Values may be strings or numbers depending on the type of the field being matched, and _in supports a list of values of the field’s corresponding type.
ModelSubclass.field
may be an arbitrarily nested path to any field on any related model, such as:ModelSubclass.related_class_field.related_field.second_related_class_field.second_field
- Parameters:
- Yields:
Matching Model objects.
Examples
>>> tomograms = Tomogram.find(client, query_filters=[Tomogram.run.name == "TS_026"])
Get all results for this type:
>>> tomograms = Tomogram.find(client)
- classmethod get_by_id(client, id)¶
Find objects by primary key
- Parameters:
- Returns:
A matching Model object if found, None otherwise.
Examples
Get an Tomogram by ID:
>>> tomogram = Tomogram.get_by_id(client, 1) >>> print(tomogram.name)
- to_dict()¶
Return a dictionary representation of this object’s attributes
- class cryoet_data_portal.TomogramAuthor¶
Author of a tomogram
- affiliation_identifier¶
A unique identifier assigned to the affiliated institution by The Research Organization Registry (ROR).
- Type:
- primary_author_status¶
Indicates whether an author is the main person creating the tomogram
- Type:
-
classmethod find(client, query_filters=
None
)¶ Find objects based on a set of search filters.
Search filters are combined with and so all results will match all filters.
Expressions with python-native operators (
==
,!=
,>
,>=
,<
,<=
) must be in the format:ModelSubclass.field
{operator}
{value}
Example:
Tomogram.voxel_spacing.run.name == "RUN1"
Expressions with method operators (
like
,ilike
,_in
) must be in the format:ModelSubclass.field.{operator}({value})
Examples:
Tomogram.voxel_spacing.run.name.like("%RUN1%")
Tomogram.voxel_spacing.run.name._in(["RUN1", "RUN2"])
Supported operators are:
==
,!=
,>
,>=
,<
,<=
,like
,ilike
,_in
like
is a partial match, with the % character being a wildcardilike
is similar tolike
but case-insensitive_in
accepts a list of values that are acceptable matches.
Values may be strings or numbers depending on the type of the field being matched, and _in supports a list of values of the field’s corresponding type.
ModelSubclass.field
may be an arbitrarily nested path to any field on any related model, such as:ModelSubclass.related_class_field.related_field.second_related_class_field.second_field
- Parameters:
- Yields:
Matching Model objects.
Examples
Get all results for this type:
>>> tomogram_authors = TomogramAuthor.find(client)
- classmethod get_by_id(client, id)¶
Find objects by primary key
- Parameters:
- Returns:
A matching Model object if found, None otherwise.
Examples
Get an TomogramAuthor by ID:
>>> tomogram_author = TomogramAuthor.get_by_id(client, 1) >>> print(tomogram_author.name)
- to_dict()¶
Return a dictionary representation of this object’s attributes
- class cryoet_data_portal.TomogramVoxelSpacing¶
Voxel spacings for a run
- annotation_files¶
The annotation files of this tomogram voxel spacing
- Type:
List[AnnotationFile]
-
classmethod find(client, query_filters=
None
)¶ Find objects based on a set of search filters.
Search filters are combined with and so all results will match all filters.
Expressions with python-native operators (
==
,!=
,>
,>=
,<
,<=
) must be in the format:ModelSubclass.field
{operator}
{value}
Example:
Tomogram.voxel_spacing.run.name == "RUN1"
Expressions with method operators (
like
,ilike
,_in
) must be in the format:ModelSubclass.field.{operator}({value})
Examples:
Tomogram.voxel_spacing.run.name.like("%RUN1%")
Tomogram.voxel_spacing.run.name._in(["RUN1", "RUN2"])
Supported operators are:
==
,!=
,>
,>=
,<
,<=
,like
,ilike
,_in
like
is a partial match, with the % character being a wildcardilike
is similar tolike
but case-insensitive_in
accepts a list of values that are acceptable matches.
Values may be strings or numbers depending on the type of the field being matched, and _in supports a list of values of the field’s corresponding type.
ModelSubclass.field
may be an arbitrarily nested path to any field on any related model, such as:ModelSubclass.related_class_field.related_field.second_related_class_field.second_field
- Parameters:
- Yields:
Matching Model objects.
Examples
>>> tomogram_voxel_spacings = TomogramVoxelSpacing.find(client, query_filters=[TomogramVoxelSpacing.run.name == "TS_026"])
Get all results for this type:
>>> tomogram_voxel_spacings = TomogramVoxelSpacing.find(client)
- classmethod get_by_id(client, id)¶
Find objects by primary key
- Parameters:
- Returns:
A matching Model object if found, None otherwise.
Examples
Get an TomogramVoxelSpacing by ID:
>>> tomogram_voxel_spacing = TomogramVoxelSpacing.get_by_id(client, 1) >>> print(tomogram_voxel_spacing.id)
- to_dict()¶
Return a dictionary representation of this object’s attributes