nfdi4plants / ARCCommander

Tool to manage your ARCs
MIT License
11 stars 9 forks source link

[BUG] arc assay add fails in a large arc #152

Open kMutagene opened 2 years ago

kMutagene commented 2 years ago

Describe the bug arc assay add fails in https://git.nfdi4plants.org/kMutagene/arabidopsis_thaliana_transcriptome

creating the assay works, but the register step fails with

ERROR: System.NullReferenceException: Object reference not set to an instance of an object.
   at ISADotNet.XLSX.StudyFile.Study.studyMetaData@65.Invoke(SheetData sheet)
   at ISADotNet.XLSX.StudyFile.Study.fromSpreadsheet(SpreadsheetDocument doc)
   at ISADotNet.XLSX.StudyFile.Study.fromFile(String path)
   at ArcCommander.APIs.AssayAPI.register(ArcConfiguration arcConfiguration, FSharpMap`2 assayArgs)
   at ArcCommander.Program.handleAssaySubCommands@180-1.Invoke(ArcConfiguration arcConfiguration, FSharpMap`2 assayArgs)
   at ArcCommander.Program.processCommand[a,T](ArcConfiguration arcConfiguration, FSharpFunc`2 commandF, ParseResults`1 r)
   at ArcCommander.Program.handleAssaySubCommands(ArcConfiguration arcConfiguration, AssayCommand assayVerb)
   at ArcCommander.Program.handleCommand(ArcConfiguration arcConfiguration, ArcCommand command)
   at ArcCommander.Program.main(String[] argv) Object reference not set to an instance of an object.

To Reproduce

  1. Download the above linked arc
  2. arc add register -s DRP000209 -a Data_aggregation

Expected behavior assay gets created and registered in target study

OS and framework information (please complete the following information):

Additional context Studies have been created programmatically using ISA.DotNet, and registering them with arc study register worked like a charm.

omaus commented 2 years ago

@HLWeil The bug most likely occurs here: https://github.com/nfdi4plants/ISADotNet/blob/f81431131c9c27ca56222bbfc94a63c6ffb4c73b/src/ISADotNet.XLSX/StudyFile/Study.fs#L72

Trying to investigate this further...

omaus commented 2 years ago

Okay, this bug does not appear anymore in ISADotNet.Xlsx v0.6.0, but the ArcCommander currently uses the buggy version v0.4.0-preview.5. Unfortunately, the new, bug-free version changed some functions so that backward compatibility does not exist anymore. 🤡

Meaning, I will need to figure out how to fix the now occurring new errors. 😭

This will be part of the upcoming bugfix regarding the bugs around the change in studies due to new ARC-specification version.

HLWeil commented 8 months ago

Used this as a testcase for checking if IO speed is enough for these huge metadata files. Study parsing speed is totally fine, but parsing the Investigation file takes 15 minutes on my machine.

HLWeil commented 8 months ago

FsSpreadsheet was the main culprit: https://github.com/fslaborg/FsSpreadsheet/pull/81