@leetleyang You can modify lane order by running cryosparcm icli
in a shell of the Linux user that owns the cryosparc instance, like so:
$ cryosparcm icli
Python 3.7.10 | packaged by conda-forge | (default, Feb 19 2021, 16:07:37)
Type 'copyright', 'credits' or 'license' for more information
IPython 7.27.0 -- An enhanced Interactive Python. Type '?' for help.
connecting to XXXXXXXXXXXXXXXXXXXXXXXXX ...
cli, rtp, db, gfs and tools ready to use
In [1]: lanes = cli.get_scheduler_lanes()
In [2]: lanes
Out[2]:
[{'desc': '', 'name': 'cryoem', 'title': 'cryoem', 'type': 'node'},
{'desc': '', 'name': 'cryoem2', 'title': 'cryoem2', 'type': 'node'},
{'desc': '', 'name': 'cryoem3', 'title': 'cryoem3', 'type': 'node'},
{'desc': '', 'name': 'cryoem4', 'title': 'cryoem4', 'type': 'node'},
{'desc': '',
'name': 'cryoem5',
'title': 'Lane cryoem5 (node)',
'type': 'node'},
{'desc': '', 'name': 'cryoem6', 'title': 'cryoem6', 'type': 'node'},
{'desc': '', 'name': 'cryoem7', 'title': 'cryoem7', 'type': 'node'}]
In [3]: lanes[4], lanes[5] = lanes[5], lanes[4]
In [4]: cli.set_config_var(name="lanes", value=lanes, colname="sched_config")
Out[4]
[{'desc': '', 'name': 'cryoem', 'title': 'cryoem', 'type': 'node'},
{'desc': '', 'name': 'cryoem2', 'title': 'cryoem2', 'type': 'node'},
{'desc': '', 'name': 'cryoem3', 'title': 'cryoem3', 'type': 'node'},
{'desc': '', 'name': 'cryoem4', 'title': 'cryoem4', 'type': 'node'},
{'desc': '', 'name': 'cryoem6', 'title': 'cryoem6', 'type': 'node'},
{'desc': '',
'name': 'cryoem5',
'title': 'Lane cryoem5 (node)',
'type': 'node'},
{'desc': '', 'name': 'cryoem7', 'title': 'cryoem7', 'type': 'node'}]
In [5]:
In this example, the 5th and 6th lanes are swapped.
- The original lane configuration is copied into a python list with
cli.get_scheduler_lanes()
.
- The relevant elements of that list are swapped (
In [3]:
).
- The cryosparc configuration is updated with
cli.set_config_var()
.
This works most easily if you can identify a pair of lanes that you wish to swap. Note that list indices in python start with 0, not 1; the fifth element thus has index 4.
You should back up the database before running the commands.