Skip to content

Fix bug with relion compatibility joboptions

Matthew Iadanza requested to merge fix-joinstar-bug into main

Relion has 4 fields for file entries called fn_1, fn_2, fn_3, and fn_4. Because the pipeliner job uses a list from a MultiFileNameJobOption these must be recreated in the job.star file with dummy JobOptions created by:

for n, f in enumerate(files):
    self.joboptions[f"fn_{jtype}{n+1}"].value = f

The issuse was if there were more then 4 files in the list it attempts to set a nonexistent JobOption fn_5.

Added a break after the original 4 are created to prevent this error.

for n, f in enumerate(files):
    if n == 5:
        break
    self.joboptions[f"fn_{jtype}{n+1}"].value = f

Merge request reports