Trouble isolating filament extremities

Hi everyone,

I’m trying to visualize only the extremities (start and end) of filament-shaped particles, but I’m having trouble isolating them effectively in CryoSPARC.

Here’s what I’ve tried so far:

  • I manually picked ~4000 particles corresponding to the filament ends using the Manual Picker.
  • Then I trained Deep Picker using these particles, but the model still ends up selecting entire filaments, not just the extremities.
  • I also tried using Topaz, but I keep encountering errors during the training step.

Has anyone successfully isolated and processed only the filament ends? I’d appreciate any suggestions or workflow tips — especially if you’ve tried particle subtraction or focused classification.

Thanks in advance!

Topaz is the way to go. What errors are you encountering, and what version of topaz?

Hi,

Thank you for your reply!

I’m using Topaz version 0.2.5.
Please find the error message below:

[CPU: 257.4 MB Avail: 227.93 GB]

WARNING: no micrograph found matching image name “013117323519443128231_FoilHole_2494191_Data_2455121_27_20240505_182653_EER_patch_aligned_doseweighted”. Skipping it.
[CPU: 257.4 MB Avail: 227.93 GB]

WARNING: no micrograph found matching image name “012290055039585680394_FoilHole_2494174_Data_2455121_11_20240505_173626_EER_patch_aligned_doseweighted”. Skipping it.
[CPU: 257.4 MB Avail: 227.93 GB]

WARNING: no micrograph found matching image name “010384470680063819598_FoilHole_2494204_Data_2455112_24_20240505_173738_EER_patch_aligned_doseweighted”. Skipping it.
[CPU: 257.4 MB Avail: 227.93 GB]

Traceback (most recent call last):
[CPU: 257.4 MB Avail: 227.93 GB]

File “/programs/x86_64-linux/topaz/0.2.5/bin/topaz”, line 8, in
[CPU: 257.4 MB Avail: 227.93 GB]

sys.exit(main())
[CPU: 257.4 MB Avail: 227.93 GB]

File “/programs/x86_64-linux/topaz/0.2.5/topaz_extlib/miniconda3-4.8.2-b5qb/lib/python3.8/site-packages/topaz/main.py”, line 148, in main
[CPU: 257.4 MB Avail: 227.93 GB]

args.func(args)
[CPU: 257.4 MB Avail: 227.93 GB]

File “/programs/x86_64-linux/topaz/0.2.5/topaz_extlib/miniconda3-4.8.2-b5qb/lib/python3.8/site-packages/topaz/commands/train_test_split.py”, line 128, in main
[CPU: 257.4 MB Avail: 227.93 GB]

image_list_train = pd.DataFrame({‘image_name’: image_names_train, ‘path’: paths_train})
[CPU: 257.4 MB Avail: 227.93 GB]

File “/programs/x86_64-linux/topaz/0.2.5/topaz_extlib/miniconda3-4.8.2-b5qb/lib/python3.8/site-packages/pandas/core/frame.py”, line 468, in init
[CPU: 257.4 MB Avail: 227.93 GB]

mgr = init_dict(data, index, columns, dtype=dtype)
[CPU: 257.4 MB Avail: 227.93 GB]

File “/programs/x86_64-linux/topaz/0.2.5/topaz_extlib/miniconda3-4.8.2-b5qb/lib/python3.8/site-packages/pandas/core/internals/construction.py”, line 283, in init_dict
[CPU: 257.4 MB Avail: 227.93 GB]

return arrays_to_mgr(arrays, data_names, index, columns, dtype=dtype)
[CPU: 257.4 MB Avail: 227.93 GB]

File “/programs/x86_64-linux/topaz/0.2.5/topaz_extlib/miniconda3-4.8.2-b5qb/lib/python3.8/site-packages/pandas/core/internals/construction.py”, line 78, in arrays_to_mgr
[CPU: 257.4 MB Avail: 227.93 GB]

index = extract_index(arrays)
[CPU: 257.4 MB Avail: 227.93 GB]

File “/programs/x86_64-linux/topaz/0.2.5/topaz_extlib/miniconda3-4.8.2-b5qb/lib/python3.8/site-packages/pandas/core/internals/construction.py”, line 397, in extract_index
[CPU: 257.4 MB Avail: 227.93 GB]

raise ValueError(“arrays must all be same length”)
[CPU: 257.4 MB Avail: 227.93 GB]

ValueError: arrays must all be same length

[CPU: 257.4 MB Avail: 227.94 GB]

Traceback (most recent call last):
File “cryosparc_master/cryosparc_compute/run.py”, line 129, in cryosparc_master.cryosparc_compute.run.main
File “/appdata/cryosparc/cryosparc_worker/cryosparc_compute/jobs/topaz/run_topaz.py”, line 332, in run_topaz_wrapper_train
utils.run_process(split_command)
File “/appdata/cryosparc/cryosparc_worker/cryosparc_compute/jobs/topaz/topaz_utils.py”, line 99, in run_process
assert process.returncode == 0, f"Subprocess exited with status {process.returncode} ({str_command})"
AssertionError: Subprocess exited with status 1 (/programs/x86_64-linux/topaz/0.2.5/bin/topaz train_test_split --number 50 --seed 1761975313 --image-dir /data/Projects-CryoEM/CS-ndh-2/J625/extract /data/Projects-CryoEM/CS-ndh-2/J636/topaz_particles_processed.txt)

It can’t find (at least some of) the micrographs. Is it possible that the original Patch Motion job was cleared?

Thanks for pointing that out!

I’ve checked, and the original Patch Motion job has not been deleted — the micrographs are still present in the project directory.

I’m not sure why Topaz can’t find them, since I’m using the output micrographs directly from that job.