bihealth / sodar-server

SODAR: System for Omics Data Access and Retrieval
https://github.com/bihealth/sodar-server
MIT License
14 stars 3 forks source link

Generic assay plugin: Samplesheets cache update fails if RowPath built from ontology column #1984

Closed sellth closed 2 months ago

sellth commented 2 months ago

I want to use the generic assay plugin with a new empty project. ISA-tab upload works fine, the samplesheet table is displayed. After the iRODS collections are created however the samplesheets app does not load anymore and this is in the logs:

sodar-celeryd-default_1  | 2024-08-30 14:58:46,807 [ERROR] samplesheets.tasks_celery: Cache update failed for project "Crashtest" (0505fa4a-efdf-4650-97ca-0498042ff64e): sequence item 1: expected str instance, list found
sellth commented 2 months ago

Looking more into what's happening. It seems like passing ontology-backed columns in Comment[SODAR Assay Row Path x] is causing this.

/home/thomas/Code/sodar-server/samplesheets/assayapps/generic/plugins.py, line 128, in get_row_path

for column_name in data_columns:
    col_value = self._get_col_value(column_name, row, table)
    if col_value:
        data_collections.append(col_value)

# Build iRODS path from list and stop at first None value
if data_collections:
    data_path = '/' + '/'.join(data_collections)
    return assay_path + data_path

return None

Local vars:

col_value = [{'accession': 'http://purl.obolibrary.org/obo/MS_1000242',
              'name': 'Positive scan',
              'ontology_name': 'OBI'}]

data_collections = ['Plate-002',
                    [{'accession': 'http://purl.obolibrary.org/obo/MS_1000242',
                      'name': 'Positive scan',
                      'ontology_name': 'OBI'}]]
mikkonie commented 2 months ago

Fixed by @sellth, closed.