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

id

Numeric identifier (May change!)

Type:

int

annotation_files

The annotation files of this alignment

Type:

List[AnnotationFile]

per_section_alignments

The per section alignment parameters of this alignment

Type:

List[PerSectionAlignmentParameters]

deposition

The deposition this alignment is a part of

Type:

Deposition

deposition_id

None

Type:

int

tiltseries

The tilt series this alignment is a part of

Type:

TiltSeries

tiltseries_id

None

Type:

int

tomograms

The tomograms of this alignment

Type:

List[Tomogram]

run

The run this alignment is a part of

Type:

Run

run_id

None

Type:

int

alignment_type

Whether this a LOCAL or GLOBAL alignment

Type:

str

alignment_method

The method used to create this alignment

Type:

str

volume_x_dimension

X dimension of the reconstruction volume in angstrom

Type:

float

volume_y_dimension

Y dimension of the reconstruction volume in angstrom

Type:

float

volume_z_dimension

Z dimension of the reconstruction volume in angstrom

Type:

float

volume_x_offset

X shift of the reconstruction volume in angstrom

Type:

float

volume_y_offset

Y shift of the reconstruction volume in angstrom

Type:

float

volume_z_offset

Z shift of the reconstruction volume in angstrom

Type:

float

x_rotation_offset

Additional X rotation of the reconstruction volume in degrees

Type:

float

tilt_offset

Additional tilt offset in degrees

Type:

float

affine_transformation_matrix

A placeholder for the affine transformation matrix.

Type:

str

s3_alignment_metadata

S3 path to the metadata file for this alignment

Type:

str

https_alignment_metadata

HTTPS url to the metadata file for this alignment

Type:

str

is_portal_standard

Whether this is the portal standard alignment

Type:

bool

classmethod find(*args, **kwargs)

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

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(**kwargs)

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.name)

to_dict()

Return a dictionary representation of this object’s attributes

class cryoet_data_portal.Annotation

Metadata for an annotation

id

Numeric identifier (May change!)

Type:

int

run

The run this annotation is a part of

Type:

Run

run_id

None

Type:

int

annotation_shapes

The annotation shapes of this annotation

Type:

List[AnnotationShape]

The annotation method links of this annotation

Type:

List[AnnotationMethodLink]

authors

The annotation authors of this annotation

Type:

List[AnnotationAuthor]

deposition

The deposition this annotation is a part of

Type:

Deposition

deposition_id

None

Type:

int

s3_metadata_path

S3 path for the metadata json file for this annotation

Type:

str

https_metadata_path

HTTPS path for the metadata json file for this annotation

Type:

str

annotation_publication

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

Type:

str

annotation_method

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

Type:

str

ground_truth_status

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

Type:

bool

object_id

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

Type:

str

object_name

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

Type:

str

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:

str

object_state

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

Type:

str

object_count

Number of objects identified

Type:

int

confidence_precision

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

Type:

float

confidence_recall

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

Type:

float

ground_truth_used

Annotation filename used as ground truth for precision and recall

Type:

str

annotation_software

Software used for generating this annotation

Type:

str

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

Type:

bool

method_type

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

Type:

str

deposition_date

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

Type:

date

release_date

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

Type:

date

last_modified_date

Date when an annotation was last modified in the Data Portal

Type:

date

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

Download annotation files for a given format and/or shape

Parameters:
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(*args, **kwargs)

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

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(**kwargs)

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.name)

to_dict()

Return a dictionary representation of this object’s attributes

class cryoet_data_portal.AnnotationAuthor

Metadata for an annotation’s authors

id

Numeric identifier (May change!)

Type:

int

annotation

The annotation this annotation author is a part of

Type:

Annotation

annotation_id

None

Type:

int

author_list_order

The order in which the author appears in the publication

Type:

int

orcid

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

Type:

str

name

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

Type:

str

email

Email address for this author

Type:

str

affiliation_name

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

Type:

str

affiliation_address

Address of the institution an annotator is affiliated with.

Type:

str

affiliation_identifier

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

Type:

str

corresponding_author_status

Indicates whether an annotator is the corresponding author

Type:

bool

primary_author_status

Indicates whether an author is the main person executing the annotation, especially on manual annotation

Type:

bool

classmethod find(*args, **kwargs)

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

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(**kwargs)

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

id

Numeric identifier (May change!)

Type:

int

alignment

The alignment this annotation file is a part of

Type:

Alignment

alignment_id

None

Type:

int

annotation_shape

The annotation shape this annotation file is a part of

Type:

AnnotationShape

annotation_shape_id

None

Type:

int

tomogram_voxel_spacing

The tomogram voxel spacing this annotation file is a part of

Type:

TomogramVoxelSpacing

tomogram_voxel_spacing_id

None

Type:

int

format

File format for this file

Type:

str

s3_path

s3 path of the annotation file

Type:

str

https_path

HTTPS path for this annotation file

Type:

str

is_visualization_default

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

Type:

bool

source

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

Type:

str

classmethod find(*args, **kwargs)

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

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(**kwargs)

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.name)

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

id

Numeric identifier (May change!)

Type:

int

annotation

The annotation this annotation method link is a part of

Type:

Annotation

annotation_id

None

Type:

int

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

Type:

str

name

user readable name of the resource

Type:

str

URL to the resource

Type:

str

classmethod find(*args, **kwargs)

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

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(**kwargs)

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

id

Numeric identifier (May change!)

Type:

int

annotation

The annotation this annotation shape is a part of

Type:

Annotation

annotation_id

None

Type:

int

annotation_files

The annotation files of this annotation shape

Type:

List[AnnotationFile]

shape_type

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

Type:

str

classmethod find(*args, **kwargs)

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

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(**kwargs)

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.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

A collection of imaging experiments on the same organism

id

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

Type:

int

deposition

The deposition this dataset is a part of

Type:

Deposition

deposition_id

None

Type:

int

funding_sources

The dataset fundings of this dataset

Type:

List[DatasetFunding]

authors

The dataset authors of this dataset

Type:

List[DatasetAuthor]

runs

The runs of this dataset

Type:

List[Run]

title

Title of a CryoET dataset

Type:

str

description

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

Type:

str

organism_name

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

Type:

str

organism_taxid

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

Type:

int

tissue_name

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

Type:

str

tissue_id

UBERON identifier for the tissue

Type:

str

cell_name

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

Type:

str

cell_type_id

Cell Ontology identifier for the cell type

Type:

str

cell_strain_name

Cell line or strain for the sample.

Type:

str

cell_strain_id

Link to more information about the cell strain

Type:

str

sample_type

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

Type:

str

sample_preparation

Describe how the sample was prepared.

Type:

str

grid_preparation

Describe Cryo-ET grid preparation.

Type:

str

other_setup

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

Type:

str

key_photo_url

URL for the dataset preview image.

Type:

str

key_photo_thumbnail_url

URL for the thumbnail of preview image.

Type:

str

cell_component_name

Name of the cellular component

Type:

str

cell_component_id

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

Type:

str

deposition_date

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

Type:

date

release_date

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

Type:

date

last_modified_date

Date when a released dataset is last modified.

Type:

date

dataset_publications

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

Type:

str

related_database_entries

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:

str

s3_prefix

The S3 public bucket path where this dataset is contained

Type:

str

https_prefix

The https directory path where this dataset is contained

Type:

str

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(*args, **kwargs)

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

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(**kwargs)

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.name)

to_dict()

Return a dictionary representation of this object’s attributes

class cryoet_data_portal.DatasetAuthor

An author of a dataset

id

Numeric identifier (May change!)

Type:

int

dataset

The dataset this dataset author is a part of

Type:

Dataset

dataset_id

None

Type:

int

author_list_order

The order in which the author appears in the publication

Type:

int

orcid

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

Type:

str

name

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

Type:

str

email

Email address for this author

Type:

str

affiliation_name

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

Type:

str

affiliation_address

Address of the institution an author is affiliated with.

Type:

str

affiliation_identifier

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

Type:

str

corresponding_author_status

Indicates whether an author is the corresponding author

Type:

bool

primary_author_status

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

Type:

bool

classmethod find(*args, **kwargs)

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

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(**kwargs)

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

id

Numeric identifier (May change!)

Type:

int

dataset

The dataset this dataset funding is a part of

Type:

Dataset

dataset_id

None

Type:

int

funding_agency_name

Name of the funding agency.

Type:

str

grant_id

Grant identifier provided by the funding agency.

Type:

str

classmethod find(*args, **kwargs)

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

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(**kwargs)

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.name)

to_dict()

Return a dictionary representation of this object’s attributes

class cryoet_data_portal.Deposition

Deposition metadata

id

Numeric identifier (May change!)

Type:

int

authors

The deposition authors of this deposition

Type:

List[DepositionAuthor]

alignments

The alignments of this deposition

Type:

List[Alignment]

annotations

The annotations of this deposition

Type:

List[Annotation]

datasets

The datasets of this deposition

Type:

List[Dataset]

frames

The frames of this deposition

Type:

List[Frame]

tiltseries

The tilt series of this deposition

Type:

List[TiltSeries]

tomograms

The tomograms of this deposition

Type:

List[Tomogram]

title

Title for the deposition

Type:

str

description

Description for the deposition

Type:

str

deposition_types

The deposition types of this deposition

Type:

List[DepositionType]

deposition_publications

The publications related to this deposition

Type:

str

related_database_entries

The related database entries to this deposition

Type:

str

deposition_date

The date the deposition was deposited

Type:

date

release_date

The date the deposition was released

Type:

date

last_modified_date

The date the deposition was last modified

Type:

date

key_photo_url

URL for the deposition preview image.

Type:

str

key_photo_thumbnail_url

URL for the deposition thumbnail image.

Type:

str

classmethod find(*args, **kwargs)

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

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(**kwargs)

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.name)

to_dict()

Return a dictionary representation of this object’s attributes

class cryoet_data_portal.DepositionAuthor

Authors for a deposition

id

Numeric identifier (May change!)

Type:

int

deposition

The deposition this deposition author is a part of

Type:

Deposition

deposition_id

None

Type:

int

author_list_order

The order in which the author appears in the publication

Type:

int

orcid

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

Type:

str

name

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

Type:

str

email

Email address for this author

Type:

str

affiliation_name

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

Type:

str

affiliation_address

Address of the institution an author is affiliated with.

Type:

str

affiliation_identifier

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

Type:

str

corresponding_author_status

Indicates whether an author is the corresponding author

Type:

bool

primary_author_status

Indicates whether an author is the main person creating the deposition

Type:

bool

classmethod find(*args, **kwargs)

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

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(**kwargs)

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

id

Numeric identifier (May change!)

Type:

int

deposition

The deposition this deposition type is a part of

Type:

Deposition

deposition_id

None

Type:

int

type

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

Type:

str

classmethod find(*args, **kwargs)

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

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(**kwargs)

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.name)

to_dict()

Return a dictionary representation of this object’s attributes

class cryoet_data_portal.Frame

None

id

Numeric identifier (May change!)

Type:

int

deposition

The deposition this frame is a part of

Type:

Deposition

deposition_id

None

Type:

int

run

The run this frame is a part of

Type:

Run

run_id

None

Type:

int

raw_angle

Camera angle for a frame

Type:

float

acquisition_order

Frame’s acquistion order within a tilt experiment

Type:

int

dose

The raw camera angle for a frame

Type:

float

is_gain_corrected

Whether this frame has been gain corrected

Type:

bool

s3_frame_path

S3 path to the frame file

Type:

str

https_frame_path

HTTPS path to the frame file

Type:

str

classmethod find(*args, **kwargs)

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

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(**kwargs)

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.name)

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

id

Numeric identifier (May change!)

Type:

int

run

The run this frame acquisition file is a part of

Type:

Run

run_id

None

Type:

int

s3_mdoc_path

Path to the frame acquisition mdoc file in s3

Type:

str

https_mdoc_path

Path to the frame acquisition mdoc file as an https url

Type:

str

classmethod find(*args, **kwargs)

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

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(**kwargs)

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.name)

to_dict()

Return a dictionary representation of this object’s attributes

class cryoet_data_portal.GainFile

Gain values for frames in this run

id

Numeric identifier (May change!)

Type:

int

run

The run this gain file is a part of

Type:

Run

run_id

None

Type:

int

s3_file_path

Path to the file in s3

Type:

str

https_file_path

Path to the file as an https url

Type:

str

classmethod find(*args, **kwargs)

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

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(**kwargs)

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.name)

to_dict()

Return a dictionary representation of this object’s attributes

class cryoet_data_portal.PerSectionAlignmentParameters

Map alignment parameters to tilt series frames

id

Numeric identifier (May change!)

Type:

int

alignment

The alignment this per section alignment parameters is a part of

Type:

Alignment

alignment_id

None

Type:

int

z_index

z-index of the frame in the tiltseries

Type:

int

x_offset

In-plane X-shift of the projection in angstrom

Type:

float

y_offset

In-plane Y-shift of the projection in angstrom

Type:

float

volume_x_rotation

X-axis rotation in degrees

Type:

float

in_plane_rotation

In-plane rotation of the projection in degrees

Type:

List[List[float]]

tilt_angle

Tilt angle of the projection in degrees

Type:

float

classmethod find(*args, **kwargs)

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

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(**kwargs)

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.name)

to_dict()

Return a dictionary representation of this object’s attributes

class cryoet_data_portal.Run

None

id

Numeric identifier (May change!)

Type:

int

alignments

The alignments of this run

Type:

List[Alignment]

annotations

The annotations of this run

Type:

List[Annotation]

dataset

The dataset this run is a part of

Type:

Dataset

dataset_id

None

Type:

int

frames

The frames of this run

Type:

List[Frame]

gain_files

The gain files of this run

Type:

List[GainFile]

frame_acquisition_files

The frame acquisition files of this run

Type:

List[FrameAcquisitionFile]

tiltseries

The tilt series of this run

Type:

List[TiltSeries]

tomogram_voxel_spacings

The tomogram voxel spacings of this run

Type:

List[TomogramVoxelSpacing]

tomograms

The tomograms of this run

Type:

List[Tomogram]

name

Short name for this experiment run

Type:

str

s3_prefix

The S3 public bucket path where this run is contained

Type:

str

https_prefix

The HTTPS directory path where this run is contained url

Type:

str

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(*args, **kwargs)

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

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(**kwargs)

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

id

Numeric identifier (May change!)

Type:

int

alignments

The alignments of this tilt series

Type:

List[Alignment]

run

The run this tilt series is a part of

Type:

Run

run_id

None

Type:

int

deposition

The deposition this tilt series is a part of

Type:

Deposition

deposition_id

None

Type:

int

s3_omezarr_dir

S3 path to this tiltseries in multiscale OME-Zarr format

Type:

str

s3_mrc_file

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

Type:

str

https_omezarr_dir

HTTPS path to this tiltseries in multiscale OME-Zarr format

Type:

str

https_mrc_file

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

Type:

str

s3_angle_list

S3 path to the angle list file for this tiltseries

Type:

str

https_angle_list

HTTPS path to the angle list file for this tiltseries

Type:

str

acceleration_voltage

Electron Microscope Accelerator voltage in volts

Type:

int

spherical_aberration_constant

Spherical Aberration Constant of the objective lens in millimeters

Type:

float

microscope_manufacturer

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

Type:

str

microscope_model

Microscope model name

Type:

str

microscope_energy_filter

Energy filter setup used

Type:

str

microscope_phase_plate

Phase plate configuration

Type:

str

microscope_image_corrector

Image corrector setup

Type:

str

microscope_additional_info

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

Type:

str

camera_manufacturer

Name of the camera manufacturer

Type:

str

camera_model

Camera model name

Type:

str

tilt_min

Minimal tilt angle in degrees

Type:

float

tilt_max

Maximal tilt angle in degrees

Type:

float

tilt_range

Total tilt range in degrees

Type:

float

tilt_step

Tilt step in degrees

Type:

float

tilting_scheme

The order of stage tilting during acquisition of the data

Type:

str

tilt_axis

Rotation angle in degrees

Type:

float

total_flux

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

Type:

float

data_acquisition_software

Software used to collect data

Type:

str

related_empiar_entry

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

Type:

str

binning_from_frames

Describes the binning factor from frames to tilt series file

Type:

float

tilt_series_quality

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

Type:

int

is_aligned

Whether this tilt series is aligned

Type:

bool

pixel_spacing

Pixel spacing equal in both axes in angstroms

Type:

float

aligned_tiltseries_binning

Binning factor of the aligned tilt series

Type:

int

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(*args, **kwargs)

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

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(**kwargs)

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.name)

to_dict()

Return a dictionary representation of this object’s attributes

class cryoet_data_portal.Tomogram

Metadata describing a tomogram.

id

Numeric identifier (May change!)

Type:

int

alignment

The alignment this tomogram is a part of

Type:

Alignment

alignment_id

None

Type:

int

authors

The tomogram authors of this tomogram

Type:

List[TomogramAuthor]

deposition

The deposition this tomogram is a part of

Type:

Deposition

deposition_id

None

Type:

int

run

The run this tomogram is a part of

Type:

Run

run_id

None

Type:

int

tomogram_voxel_spacing

The tomogram voxel spacing this tomogram is a part of

Type:

TomogramVoxelSpacing

tomogram_voxel_spacing_id

None

Type:

int

name

Short name for this tomogram

Type:

str

size_x

Number of pixels in the 3D data fast axis

Type:

int

size_y

Number of pixels in the 3D data medium axis

Type:

int

size_z

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

Type:

int

voxel_spacing

Voxel spacing equal in all three axes in angstroms

Type:

float

fiducial_alignment_status

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

Type:

str

reconstruction_method

Describe reconstruction method (WBP, SART, SIRT)

Type:

str

processing

Describe additional processing used to derive the tomogram

Type:

str

tomogram_version

Version of tomogram

Type:

float

processing_software

Processing software used to derive the tomogram

Type:

str

reconstruction_software

Name of software used for reconstruction

Type:

str

is_portal_standard

whether this tomogram adheres to portal standards

Type:

bool

is_author_submitted

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

Type:

bool

is_visualization_default

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

Type:

bool

s3_omezarr_dir

S3 path to this tomogram in multiscale OME-Zarr format

Type:

str

https_omezarr_dir

HTTPS path to this tomogram in multiscale OME-Zarr format

Type:

str

s3_mrc_file

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

Type:

str

https_mrc_file

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

Type:

str

scale_0_dimensions

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

Type:

str

scale_1_dimensions

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

Type:

str

scale_2_dimensions

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

Type:

str

ctf_corrected

Whether this tomogram is CTF corrected

Type:

bool

offset_x

x offset data relative to the canonical tomogram in pixels

Type:

int

offset_y

y offset data relative to the canonical tomogram in pixels

Type:

int

offset_z

z offset data relative to the canonical tomogram in pixels

Type:

int

key_photo_url

URL for the key photo

Type:

str

key_photo_thumbnail_url

URL for the thumbnail of key photo

Type:

str

neuroglancer_config

the compact json of neuroglancer config

Type:

str

publications

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

Type:

str

related_database_entries

If a CryoET tomogram is also deposited into another database, enter the database identifier here (e.g. EMPIAR-11445). Use a comma to separate multiple identifiers.

Type:

str

deposition_date

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

Type:

date

release_date

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

Type:

date

last_modified_date

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

Type:

date

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

Download all annotation files for this tomogram

Parameters:
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(*args, **kwargs)

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

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(**kwargs)

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

id

Numeric identifier (May change!)

Type:

int

tomogram

The tomogram this tomogram author is a part of

Type:

Tomogram

tomogram_id

None

Type:

int

author_list_order

The order in which the author appears in the publication

Type:

int

orcid

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

Type:

str

name

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

Type:

str

email

Email address for this author

Type:

str

affiliation_name

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

Type:

str

affiliation_address

Address of the institution an author is affiliated with.

Type:

str

affiliation_identifier

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

Type:

str

corresponding_author_status

Indicates whether an author is the corresponding author

Type:

bool

primary_author_status

Indicates whether an author is the main person creating the tomogram

Type:

bool

classmethod find(*args, **kwargs)

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

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(**kwargs)

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

id

Numeric identifier (May change!)

Type:

int

annotation_files

The annotation files of this tomogram voxel spacing

Type:

List[AnnotationFile]

run

The run this tomogram voxel spacing is a part of

Type:

Run

run_id

None

Type:

int

tomograms

The tomograms of this tomogram voxel spacing

Type:

List[Tomogram]

voxel_spacing

The voxel spacing for the tomograms in this set in angstroms

Type:

float

s3_prefix

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

Type:

str

https_prefix

The HTTPS directory path where this tomogram voxel spacing is contained

Type:

str

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(*args, **kwargs)

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

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(**kwargs)

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.name)

to_dict()

Return a dictionary representation of this object’s attributes