Topaz in cryosparc giving error


Hello Evereyone

I am getting the following error while using Topaz in Cryosparc. Attached are the event log file and the input parameters. I would really appreciate if anyone help me to resolve the issue.

TypeError: concat() takes 1 positional argument but 2 were given

Faisal

@khajafaisaltarique Please can you post the full error message as text.

Hi

This is the text

License is valid.

Launching job on lane default target sn4622122373 ...

Running job on master node hostname sn4622122373
[CPU:   89.4 MB  Avail: 493.36 GB]

Job J18 Started
[CPU:   89.4 MB  Avail: 493.35 GB]

Master running v4.6.0, worker running v4.6.0
[CPU:   89.4 MB  Avail: 493.32 GB]

Working in directory: /data/DataSets/eBIC_2024/N600-Dimer-QF/CS-dimer-n600a/J18
[CPU:   89.4 MB  Avail: 493.31 GB]

Running on lane default
[CPU:   89.4 MB  Avail: 493.31 GB]

Resources allocated: 
[CPU:   89.4 MB  Avail: 493.31 GB]

  Worker:  sn4622122373
[CPU:   89.4 MB  Avail: 493.31 GB]

  CPU   :  [2, 3, 4, 5, 6, 7, 8, 9]
[CPU:   89.4 MB  Avail: 493.30 GB]

  GPU   :  [1]
[CPU:   89.4 MB  Avail: 493.27 GB]

  RAM   :  [1]
[CPU:   89.4 MB  Avail: 493.26 GB]

  SSD   :  False
[CPU:   89.4 MB  Avail: 493.25 GB]

--------------------------------------------------------------
[CPU:   89.4 MB  Avail: 493.24 GB]

Importing job module for job type topaz_train...
[CPU:  262.4 MB  Avail: 493.28 GB]

Job ready to run
[CPU:  262.4 MB  Avail: 493.28 GB]

***************************************************************
[CPU:  262.4 MB  Avail: 493.26 GB]

Topaz is a particle detection tool created by Tristan Bepler and Alex J. Noble.
Citations:
- Bepler, T., Morin, A., Rapp, M. et al. Positive-unlabeled convolutional neural networks for particle picking in cryo-electron micrographs. Nat Methods 16, 1153-1160 (2019) doi:10.1038/s41592-019-0575-8
- Bepler, T., Noble, A.J., Berger, B. Topaz-Denoise: general deep denoising models for cryoEM. bioRxiv 838920 (2019) doi: https://doi.org/10.1101/838920

Structura Biotechnology Inc. and cryoSPARC do not license Topaz nor distribute Topaz binaries. Please ensure you have your own copy of Topaz licensed and installed under the terms of its GNU General Public License v3.0, available for review at: https://github.com/tbepler/topaz/blob/master/LICENSE.
***************************************************************

[CPU:  319.3 MB  Avail: 492.63 GB]

Starting Topaz process using version 0.2.5a...
[CPU:  319.3 MB  Avail: 492.63 GB]

Random seed used is 593343475
[CPU:  319.3 MB  Avail: 492.63 GB]

--------------------------------------------------------------
[CPU:  319.3 MB  Avail: 492.63 GB]

Starting preprocessing...

[CPU:  319.3 MB  Avail: 492.63 GB]

Using a downsampling factor of 12
[CPU:  319.3 MB  Avail: 492.62 GB]

Starting micrograph preprocessing by running command /usr/local/miniconda/bin/topaz preprocess --scale 12 --niters 200 --num-workers 4 -o /data/DataSets/eBIC_2024/N600-Dimer-QF/CS-dimer-n600a/J18/preprocessed [500 MICROGRAPH PATHS EXCLUDED FOR LEGIBILITY]

[CPU:  319.3 MB  Avail: 492.62 GB]

Preprocessing over 2 processes...
[CPU:  319.3 MB  Avail: 493.36 GB]

Inverting negative staining...
[CPU:  319.3 MB  Avail: 493.36 GB]

Inverting negative staining complete.

[CPU:  319.3 MB  Avail: 493.36 GB]

Micrograph preprocessing command complete.

[CPU:  319.3 MB  Avail: 493.37 GB]

Starting particle pick preprocessing by running command /usr/local/miniconda/bin/topaz convert --down-scale 12 --threshold 0 -o /data/DataSets/eBIC_2024/N600-Dimer-QF/CS-dimer-n600a/J18/topaz_particles_processed.txt /data/DataSets/eBIC_2024/N600-Dimer-QF/CS-dimer-n600a/J18/topaz_particles_raw.txt

[CPU:  319.3 MB  Avail: 493.40 GB]

Particle pick preprocessing command complete.

[CPU:  319.3 MB  Avail: 493.40 GB]

Preprocessing done in 36.490s.
[CPU:  319.3 MB  Avail: 493.40 GB]

--------------------------------------------------------------
[CPU:  319.3 MB  Avail: 493.40 GB]

Starting train-test splitting...

[CPU:  319.3 MB  Avail: 493.40 GB]

Starting dataset splitting by running command /usr/local/miniconda/bin/topaz train_test_split --number 77 --seed 593343475 --image-dir /data/DataSets/eBIC_2024/N600-Dimer-QF/CS-dimer-n600a/J18/preprocessed /data/DataSets/eBIC_2024/N600-Dimer-QF/CS-dimer-n600a/J18/topaz_particles_processed.txt

[CPU:  319.3 MB  Avail: 492.94 GB]

# splitting 388 micrographs with 7947 labeled particles into 311 train and 77 test micrographs
[CPU:  319.3 MB  Avail: 492.93 GB]

Traceback (most recent call last):
[CPU:  319.3 MB  Avail: 492.92 GB]

File "/usr/local/miniconda/bin/topaz", line 33, in <module>
[CPU:  319.3 MB  Avail: 492.92 GB]

sys.exit(load_entry_point('topaz-em==0.2.5', 'console_scripts', 'topaz')())
[CPU:  319.3 MB  Avail: 492.91 GB]

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[CPU:  319.3 MB  Avail: 492.90 GB]

File "/usr/local/miniconda/lib/python3.12/site-packages/topaz/main.py", line 148, in main
[CPU:  319.3 MB  Avail: 492.89 GB]

args.func(args)
[CPU:  319.3 MB  Avail: 492.89 GB]

File "/usr/local/miniconda/lib/python3.12/site-packages/topaz/commands/train_test_split.py", line 108, in main
[CPU:  319.3 MB  Avail: 492.88 GB]

targets_train = pd.concat(groups_train, 0)
[CPU:  319.3 MB  Avail: 492.88 GB]

^^^^^^^^^^^^^^^^^^^^^^^^^^
[CPU:  319.3 MB  Avail: 492.87 GB]

TypeError: concat() takes 1 positional argument but 2 were given
[CPU:  319.3 MB  Avail: 493.09 GB]

Traceback (most recent call last):
  File "cryosparc_master/cryosparc_compute/run.py", line 116, in cryosparc_master.cryosparc_compute.run.main
  File "/home/cryosparc_user/software/cryosparc/cryosparc_worker/cryosparc_compute/jobs/topaz/run_topaz.py", line 332, in run_topaz_wrapper_train
    utils.run_process(split_command)
  File "/home/cryosparc_user/software/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 (/usr/local/miniconda/bin/topaz train_test_split --number 77 --seed 593343475 --image-dir /data/DataSets/eBIC_2024/N600-Dimer-QF/CS-dimer-n600a/J18/preprocessed /data/DataSets/eBIC_2024/N600-Dimer-QF/CS-dimer-n600a/J18/topaz_particles_processed.txt)

Faisal

You may want to install Topaz into a newly created conda environment with python version 3.6.
As of October 2024, the topaz installation section suggests that the environment be created with

conda create -n topaz python=3.6

Does activating that environment and installing topaz therein resolve

?

I agree. This could be the issue. I will update on this soon.