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

Attributes:
NameTypeDescription
idint

Numeric identifier (May change!)

annotation_filesList[AnnotationFile]

The annotation files of this alignment

per_section_alignmentsList[PerSectionAlignmentParameters]

The per section alignment parameters of this alignment

depositionDeposition

The deposition this alignment is a part of

deposition_idint

None

tiltseriesTiltSeries

The tilt series this alignment is a part of

tiltseries_idint

None

tomogramsList[Tomogram]

The tomograms of this alignment

runRun

The run this alignment is a part of

run_idint

None

alignment_typestr

Whether this a LOCAL or GLOBAL alignment

alignment_methodstr

The method used to create this alignment

volume_x_dimensionfloat

X dimension of the reconstruction volume in angstrom

volume_y_dimensionfloat

Y dimension of the reconstruction volume in angstrom

volume_z_dimensionfloat

Z dimension of the reconstruction volume in angstrom

volume_x_offsetfloat

X shift of the reconstruction volume in angstrom

volume_y_offsetfloat

Y shift of the reconstruction volume in angstrom

volume_z_offsetfloat

Z shift of the reconstruction volume in angstrom

x_rotation_offsetfloat

Additional X rotation of the reconstruction volume in degrees

tilt_offsetfloat

Additional tilt offset in degrees

affine_transformation_matrixstr

A placeholder for the affine transformation matrix.

s3_alignment_metadatastr

S3 path to the metadata file for this alignment

https_alignment_metadatastr

HTTPS url to the metadata file for this alignment

is_portal_standardbool

Whether this is the portal standard alignment

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 wildcard

  • ilike is similar to like 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:
client

A CryoET Portal API Client

query_filters=None

A set of expressions that narrow down the search results

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:
client

A CryoET Portal API Client

id

Unique identifier for the object

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

Attributes:
NameTypeDescription
idint

Numeric identifier (May change!)

runRun

The run this annotation is a part of

run_idint

None

annotation_shapesList[AnnotationShape]

The annotation shapes of this annotation

method_linksList[AnnotationMethodLink]

The annotation method links of this annotation

authorsList[AnnotationAuthor]

The annotation authors of this annotation

depositionDeposition

The deposition this annotation is a part of

deposition_idint

None

s3_metadata_pathstr

S3 path for the metadata json file for this annotation

https_metadata_pathstr

HTTPS path for the metadata json file for this annotation

annotation_publicationstr

DOIs for publications that describe the dataset. Use a comma to separate multiple DOIs.

annotation_methodstr

Describe how the annotation is made (e.g. Manual, crYoLO, Positive Unlabeled Learning, template matching)

ground_truth_statusbool

Whether an annotation is considered ground truth, as determined by the annotator.

object_idstr

Gene Ontology Cellular Component identifier or UniProtKB accession for the annotation object.

object_namestr

Name of the object being annotated (e.g. ribosome, nuclear pore complex, actin filament, membrane)

object_descriptionstr

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.

object_statestr

Molecule state annotated (e.g. open, closed)

object_countint

Number of objects identified

confidence_precisionfloat

Describe the confidence level of the annotation. Precision is defined as the % of annotation objects being true positive

confidence_recallfloat

Describe the confidence level of the annotation. Recall is defined as the % of true positives being annotated correctly

ground_truth_usedstr

Annotation filename used as ground truth for precision and recall

annotation_softwarestr

Software used for generating this annotation

is_curator_recommendedbool

Data curator’s subjective choice as the best annotation of the same annotation object ID

method_typestr

The method type for generating the annotation (e.g. manual, hybrid, automated)

deposition_datedate

Date when an annotation set is initially received by the Data Portal.

release_datedate

Date when annotation data is made public by the Data Portal.

last_modified_datedate

Date when an annotation was last modified in the Data Portal

download(dest_path=None, format=None, shape=None)

Download annotation files for a given format and/or shape

Parameters:
dest_path : Optional[str], optional

Choose a destination directory. Defaults to $CWD.

shape : Optional[str], optional

Choose a specific shape type to download (e.g.: OrientedPoint, SegmentationMask)

format : Optional[str], optional

Choose a specific file format to download (e.g.: mrc, ndjson)

download_metadata(dest_path=None)

Download annotation metadata

Parameters:
dest_path : Optional[str], optional

Choose a destination directory. Defaults to $CWD.

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 wildcard

  • ilike is similar to like 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:
client

A CryoET Portal API Client

query_filters=None

A set of expressions that narrow down the search results

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:
client

A CryoET Portal API Client

id

Unique identifier for the object

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

Attributes:
NameTypeDescription
idint

Numeric identifier (May change!)

annotationAnnotation

The annotation this annotation author is a part of

annotation_idint

None

author_list_orderint

The order in which the author appears in the publication

orcidstr

A unique, persistent identifier for researchers, provided by ORCID.

namestr

Full name of an annotation author (e.g. Jane Doe).

emailstr

Email address for this author

affiliation_namestr

Name of the institution an annotator is affiliated with. Sometimes, one annotator may have multiple affiliations.

affiliation_addressstr

Address of the institution an annotator is affiliated with.

affiliation_identifierstr

A unique identifier assigned to the affiliated institution by The Research Organization Registry (ROR).

corresponding_author_statusbool

Indicates whether an annotator is the corresponding author

primary_author_statusbool

Indicates whether an author is the main person executing the annotation, especially on manual 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 wildcard

  • ilike is similar to like 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:
client

A CryoET Portal API Client

query_filters=None

A set of expressions that narrow down the search results

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:
client

A CryoET Portal API Client

id

Unique identifier for the object

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

Attributes:
NameTypeDescription
idint

Numeric identifier (May change!)

alignmentAlignment

The alignment this annotation file is a part of

alignment_idint

None

annotation_shapeAnnotationShape

The annotation shape this annotation file is a part of

annotation_shape_idint

None

tomogram_voxel_spacingTomogramVoxelSpacing

The tomogram voxel spacing this annotation file is a part of

tomogram_voxel_spacing_idint

None

formatstr

File format for this file

s3_pathstr

s3 path of the annotation file

https_pathstr

HTTPS path for this annotation file

is_visualization_defaultbool

Data curator’s subjective choice of default annotation to display in visualization for an object

sourcestr

The source type for the annotation file (dataset_author, community, or portal_standard)

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 wildcard

  • ilike is similar to like 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:
client

A CryoET Portal API Client

query_filters=None

A set of expressions that narrow down the search results

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:
client

A CryoET Portal API Client

id

Unique identifier for the object

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

A set of links to models, source code, documentation, etc referenced by annotation method

Attributes:
NameTypeDescription
idint

Numeric identifier (May change!)

annotationAnnotation

The annotation this annotation method link is a part of

annotation_idint

None

link_typestr

Type of link (e.g. model, source code, documentation)

namestr

user readable name of the resource

linkstr

URL to the resource

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 wildcard

  • ilike is similar to like 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:
client

A CryoET Portal API Client

query_filters=None

A set of expressions that narrow down the search results

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:
client

A CryoET Portal API Client

id

Unique identifier for the object

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

Attributes:
NameTypeDescription
idint

Numeric identifier (May change!)

annotationAnnotation

The annotation this annotation shape is a part of

annotation_idint

None

annotation_filesList[AnnotationFile]

The annotation files of this annotation shape

shape_typestr

The shape of the annotation (SegmentationMask, OrientedPoint, Point, InstanceSegmentation, Mesh)

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 wildcard

  • ilike is similar to like 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:
client

A CryoET Portal API Client

query_filters=None

A set of expressions that narrow down the search results

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:
client

A CryoET Portal API Client

id

Unique identifier for the object

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

Attributes:
NameTypeDescription
idint

An identifier for a CryoET dataset, assigned by the Data Portal. Used to identify the dataset as the directory name in data tree

depositionDeposition

The deposition this dataset is a part of

deposition_idint

None

funding_sourcesList[DatasetFunding]

The dataset fundings of this dataset

authorsList[DatasetAuthor]

The dataset authors of this dataset

runsList[Run]

The runs of this dataset

titlestr

Title of a CryoET dataset

descriptionstr

A short description of a CryoET dataset, similar to an abstract for a journal article or dataset.

organism_namestr

Name of the organism from which a biological sample used in a CryoET study is derived from, e.g. homo sapiens

organism_taxidint

NCBI taxonomy identifier for the organism, e.g. 9606

tissue_namestr

Name of the tissue from which a biological sample used in a CryoET study is derived from.

tissue_idstr

UBERON identifier for the tissue

cell_namestr

Name of the cell from which a biological sample used in a CryoET study is derived from.

cell_type_idstr

Cell Ontology identifier for the cell type

cell_strain_namestr

Cell line or strain for the sample.

cell_strain_idstr

Link to more information about the cell strain

sample_typestr

Type of samples used in a CryoET study. (cell, tissue, organism, intact organelle, in-vitro mixture, in-silico synthetic data, other)

sample_preparationstr

Describe how the sample was prepared.

grid_preparationstr

Describe Cryo-ET grid preparation.

other_setupstr

Describe other setup not covered by sample preparation or grid preparation that may make this dataset unique in the same publication

key_photo_urlstr

URL for the dataset preview image.

key_photo_thumbnail_urlstr

URL for the thumbnail of preview image.

cell_component_namestr

Name of the cellular component

cell_component_idstr

If the dataset focuses on a specific part of a cell, the subset is included here

deposition_datedate

Date when a dataset is initially received by the Data Portal.

release_datedate

Date when a dataset is made available on the Data Portal.

last_modified_datedate

Date when a released dataset is last modified.

dataset_publicationsstr

Comma-separated list of DOIs for publications associated with the dataset.

related_database_entriesstr

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.

s3_prefixstr

The S3 public bucket path where this dataset is contained

https_prefixstr

The https directory path where this dataset is contained

download_everything(dest_path=None)

Download all of the data for this dataset.

Parameters:
dest_path : Optional[str], optional

Choose a destination directory. Defaults to $CWD.

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 wildcard

  • ilike is similar to like 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:
client

A CryoET Portal API Client

query_filters=None

A set of expressions that narrow down the search results

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:
client

A CryoET Portal API Client

id

Unique identifier for the object

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

Attributes:
NameTypeDescription
idint

Numeric identifier (May change!)

datasetDataset

The dataset this dataset author is a part of

dataset_idint

None

author_list_orderint

The order in which the author appears in the publication

orcidstr

A unique, persistent identifier for researchers, provided by ORCID.

namestr

Full name of an author (e.g. Jane Doe).

emailstr

Email address for this author

affiliation_namestr

Name of the institutions an author is affiliated with. Comma separated

affiliation_addressstr

Address of the institution an author is affiliated with.

affiliation_identifierstr

A unique identifier assigned to the affiliated institution by The Research Organization Registry (ROR).

corresponding_author_statusbool

Indicates whether an author is the corresponding author

primary_author_statusbool

Indicates whether an author is the main person associated with the corresponding dataset

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 wildcard

  • ilike is similar to like 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:
client

A CryoET Portal API Client

query_filters=None

A set of expressions that narrow down the search results

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:
client

A CryoET Portal API Client

id

Unique identifier for the object

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

Attributes:
NameTypeDescription
idint

Numeric identifier (May change!)

datasetDataset

The dataset this dataset funding is a part of

dataset_idint

None

funding_agency_namestr

Name of the funding agency.

grant_idstr

Grant identifier provided by the funding agency.

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 wildcard

  • ilike is similar to like 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:
client

A CryoET Portal API Client

query_filters=None

A set of expressions that narrow down the search results

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:
client

A CryoET Portal API Client

id

Unique identifier for the object

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

class cryoet_data_portal.Deposition

Deposition metadata

Attributes:
NameTypeDescription
idint

Numeric identifier (May change!)

authorsList[DepositionAuthor]

The deposition authors of this deposition

alignmentsList[Alignment]

The alignments of this deposition

annotationsList[Annotation]

The annotations of this deposition

datasetsList[Dataset]

The datasets of this deposition

framesList[Frame]

The frames of this deposition

tiltseriesList[TiltSeries]

The tilt series of this deposition

tomogramsList[Tomogram]

The tomograms of this deposition

titlestr

Title for the deposition

descriptionstr

Description for the deposition

deposition_typesList[DepositionType]

The deposition types of this deposition

deposition_publicationsstr

The publications related to this deposition

related_database_entriesstr

The related database entries to this deposition

deposition_datedate

The date the deposition was deposited

release_datedate

The date the deposition was released

last_modified_datedate

The date the deposition was last modified

key_photo_urlstr

URL for the deposition preview image.

key_photo_thumbnail_urlstr

URL for the deposition thumbnail image.

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 wildcard

  • ilike is similar to like 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:
client

A CryoET Portal API Client

query_filters=None

A set of expressions that narrow down the search results

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:
client

A CryoET Portal API Client

id

Unique identifier for the object

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

Attributes:
NameTypeDescription
idint

Numeric identifier (May change!)

depositionDeposition

The deposition this deposition author is a part of

deposition_idint

None

author_list_orderint

The order in which the author appears in the publication

orcidstr

A unique, persistent identifier for researchers, provided by ORCID.

namestr

Full name of a deposition author (e.g. Jane Doe).

emailstr

Email address for this author

affiliation_namestr

Name of the institutions an author is affiliated with. Comma separated

affiliation_addressstr

Address of the institution an author is affiliated with.

affiliation_identifierstr

A unique identifier assigned to the affiliated institution by The Research Organization Registry (ROR).

corresponding_author_statusbool

Indicates whether an author is the corresponding author

primary_author_statusbool

Indicates whether an author is the main person creating the deposition

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 wildcard

  • ilike is similar to like 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:
client

A CryoET Portal API Client

query_filters=None

A set of expressions that narrow down the search results

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:
client

A CryoET Portal API Client

id

Unique identifier for the object

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

Attributes:
NameTypeDescription
idint

Numeric identifier (May change!)

depositionDeposition

The deposition this deposition type is a part of

deposition_idint

None

typestr

The type of data submitted as a part of this deposition (annotation, dataset, tomogram)

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 wildcard

  • ilike is similar to like 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:
client

A CryoET Portal API Client

query_filters=None

A set of expressions that narrow down the search results

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:
client

A CryoET Portal API Client

id

Unique identifier for the object

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

Attributes:
NameTypeDescription
idint

Numeric identifier (May change!)

depositionDeposition

The deposition this frame is a part of

deposition_idint

None

runRun

The run this frame is a part of

run_idint

None

raw_anglefloat

Camera angle for a frame

acquisition_orderint

Frame’s acquistion order within a tilt experiment

dosefloat

The raw camera angle for a frame

is_gain_correctedbool

Whether this frame has been gain corrected

s3_frame_pathstr

S3 path to the frame file

https_frame_pathstr

HTTPS path to the frame file

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 wildcard

  • ilike is similar to like 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:
client

A CryoET Portal API Client

query_filters=None

A set of expressions that narrow down the search results

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:
client

A CryoET Portal API Client

id

Unique identifier for the object

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

Attributes:
NameTypeDescription
idint

Numeric identifier (May change!)

runRun

The run this frame acquisition file is a part of

run_idint

None

s3_mdoc_pathstr

Path to the frame acquisition mdoc file in s3

https_mdoc_pathstr

Path to the frame acquisition mdoc file as an https url

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 wildcard

  • ilike is similar to like 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:
client

A CryoET Portal API Client

query_filters=None

A set of expressions that narrow down the search results

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:
client

A CryoET Portal API Client

id

Unique identifier for the object

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

class cryoet_data_portal.GainFile

Gain values for frames in this run

Attributes:
NameTypeDescription
idint

Numeric identifier (May change!)

runRun

The run this gain file is a part of

run_idint

None

s3_file_pathstr

Path to the file in s3

https_file_pathstr

Path to the file as an https url

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 wildcard

  • ilike is similar to like 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:
client

A CryoET Portal API Client

query_filters=None

A set of expressions that narrow down the search results

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:
client

A CryoET Portal API Client

id

Unique identifier for the object

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

class cryoet_data_portal.PerSectionAlignmentParameters

Map alignment parameters to tilt series frames

Attributes:
NameTypeDescription
idint

Numeric identifier (May change!)

alignmentAlignment

The alignment this per section alignment parameters is a part of

alignment_idint

None

z_indexint

z-index of the frame in the tiltseries

x_offsetfloat

In-plane X-shift of the projection in angstrom

y_offsetfloat

In-plane Y-shift of the projection in angstrom

volume_x_rotationfloat

X-axis rotation in degrees

in_plane_rotationList[List[float]]

In-plane rotation of the projection in degrees

tilt_anglefloat

Tilt angle of the projection in degrees

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 wildcard

  • ilike is similar to like 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:
client

A CryoET Portal API Client

query_filters=None

A set of expressions that narrow down the search results

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:
client

A CryoET Portal API Client

id

Unique identifier for the object

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

class cryoet_data_portal.Run

None

Attributes:
NameTypeDescription
idint

Numeric identifier (May change!)

alignmentsList[Alignment]

The alignments of this run

annotationsList[Annotation]

The annotations of this run

datasetDataset

The dataset this run is a part of

dataset_idint

None

framesList[Frame]

The frames of this run

gain_filesList[GainFile]

The gain files of this run

frame_acquisition_filesList[FrameAcquisitionFile]

The frame acquisition files of this run

tiltseriesList[TiltSeries]

The tilt series of this run

tomogram_voxel_spacingsList[TomogramVoxelSpacing]

The tomogram voxel spacings of this run

tomogramsList[Tomogram]

The tomograms of this run

namestr

Short name for this experiment run

s3_prefixstr

The S3 public bucket path where this run is contained

https_prefixstr

The HTTPS directory path where this run is contained url

download_everything(dest_path=None)

Download all of the data for this run.

Parameters:
dest_path : Optional[str], optional

Choose a destination directory. Defaults to $CWD.

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 wildcard

  • ilike is similar to like 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:
client

A CryoET Portal API Client

query_filters=None

A set of expressions that narrow down the search results

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:
client

A CryoET Portal API Client

id

Unique identifier for the object

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

Attributes:
NameTypeDescription
idint

Numeric identifier (May change!)

alignmentsList[Alignment]

The alignments of this tilt series

runRun

The run this tilt series is a part of

run_idint

None

depositionDeposition

The deposition this tilt series is a part of

deposition_idint

None

s3_omezarr_dirstr

S3 path to this tiltseries in multiscale OME-Zarr format

s3_mrc_filestr

S3 path to this tiltseries in MRC format (no scaling)

https_omezarr_dirstr

HTTPS path to this tiltseries in multiscale OME-Zarr format

https_mrc_filestr

HTTPS path to this tiltseries in MRC format (no scaling)

s3_angle_liststr

S3 path to the angle list file for this tiltseries

https_angle_liststr

HTTPS path to the angle list file for this tiltseries

acceleration_voltageint

Electron Microscope Accelerator voltage in volts

spherical_aberration_constantfloat

Spherical Aberration Constant of the objective lens in millimeters

microscope_manufacturerstr

Name of the microscope manufacturer (FEI, TFS, JEOL)

microscope_modelstr

Microscope model name

microscope_energy_filterstr

Energy filter setup used

microscope_phase_platestr

Phase plate configuration

microscope_image_correctorstr

Image corrector setup

microscope_additional_infostr

Other microscope optical setup information, in addition to energy filter, phase plate and image corrector

camera_manufacturerstr

Name of the camera manufacturer

camera_modelstr

Camera model name

tilt_minfloat

Minimal tilt angle in degrees

tilt_maxfloat

Maximal tilt angle in degrees

tilt_rangefloat

Total tilt range in degrees

tilt_stepfloat

Tilt step in degrees

tilting_schemestr

The order of stage tilting during acquisition of the data

tilt_axisfloat

Rotation angle in degrees

total_fluxfloat

Number of Electrons reaching the specimen in a square Angstrom area for the entire tilt series

data_acquisition_softwarestr

Software used to collect data

related_empiar_entrystr

If a tilt series is deposited into EMPIAR, enter the EMPIAR dataset identifier

binning_from_framesfloat

Describes the binning factor from frames to tilt series file

tilt_series_qualityint

Author assessment of tilt series quality within the dataset (1-5, 5 is best)

is_alignedbool

Whether this tilt series is aligned

pixel_spacingfloat

Pixel spacing equal in both axes in angstroms

aligned_tiltseries_binningint

Binning factor of the aligned tilt series

size_xint

Number of pixels in the 3D data fast axis

size_yint

Number of pixels in the 3D data medium axis

size_zint

Number of pixels in the 3D data slow axis

download_alignment_file(dest_path=None)

Download the alignment file for this tiltseries

Parameters:
dest_path : Optional[str], optional

Choose a destination directory. Defaults to $CWD.

download_angle_list(dest_path=None)

Download the angle list for this tiltseries

Parameters:
dest_path : Optional[str], optional

Choose a destination directory. Defaults to $CWD.

download_mrcfile(dest_path=None)

Download an MRC file for this tiltseries

Parameters:
dest_path : Optional[str], optional

Choose a destination directory. Defaults to $CWD.

download_omezarr(dest_path=None)

Download the omezarr version of this tiltseries

Parameters:
dest_path : Optional[str], optional

Choose a destination directory. Defaults to $CWD.

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 wildcard

  • ilike is similar to like 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:
client

A CryoET Portal API Client

query_filters=None

A set of expressions that narrow down the search results

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:
client

A CryoET Portal API Client

id

Unique identifier for the object

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.

Attributes:
NameTypeDescription
idint

Numeric identifier (May change!)

alignmentAlignment

The alignment this tomogram is a part of

alignment_idint

None

authorsList[TomogramAuthor]

The tomogram authors of this tomogram

depositionDeposition

The deposition this tomogram is a part of

deposition_idint

None

runRun

The run this tomogram is a part of

run_idint

None

tomogram_voxel_spacingTomogramVoxelSpacing

The tomogram voxel spacing this tomogram is a part of

tomogram_voxel_spacing_idint

None

namestr

Short name for this tomogram

size_xint

Number of pixels in the 3D data fast axis

size_yint

Number of pixels in the 3D data medium axis

size_zint

Number of pixels in the 3D data slow axis. This is the image projection direction at zero stage tilt

voxel_spacingfloat

Voxel spacing equal in all three axes in angstroms

fiducial_alignment_statusstr

Fiducial Alignment status: True = aligned with fiducial False = aligned without fiducial

reconstruction_methodstr

Describe reconstruction method (WBP, SART, SIRT)

processingstr

Describe additional processing used to derive the tomogram

tomogram_versionfloat

Version of tomogram

processing_softwarestr

Processing software used to derive the tomogram

reconstruction_softwarestr

Name of software used for reconstruction

is_portal_standardbool

whether this tomogram adheres to portal standards

is_author_submittedbool

Whether this tomogram was submitted by the author of the dataset it belongs to.

is_visualization_defaultbool

Data curator’s subjective choice of default tomogram to display in visualization for a run

s3_omezarr_dirstr

S3 path to this tomogram in multiscale OME-Zarr format

https_omezarr_dirstr

HTTPS path to this tomogram in multiscale OME-Zarr format

s3_mrc_filestr

S3 path to this tomogram in MRC format (no scaling)

https_mrc_filestr

HTTPS path to this tomogram in MRC format (no scaling)

scale_0_dimensionsstr

comma separated x,y,z dimensions of the unscaled tomogram

scale_1_dimensionsstr

comma separated x,y,z dimensions of the scale1 tomogram

scale_2_dimensionsstr

comma separated x,y,z dimensions of the scale2 tomogram

ctf_correctedbool

Whether this tomogram is CTF corrected

offset_xint

x offset data relative to the canonical tomogram in pixels

offset_yint

y offset data relative to the canonical tomogram in pixels

offset_zint

z offset data relative to the canonical tomogram in pixels

key_photo_urlstr

URL for the key photo

key_photo_thumbnail_urlstr

URL for the thumbnail of key photo

neuroglancer_configstr

the compact json of neuroglancer config

publicationsstr

Comma-separated list of DOIs for publications associated with the tomogram.

related_database_entriesstr

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.

deposition_datedate

The date a data item was received by the cryoET data portal.

release_datedate

The date a data item was received by the cryoET data portal.

last_modified_datedate

The date a piece of data was last modified on the cryoET data portal.

download_all_annotations(dest_path=None, format=None, shape=None)

Download all annotation files for this tomogram

Parameters:
dest_path : Optional[str], optional

Choose a destination directory. Defaults to $CWD.

shape : Optional[str], optional

Choose a specific shape type to download (e.g.: OrientedPoint, SegmentationMask)

format : Optional[str], optional

Choose a specific file format to download (e.g.: mrc, ndjson)

download_mrcfile(dest_path=None)

Download an MRC file of this tomogram

Parameters:
dest_path : Optional[str], optional

Choose a destination directory. Defaults to $CWD.

download_omezarr(dest_path=None)

Download the OME-Zarr version of this tomogram

Parameters:
dest_path : Optional[str], optional

Choose a destination directory. Defaults to $CWD.

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 wildcard

  • ilike is similar to like 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:
client

A CryoET Portal API Client

query_filters=None

A set of expressions that narrow down the search results

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:
client

A CryoET Portal API Client

id

Unique identifier for the object

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

Attributes:
NameTypeDescription
idint

Numeric identifier (May change!)

tomogramTomogram

The tomogram this tomogram author is a part of

tomogram_idint

None

author_list_orderint

The order in which the author appears in the publication

orcidstr

A unique, persistent identifier for researchers, provided by ORCID.

namestr

Full name of an author (e.g. Jane Doe).

emailstr

Email address for this author

affiliation_namestr

Name of the institutions an author is affiliated with. Comma separated

affiliation_addressstr

Address of the institution an author is affiliated with.

affiliation_identifierstr

A unique identifier assigned to the affiliated institution by The Research Organization Registry (ROR).

corresponding_author_statusbool

Indicates whether an author is the corresponding author

primary_author_statusbool

Indicates whether an author is the main person creating the tomogram

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 wildcard

  • ilike is similar to like 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:
client

A CryoET Portal API Client

query_filters=None

A set of expressions that narrow down the search results

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:
client

A CryoET Portal API Client

id

Unique identifier for the object

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

Attributes:
NameTypeDescription
idint

Numeric identifier (May change!)

annotation_filesList[AnnotationFile]

The annotation files of this tomogram voxel spacing

runRun

The run this tomogram voxel spacing is a part of

run_idint

None

tomogramsList[Tomogram]

The tomograms of this tomogram voxel spacing

voxel_spacingfloat

The voxel spacing for the tomograms in this set in angstroms

s3_prefixstr

The S3 public bucket path where this tomogram voxel spacing is contained

https_prefixstr

The HTTPS directory path where this tomogram voxel spacing is contained

download_everything(dest_path=None)

Download all of the data for this tomogram voxel spacing.

Parameters:
dest_path : Optional[str], optional

Choose a destination directory. Defaults to $CWD.

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 wildcard

  • ilike is similar to like 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:
client

A CryoET Portal API Client

query_filters=None

A set of expressions that narrow down the search results

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:
client

A CryoET Portal API Client

id

Unique identifier for the object

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