Skip to content

Commit 46bac45

Browse files
Add section on cryo-et portal to doc
1 parent a70d580 commit 46bac45

File tree

4 files changed

+46
-0
lines changed

4 files changed

+46
-0
lines changed

doc/start_page.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,3 +124,10 @@ Domain adaptation is implemented in `synapse_net.training.domain_adaptation`. Yo
124124

125125
We also provide functionality for 'regular' neural network training. In this case, you have to provide data **and** manual annotations for the structure(s) you want to segment.
126126
This functionality is implemented in `synapse_net.training.supervised_training`. You can find an example script that shows how to use it [here](https://github.com/computational-cell-analytics/synapse-net/blob/main/examples/network_training.py).
127+
128+
## Segmentation for the CryoET Data Portal
129+
130+
We have published segmentation results for tomograms of synapses stored in the [CryoET Data Portal](https://cryoetdataportal.czscience.com/). So far we have made the following depositions:
131+
- [CZCDP-10330](https://cryoetdataportal.czscience.com/depositions/10330): Contains synaptic vesicle segmentations for over 50 tomograms of synaptosomes. The segmentations were made with a model domain adapted to the synaptosome tomograms.
132+
133+
The scripts for the submissions can be found in [scripts/cryo/cryo-et-portal](https://github.com/computational-cell-analytics/synapse-net/tree/main/scripts/cryo/cryo-et-portal).
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
credentials.portal
2+
sync_with_s3.sh
3+
segmentations/
4+
upload_CZCDP-10330/
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Segmentation for the CryoET Data Portal
2+
3+
Scripts to prepare submissions for the [CryoET Data Portal](https://cryoetdataportal.czscience.com).
4+
5+
We have created the following submissions for the portal:
6+
- [CZCDP-10330](https://cryoetdataportal.czscience.com/depositions/10330): synaptic vesicles segmented in tomograms of synaptosomes.
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import os
2+
from glob import glob
3+
from pathlib import Path
4+
from shutil import move
5+
6+
import cryoet_data_portal as cdp
7+
from tqdm import tqdm
8+
9+
10+
def main():
11+
input_folder = "segmentations"
12+
output_root = "upload_CZCDP-10330"
13+
14+
client = cdp.Client()
15+
16+
tomograms = sorted(glob(os.path.join("segmentations/*.ome.zarr")))
17+
for input_file in tqdm(tomograms, desc="Formatting submission"):
18+
tomo_id = Path(input_file).stem
19+
tomo_id = int(Path(tomo_id).stem)
20+
21+
tomo = cdp.Tomogram.get_by_id(client, tomo_id)
22+
output_folder = os.path.join(output_root, str(tomo.run.dataset_id))
23+
os.makedirs(output_folder, exist_ok=True)
24+
output_file = os.path.join(output_folder, f"{tomo.run.name}.zarr")
25+
move(input_file, output_file)
26+
27+
28+
if __name__ == "__main__":
29+
main()

0 commit comments

Comments
 (0)