Reordering lanes

Hi,

Apologies if this has been covered before. Is there a way of reordering the submission lanes beyond the initial order of addition?

I often find myself having to tweak template parameters for one-off workflows by creating ad hoc lanes. For my sanity, it would be nice if the custom lane could be organised next to the parental without having to delete and re-add all the subsequent lanes.

Alternatively (or additionally?), perhaps an additional job field where users could specify cluster submission arguments would be helpful, e.g. to increase memory request, specify nodelist exclusion/inclusion, etc.

Cheers,
Yang

@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.

  1. The original lane configuration is copied into a python list with cli.get_scheduler_lanes().
  2. The relevant elements of that list are swapped (In [3]:).
  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.

3 Likes

Many thanks!

Cheers,
Yang