nfdi4plants / ARCtrl

Library for management of Annotated Research Contexts (ARCs) using an in-memory representation and runtime-agnostic contract systems.
MIT License
11 stars 7 forks source link

[Feature Request]: Create unified function to check if worksheet name belongs to certain file (+ obsolete) #414

Open micwij opened 3 weeks ago

micwij commented 3 weeks ago

Contact Details

micwij@gmail.com

Is your feature request related to a problem?

I am currently a bit stuck with an old ARC that was created some time ago with the ARCCommander, which does not open in the ARCitect. So to edit annotations I can neither use the Swate from within ARCitect nor, the Swate excel addin because these are managed by my institution.

Describe the solution you would like!

For this very specific case it would be great to be able to re-import existing isa.assay.xlsx tables and I think this might generally be useful.

Additional context!

See: https://github.com/nfdi4plants/ARCCommander/issues/240

Host

Standalone

Host Details

Swate: Standalone Browser: Microsoft Edge

Freymaurer commented 3 weeks ago

Hello, thank you for the feedback! Can you send me a copy of the relevant file? And tell me which table triggers the issue?

micwij commented 3 weeks ago

Yes sure. Here is the file: isa.assay.xlsx

If I try to use import it shows this error:

image

I just assumed that this means the import function isn't currently able to accept already filled files and expects a template file, which would maybe have the metadata sheet.

Freymaurer commented 3 weeks ago

No it seems to refer to this sheet:

image

Modern assays (since ARCtrl) call this sheet isa_assay.

We do have obsolete name handling. But in Swate i tried to infer the uploaded file type by the existence of a metadata sheet name and forgot to add the obsolete handling. Will fix!

Freymaurer commented 3 weeks ago

Done! This will be fixed with the next Swate version! Will transfer to ARCtrl to unify this logic in ActivePattern

Freymaurer commented 3 weeks ago

@HLWeil i think it would be best to have a function, which verifies if a worksheet name belongs to assay/study/investigation, which checks for current as well as obsolete names.

HLWeil commented 3 weeks ago

Should be easy to implement. Something in the lines of:

ArcAssay.isMetadataSheetName: string -> bool

and

ArcAssay.isMetadataSheet: FsWorksheet -> bool

?

Freymaurer commented 3 weeks ago

Yes! Or even: ArcAssay.tryMetadataSheetName (fswb: FsWorkbook)