Python API¶
Data Model¶
The Python API client is primarily a GraphQL client that interacts with our GraphQL API endpoint. The data model for the python API client and the GraphQL API are identical.
If you prefer to query our API endpoint directly, it’s available at https://graphql.cryoetdataportal.cziscience.com/v1/graphql.
A simplified diagram of the graph data model is below:
API documentation¶
An API client library to facilitate use of the Cryo-Electron Tomography portal API. The Portal is a collection of high quality tomograms and metadata.
For more information on the API, visit the cryoet-data-portal repo: https://github.com/chanzuckerberg/cryoet-data-portal/
- class cryoet_data_portal.Annotation¶
Metadata for an annotation
- annotation_method¶
Describe how the annotation is made (e.g. Manual, crYoLO, Positive Unlabeled Learning, template matching)
- Type:
- annotation_publication¶
DOIs for publications that describe the dataset. Use a comma to separate multiple DOIs.
- Type:
- authors¶
The annotation authors of this annotation
- Type:
List[AnnotationAuthor]
- 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:
- deposition¶
The deposition this annotation is a part of
- Type:
- deposition_date¶
Date when an annotation set is initially received by the Data Portal.
- Type:
date
- files¶
The annotation files of this annotation
- Type:
List[AnnotationFile]
- ground_truth_status¶
Whether an annotation is considered ground truth, as determined by the annotator.
- Type:
- is_curator_recommended¶
Data curator’s subjective choice as the best annotation of the same annotation object ID
- Type:
- last_modified_date¶
Date when an annotation was last modified in the Data Portal
- Type:
date
- method_type¶
The method type for generating the annotation (e.g. manual, hybrid, automated)
- 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:
- object_name¶
Name of the object being annotated (e.g. ribosome, nuclear pore complex, actin filament, membrane)
- Type:
- release_date¶
Date when annotation data is made public by the Data Portal.
- Type:
date
- tomogram_voxel_spacing¶
The tomogram voxel spacing this annotation is a part of
- Type:
- tomogram_voxel_spacing_id¶
The ID of the tomogram voxel spacing this annotation is part of
- Type:
-
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
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.tomogram_voxel_spacings.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 a 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.AnnotationAuthor¶
Metadata for an annotation’s authors
- affiliation_identifier¶
A unique identifier assigned to the affiliated institution by The Research Organization Registry (ROR).
- Type:
- affiliation_name¶
Name of the institution an annotator is affiliated with. Sometimes, one annotator may have multiple affiliations.
- Type:
- annotation¶
The annotation this annotation author is a part of
- Type:
- corresponding_author_status¶
Indicating whether an annotator is the corresponding author (YES or NO)
- Type:
- primary_annotator_status¶
Indicating whether an annotator is the main person executing the annotation, especially on manual annotation (YES or NO)
- Type:
- primary_author_status¶
Indicating whether an author is the main person executing the annotation, especially on manual annotation (YES or NO)
- 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 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.tomogram_voxel_spacings.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 a 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.AnnotationFile¶
Metadata for an annotation file
- annotation¶
The annotation 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:
-
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.tomogram_voxel_spacings.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 a 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.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¶
Metadata for a dataset
- authors¶
The dataset authors of this dataset
- Type:
List[DatasetAuthor]
- cell_component_id¶
If the dataset focuses on a specific part of a cell, the subset is included here
- Type:
- cell_name¶
Name of the cell from which a biological sample used in a CryoET study is derived from.
- Type:
- dataset_citations¶
DOIs for publications that cite the dataset. Use a comma to separate multiple DOIs.
- Type:
- dataset_publications¶
DOIs for publications that describe the dataset. Use a comma to separate multiple DOIs.
- Type:
- deposition¶
The deposition this dataset is a part of
- Type:
- deposition_date¶
Date when a dataset is initially received by the Data Portal.
- Type:
date
- description¶
A short description of a CryoET dataset, similar to an abstract for a journal article or dataset.
- Type:
- funding_sources¶
The dataset fundings of this dataset
- Type:
List[DatasetFunding]
- 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:
- last_modified_date¶
Date when a released dataset is last modified.
- Type:
date
- organism_name¶
Name of the organism from which a biological sample used in a CryoET study is derived from, e.g. homo sapiens
- 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:
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:
If a CryoET dataset is also deposited into another database, e.g. EMPIAR, enter the database identifier here (e.g.https://www.ebi.ac.uk/empiar/EMPIAR-12345/). Use a comma to separate multiple links.
- Type:
- release_date¶
Date when a dataset is made available on the Data Portal.
- Type:
date
- sample_type¶
Type of samples used in a CryoET study. (cell, tissue, organism, intact organelle, in-vitro mixture, in-silico synthetic data, other)
- Type:
- tissue_name¶
Name of the tissue from which a biological sample used in a CryoET study is derived from.
- 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 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.tomogram_voxel_spacings.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 a 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.DatasetAuthor¶
Metadata for authors of a dataset
- affiliation_identifier¶
A unique identifier assigned to the affiliated institution by The Research Organization Registry (ROR).
- Type:
- primary_author_status¶
Indicating 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 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.tomogram_voxel_spacings.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 a 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.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 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.tomogram_voxel_spacings.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 a Run by ID:
>>> run = Run.get_by_id(client, 1) print(run.name)
- to_dict()¶
Return a dictionary representation of this object’s attributes
-
classmethod find(client, query_filters=
- class cryoet_data_portal.Deposition¶
Deposition metadata
- annotations¶
The annotations of this deposition
- Type:
List[Annotation]
- authors¶
The deposition authors of this deposition
- Type:
List[DepositionAuthor]
- deposition_date¶
The date the deposition was deposited
- Type:
date
- last_modified_date¶
The date the deposition was last modified
- Type:
date
The related database entries to this deposition
- Type:
- release_date¶
The date the deposition was released
- Type:
date
- tiltseries¶
The tilt series of this deposition
- Type:
List[TiltSeries]
-
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.tomogram_voxel_spacings.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 a 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.DepositionAuthor¶
Authors for a deposition
- affiliation_identifier¶
A unique identifier assigned to the affiliated institution by The Research Organization Registry (ROR).
- Type:
- deposition¶
The deposition this deposition author is a part of
- 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
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.tomogram_voxel_spacings.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 a 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.Run¶
Metadata for an experiment run
- 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.tomogram_voxel_spacings.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 a 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¶
Metadata about how a tilt series was generated, and locations of output files
- deposition¶
The deposition this tilt series is a part of
- Type:
- microscope_additional_info¶
Other microscope optical setup information, in addition to energy filter, phase plate and image corrector
- Type:
If a tilt series is deposited into EMPIAR, the EMPIAR dataset identifier
- Type:
- spherical_aberration_constant¶
Spherical Aberration Constant of the objective lens in millimeters
- Type:
- tilt_series_quality¶
Author assessment of tilt series quality within the dataset (1-5, 5 is best)
- Type:
- total_flux¶
Number of Electrons reaching the specimen in a square Angstrom area for the entire tilt series
- 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 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.tomogram_voxel_spacings.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 a 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.Tomogram¶
Metadata for a tomogram
- affine_transformation_matrix¶
The flip or rotation transformation of this author submitted tomogram is indicated here
- Type:
- authors¶
The tomogram authors of this tomogram
- Type:
List[TomogramAuthor]
- deposition¶
The deposition this tomogram is a part of
- Type:
- fiducial_alignment_status¶
Fiducial Alignment status: True = aligned with fiducial False = aligned without fiducial
- Type:
- is_canonical¶
Is this tomogram considered the canonical tomogram for the run experiment? True=Yes
- Type:
- reconstruction_method¶
Describe reconstruction method (Weighted back-projection, SART, SIRT)
- Type:
- size_z¶
Number of pixels in the 3D data slow axis. This is the image projection direction at zero stage tilt
- Type:
- tomogram_version¶
Version of tomogram using the same software and post-processing. Version of tomogram using the same software and post-processing. This will be presented as the latest version
- Type:
- tomogram_voxel_spacing¶
The tomogram voxel spacing this tomogram is a part of
- Type:
-
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
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.tomogram_voxel_spacings.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 a 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.TomogramAuthor¶
Metadata for a tomogram’s authors
- affiliation_identifier¶
A unique identifier assigned to the affiliated institution by The Research Organization Registry (ROR).
- Type:
- affiliation_name¶
Name of the institution an annotator is affiliated with. Sometimes, one annotator may have multiple affiliations.
- Type:
- corresponding_author_status¶
Indicating whether an author is the corresponding author (YES or NO)
- Type:
- primary_author_status¶
Indicating whether an author is the main person creating the tomogram (YES or NO)
- 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 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.tomogram_voxel_spacings.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 a 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.TomogramVoxelSpacing¶
Metadata for a given voxel spacing related to tomograms and annotations
- annotations¶
The annotations of this tomogram voxel spacing
- Type:
List[Annotation]
-
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.tomogram_voxel_spacings.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 a Run by ID:
>>> run = Run.get_by_id(client, 1) print(run.name)
- to_dict()¶
Return a dictionary representation of this object’s attributes