Skip to content

added cdp tomogram filter for no_processing and added environment to … #118

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions environment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,10 @@ dependencies:
- torchvision
- trimesh
- zarr < 3
- ome-zarr
- s3fs
- botocore=1.37.1
- aiobotocore=2.21.1
- pip:
- napari-skimage-regionprops
- cryoet_data_portal
13 changes: 9 additions & 4 deletions synapse_net/file_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ def read_data_from_cryo_et_portal_run(
The data read from the run.
The voxel size read from the run.
"""
assert id_field in ("id", "run_id")
assert id_field in ("id", "run_id", "deposition_id")
if output_path is not None and os.path.exists(output_path):
return read_ome_zarr(output_path) if use_zarr_format else read_mrc(output_path)

Expand All @@ -190,9 +190,14 @@ def read_data_from_cryo_et_portal_run(
client = cdp.Client()

fs = s3fs.S3FileSystem(anon=True)
tomograms = cdp.Tomogram.find(
client, [getattr(cdp.Tomogram, id_field) == run_id, cdp.Tomogram.processing == processing_type]
)
if processing_type is not None:
tomograms = cdp.Tomogram.find(
client, [getattr(cdp.Tomogram, id_field) == run_id, cdp.Tomogram.processing == processing_type]
)
else:
tomograms = cdp.Tomogram.find(
client, [getattr(cdp.Tomogram, id_field) == run_id]
)
if len(tomograms) == 0:
return None, None
if len(tomograms) > 1:
Expand Down