genericworkflownodes / GenericKnimeNodes

Base package for GenericKnimeNodes
https://github.com/genericworkflownodes/GenericKnimeNodes
Other
15 stars 16 forks source link

Input Files node: Convert to workflow relative paths broken on Windows #295

Open enetz opened 1 year ago

enetz commented 1 year ago

an example result: knime://knime.workflow/..\Example_Data\file1.mzML

The first part knime://knime.workflow/ seems to only work with forward slashes and is generated correctly. The rest of the path is generated differently depending on the OS and uses \ on Windows. The node does not run with a mix of / and \. Input Files does not allow to paste or manually edit the file paths, so it is not possible to fix these paths in the KNIME GUI.

Workaround: fix the file paths with a text editor directly in the settings.xml file of the node. A workflow that was set up with relative paths only containing / (e.g. on Linux or using the workaround) runs fine on Windows.

jpfeuffer commented 1 year ago

Oh no. Didn't know about that. Thanks for reporting. I am trying to release a major update in the next week where I will add a new node that uses the new KNIME file system protocol. But I will also fix this if possible.

enetz commented 1 year ago

The Input Directory node also seems affected. When I try to configure it, I get this error message: ERROR Input Directory 9:2 Error while creating node dialog for 'Input Directory': KNIME URLs must contain an Authority, fount 'knime:/n\\ime.workflow\..\Example_Data\Labelfree\datasets'

I tried editing the settings.xml manually, but for some reason it still gives the same error message, including the old path, when trying to open the config window. It seems to run through after it is set up correctly, but manually editing this node type is a bit trickier.

jpfeuffer commented 1 year ago

Can you try with this update site? https://abibuilder.cs.uni-tuebingen.de/archive/gkn/updateSite/pr/%24%7BKNIME%7D/294/

enetz commented 1 year ago

Input Files works now. Adding a new file by browsing adds it in standard Windows style with \, but converting to workflow relative paths now makes paths with only /. Both types work, so this is solved.

But Input Directory still returns the same error and doesn't let me open the config window.

enetz commented 1 year ago

FYI that link didn't work directly. I had to replace %24%7BKNIME%7D with ${KNIME} to make KNIME recognize the update site. This can't be copied directly neither from your link, nor from the browser after opening the site.

jpfeuffer commented 1 year ago

Yes the KNIME variable thing is fixed. I just did not rebuild the job.

Regarding Input Directory.. hmm so what exactly are you doing there? Can you reset the node? I feel like without a reconfiguration it won't work/open the dialogue because the settings.xml is essentially corrupted. Unfortunately you cannot drag a new node since this node is deprecated.

enetz commented 1 year ago

I manually edited this line in the settings.xml:

    <config key="model">
        <entry key="directory" type="xstring" value="knime://knime.workflow/../Example_Data/iPRG2015/database"/>

The settings.xml does not contain the directory Example_Data\Labelfree\datasets anywhere. When I run it, it runs through without issues.

The error mentioned above (with Example_Data\Labelfree\datasets for some reason) shows up in the console when I double click or right click and try to configure it. No config window shows up either. (I assume there is supposed to be a way to configure it through the GUI, but I haven't seen it yet.) This happens always, no matter whether the node was run or reset. Deleting the settings.xml just gives another error and removes the node, so I can't really test a fresh one I guess.

jpfeuffer commented 1 year ago

The settings.xml does not contain the directory Example_Data\Labelfree\datasets anywhere. When I run it, it runs through without issues.

Whaat? This sounds weird.

jpfeuffer commented 1 year ago

Sorry but I cannot reproduce. Just downloaded the ProteomicsLFQ+MSstatspostprocessing workflow and was easily able to configure Input Directory and change the URL to the actually much better "knime://knime.mountpoint/Example_Data/iPRG2015". (But also the old workflow/.. URL worked).

By the way, archive needs to be cleaned up desperately! iPRG2015 is not in the Example_Data. It needs a COMPLETE overhaul. Users need to be able to just download a zipped archive and put it in their KNIME workspace/mountpoint.

@timosachsenberg @poshul

timosachsenberg commented 1 year ago

zipped archive of what? all example data? per workflow?

timosachsenberg commented 1 year ago

or ftp?

jpfeuffer commented 1 year ago

just compiling all example data would be fine. you can download an archive via our HTTP UI. FTP with all data and the corresponding changes in the KNIME workflows (use FTP Connector) even better. FTP per workflow best. (You can do softlinks on our archive to share data between workflow inputs). Hmm but it might download multiple times then, unless you configure it to the same folder and use "Skip existing".

enetz commented 1 year ago

Probably not the right place to discuss this, but some of the test data should also be reconsidered. There are some problems with some old data, like I think the iPRG2015 data doesn't work with the CometAdapter, because it isn't indexed or something (not a big problem, since the default labelfree data works and we don't use Comet often in those workflows). The TMT MSstats workflow has the isobaric_MSV000084264 (35 GB) set as the example data, and the DIAMetAlyzer (25 GB) isn't better. I think there is a smaller TMT dataset in the example data, but I am not sure whether that is compatible with that wokflow. Even the default labelfree dataset can take quite some time to run through if it's just for a quick sanity check.

Preferably we should have Example Data for users to see some real results, and some tiny sanity check datasets to check for node compatibility etc.