Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: track gain and mdoc files alongside runs #280

Merged
merged 13 commits into from
Oct 4, 2024
229 changes: 89 additions & 140 deletions apiv2/schema/schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ enums:
description: JEOL Ltd.
SIMULATED:
text: SIMULATED
description: JEOL Ltd.
description: Simulated microscope
fiducial_alignment_status_enum:
name: fiducial_alignment_status_enum
description: Fiducial Alignment method
Expand Down Expand Up @@ -541,6 +541,46 @@ classes:
- author_primary_author_status
ifabsent: false
range: boolean
GainFile:
annotations:
plural:
tag: plural
value: GainFiles
description: Gain values for frames in this run
mixins:
- IDMixin
attributes:
run:
inverse: Run.gain_files
range: Run
s3_file_path:
description: Path to the file in s3
range: string
required: true
https_file_path:
description: Path to the file as an https url
range: string
required: true
FrameAcquisitionFile:
annotations:
plural:
tag: plural
value: FrameAcquisitionFiles
description: References to files containing more information about frame acquisition
mixins:
- IDMixin
attributes:
run:
inverse: Run.frame_acquisition_files
range: Run
s3_mdoc_path:
description: Path to the frame acquisition mdoc file in s3
range: string
required: true
https_mdoc_path:
description: Path to the frame acquisition mdoc file as an https url
range: string
required: true
Alignment:
name: Alignment
annotations:
Expand Down Expand Up @@ -682,13 +722,6 @@ classes:
unit:
symbol: °
descriptive_name: degrees
local_alignment_file:
name: local_alignment_file
description: Path to the local alignment file
from_schema: cdp-dataset-config
exact_mappings:
- alignment_local_alignment_file
range: string
affine_transformation_matrix:
name: affine_transformation_matrix
description: A placeholder for the affine transformation matrix.
Expand All @@ -699,6 +732,16 @@ classes:
- exact_cardinality: 4
- exact_cardinality: 4
range: string
s3_alignment_metadata:
description: S3 path to the metadata file for this alignment
range: string
https_alignment_metadata:
description: HTTPS url to the metadata file for this alignment
range: string
is_portal_standard:
description: Whether this is the portal standard alignment
range: boolean
ifabsent: false
AnnotationAuthor:
name: AnnotationAuthor
annotations:
Expand Down Expand Up @@ -1534,15 +1577,6 @@ classes:
from_schema: cdp-dataset-config
inverse: Deposition.frames
range: Deposition
per_section_parameters:
name: per_section_parameters
description: Record how frames get mapped to Tiltseries
from_schema: cdp-dataset-config
multivalued: true
inverse: PerSectionParameters.frame
range: PerSectionParameters
annotations:
cascade_delete: true
run:
name: run
from_schema: cdp-dataset-config
Expand Down Expand Up @@ -1616,69 +1650,6 @@ classes:
- api_https_prefix
range: string
required: true
PerSectionParameters:
name: PerSectionParameters
annotations:
plural:
tag: plural
value: PerSectionParameters
description: Record how frames get mapped to Tiltseries
from_schema: cdp-dataset-config
mixins:
- IDMixin
attributes:
frame:
name: frame
from_schema: cdp-dataset-config
inverse: Frame.per_section_parameters
range: Frame
required: true
tiltseries:
name: tiltseries
from_schema: cdp-dataset-config
inverse: Tiltseries.per_section_parameters
range: Tiltseries
required: true
z_index:
name: z_index
description: z-index of the frame in the tiltseries
from_schema: cdp-dataset-config
exact_mappings:
- per_section_z_index
range: integer
required: true
minimum_value: 0
defocus:
name: defocus
description: defocus amount
from_schema: cdp-dataset-config
exact_mappings:
- per_section_defocus
range: float
minimum_value: 100
maximum_value: 100
unit:
symbol: µm
descriptive_name: microns
astigmatism:
name: astigmatism
description: Astigmatism amount for this frame
from_schema: cdp-dataset-config
exact_mappings:
- per_section_astigmatism
range: float
astigmatic_angle:
name: astigmatic_angle
description: Angle of ast
from_schema: cdp-dataset-config
exact_mappings:
- per_section_astigmatic_angle
range: float
minimum_value: -180
maximum_value: 180
unit:
symbol: °
descriptive_name: degrees
PerSectionAlignmentParameters:
manasaV3 marked this conversation as resolved.
Show resolved Hide resolved
name: PerSectionAlignmentParameters
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • The in_plane_rotation field will be a collection of 4 float values. Should we make it a vector or a string?
  • The beam_tilt field is not going to be supported for now.
  • We should add support for the is_canonical boolean field and the float volume_x_rotation.

Copy link
Contributor Author

@jgadling jgadling Sep 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Supporting vectors and other strongly typed json fields is pretty doable in the API - we already support 2d arays of floats, so supporting 1d arrays is easy to add. I haven't tried to add complex types to the client before though, so that could get interesting. Do you think in_plane_rotation would be best represented as a list of floats?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@uermel Could we have your thoughts on what is the best way to represent in_plane_rotation for the end user?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Decision: This will be a 2d rotation matrix, basically list[list[float]]

annotations:
Expand Down Expand Up @@ -1726,22 +1697,14 @@ classes:
unit:
symbol: Å
descriptive_name: Angstrom
in_plane_rotation:
name: in_plane_rotation
description: In-plane rotation of the projection in degrees
from_schema: cdp-dataset-config
exact_mappings:
- per_section_alignment_in_plane_rotation
volume_x_rotation:
description: X-axis rotation in degrees
range: float
unit:
symbol: °
descriptive_name: degrees
beam_tilt:
name: beam_tilt
description: Beam tilt during projection in degrees
from_schema: cdp-dataset-config
exact_mappings:
- per_section_alignment_beam_tilt
in_plane_rotation:
description: In-plane rotation of the projection in degrees
range: float
unit:
symbol: °
Expand Down Expand Up @@ -1800,6 +1763,18 @@ classes:
range: Frame
annotations:
cascade_delete: true
gain_files:
jgadling marked this conversation as resolved.
Show resolved Hide resolved
multivalued: true
inverse: GainFile.run
range: GainFile
annotations:
cascade_delete: true
frame_acquisition_files:
multivalued: true
inverse: FrameAcquisitionFile.run
range: FrameAcquisitionFile
annotations:
cascade_delete: true
tiltseries:
name: tiltseries
from_schema: cdp-dataset-config
Expand Down Expand Up @@ -1869,15 +1844,6 @@ classes:
multivalued: true
annotations:
cascade_delete: true
per_section_parameters:
name: per_section_parameters
description: Record how frames get mapped to Tiltseries
from_schema: cdp-dataset-config
multivalued: true
inverse: PerSectionParameters.tiltseries
range: PerSectionParameters
annotations:
cascade_delete: true
run:
name: run
from_schema: cdp-dataset-config
Expand Down Expand Up @@ -1918,20 +1884,6 @@ classes:
exact_mappings:
- tiltseries_https_mrc_file
range: string
s3_collection_metadata:
name: s3_collection_metadata
description: S3 path to the collection metadata file for this tiltseries
from_schema: cdp-dataset-config
exact_mappings:
- tiltseries_s3_collection_metadata
range: string
https_collection_metadata:
name: https_collection_metadata
description: HTTPS path to the collection metadata file for this tiltseries
from_schema: cdp-dataset-config
exact_mappings:
- tiltseries_https_collection_metadata
range: string
s3_angle_list:
name: s3_angle_list
description: S3 path to the angle list file for this tiltseries
Expand All @@ -1946,20 +1898,6 @@ classes:
exact_mappings:
- tiltseries_https_angle_list
range: string
s3_gain_file:
name: s3_gain_file
description: S3 path to the gain file for this tiltseries
from_schema: cdp-dataset-config
exact_mappings:
- tiltseries_s3_gain_file
range: string
https_gain_file:
name: https_gain_file
description: HTTPS path to the gain file for this tiltseries
from_schema: cdp-dataset-config
exact_mappings:
- tiltseries_https_gain_file
range: string
acceleration_voltage:
name: acceleration_voltage
description: Electron Microscope Accelerator voltage in volts
Expand Down Expand Up @@ -2193,13 +2131,6 @@ classes:
- tiltseries_aligned_tiltseries_binning
range: integer
minimum_value: 0
frames_count:
name: frames_count
description: Number of frames associated with this tiltseries
from_schema: cdp-dataset-config
exact_mappings:
- frames_count
range: integer
TomogramAuthor:
name: TomogramAuthor
annotations:
Expand Down Expand Up @@ -2295,6 +2226,7 @@ classes:
from_schema: cdp-dataset-config
mixins:
- IDMixin
- DateStampedEntityMixin
attributes:
alignment:
name: alignment
Expand Down Expand Up @@ -2417,11 +2349,18 @@ classes:
range: string
required: true
description: Name of software used for reconstruction
is_canonical:
name: is_canonical
description: Is this tomogram considered the canonical tomogram for the run experiment? True=Yes
from_schema: cdp-dataset-config
is_portal_standard:
description: whether this tomogram adheres to portal standards
range: boolean
ifabsent: false
is_author_submitted:
description: Whether this tomogram was submitted by the author of the dataset it belongs to.
range: boolean
ifabsent: false
is_visualization_default:
description: Data curator’s subjective choice of default tomogram to display in visualization for a run
range: boolean
ifabsent: false
jgadling marked this conversation as resolved.
Show resolved Hide resolved
s3_omezarr_dir:
name: s3_omezarr_dir
description: S3 path to this tomogram in multiscale OME-Zarr format
Expand Down Expand Up @@ -2533,6 +2472,16 @@ classes:
required: true
# TODO - is this reasonable?
ifabsent: false
publications:
description: Comma-separated list of DOIs for publications associated with the tomogram.
range: string
recommended: true
pattern: (^(doi:)?10\.[0-9]{4,9}/[-._;()/:a-zA-Z0-9]+(\s*,\s*(doi:)?10\.[0-9]{4,9}/[-._;()/:a-zA-Z0-9]+)*$)|(^(doi:)?10\.[0-9]{4,9}/[-._;()/:a-zA-Z0-9]+(\s*,\s*(doi:)?10\.[0-9]{4,9}/[-._;()/:a-zA-Z0-9]+)*$)
related_database_entries:
description: 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.
range: string
recommended: true
pattern: (^(EMPIAR-[0-9]{5}|EMD-[0-9]{4,5}|pdb[0-9a-zA-Z]{4,8})(\s*,\s*(EMPIAR-[0-9]{5}|EMD-[0-9]{4,5}|pdb[0-9a-zA-Z]{4,8}))*$)|(^(EMPIAR-[0-9]{5}|EMD-[0-9]{4,5}|pdb[0-9a-zA-Z]{4,8})(\s*,\s*(EMPIAR-[0-9]{5}|EMD-[0-9]{4,5}|pdb[0-9a-zA-Z]{4,8}))*$)
DateStampedEntityMixin:
name: DateStampedEntityMixin
description: A set of dates at which a data item was deposited, published and
Expand Down
Loading