REST nodes available as nightly build

The KREST extension (KNIME REST integration) is now available as nightly build. There are still some childhood diseases in them (although nothing that affects the basic functions) which I hope to fix by the end of the week.

Hi Anna,

Many thanks for these nodes, they are a much needed addition to the KNIME node arsenal. 

Before Simon sees this thread, I have a couple of comments/suggestions for improvement. :)

1) Whenever the GET resource node executes, there is a window popping up (APPLET alert) and asking for permission to access the network. Is there a way to suppress it? I can imagine somebody (e.g. myself) using the nodes in a loop and then the pop-up will become annoying.

2) I used this URL as example:

https://www.ebi.ac.uk/unichem/rest/verbose_inchikey/BNRNXUUZRGQAQC-UHFFFAOYSA-N

and the application/json header.

The service returns a json array called src_compound_id which is converted by the Read REST Represantation node as a STRING, e.g.: ["ZINC19796168"]. Would be possible to return json arrays as a KNIME native collection type which is more usable downstream in the workflow?

Many thanks again,

George

 

Hi Anna

I experienced the same „problem“ that was already mentioned by George. When executing the GET Ressource nodes, KNIME brings up a “Applet Alert” window with “This applet is attempting to connect to https://www.ebi.ac.uk/chemblws/compounds/CHEMBL1 (Allow, Disallow, Stop Applet)“.

This might be a problem when running workflows in batch mode. Is there a possibility to suppress this alert?

Best Regards, Frank

Hi Frank,

Specifically for the ChEMBL web services, there are a couple of nodes available as EMBL-EBI community contributions that effectively wrap this functionality:

http://tech.knime.org/book/embl-ebi-nodes

Best regards,

George 

Hi Frank and George,

the APPLET ALERT problems is already known to us. I am working on that. I am not sure yet what is  launching the applet. It seems to have something to do with some java security policies and/or fire wall settings. I let you know as soon I have figured out a solution.

@George: About your second question about the JSON array, could you give me an example of how this should look? Do you mean I should add a special cell type? I found for instance the following array:

 

["WO2000007597A1","WO1999066933A1","EP1020190A3","US6066735","EP1027887A2","US6087362","EP0812845A1","WO2000054773A1","WO2000000199A1","WO2000038655A1","WO2000054777A1","US5250534","WO2000054774A1","EP0995441A3","WO1999066924A1","WO2000004875A2","WO2000072827A2","WO1999059584A1","EP1027888A3","WO2000059475A1","WO2000012076A1","WO2000010542A2","WO2000003721A1","WO1999060985A2","WO1999064033A1","WO2000067735A2","WO1999067231A1","WO1999051252A1","WO1999030697A2","WO1999066870A1","EP1037616A2","WO2000044363A2","WO1999039763A1","WO2000007596A1","WO2000006121A1","WO2000078760A1","WO1999021558A2","WO2000000212A1","US6037346","WO1998055176A1","WO2000040226A2","EP1027054A1","EP1027887A3","WO2000045795A2","EP0967214A1","WO2000043012A1","WO2000051978A1","WO1999027905A1","WO2000057857A1","WO2000050007A1","EP0960621A2","WO2000074652A1","WO1999020251A1","US6075028","WO2000015233A1","WO1999030688A1","EP0812845B1","WO2000053148A2","EP0995441A2","US5955611","WO1999038507A1","EP0951908A2","WO2000066084A1","WO2000012110A2","EP1027888A2","WO2000042992A2","EP0916675A2","WO1999002161A1"]

Best regards,
Anna

Hi Anna,

KNIME has a column type called 'collection' which is used to store and represent arrays in a table. You can do several things with collection columns, such us ungrouping their elements (see also relevant collection nodes). 

If the resulting json array, such as ["WO2000007597A1","WO1999066933A1","EP1020190A3","US6066735", ...]

was outputed as collection type column and not a string one, it would be more useful to the user, I think.

I hope it makes more sense now!

George

 

 

 

 

Hi George,

I have not been aware of such a column type so far. But I agree, that it would make more sense. I will investigate that.

Thanks this much needed addition to knime these are going to be so useful. Although I haven't had chance to play with these nodes, just seeing George's comment, I totally agree that taking advantage of the ListCell/CollectionCell type feature in knime would be really powerful for manipulation downstream in knime when multiple values are output.

simon.

Ok, I have changed the JSON converter, so that it now uses the native collection type for Json arrays. 

 

I also found a way to remove the applet alert pop-up. It has indeed been an anti-virus issue. If it occurs again, let me know.

 

Both adjustments should be available with the next nightly build.

Fabulous! It works like a charm.

Many thanks Anna!

George

 

Hi George

Can you show an example workflow for your UniChem example?

"https://www.ebi.ac.uk/unichem/rest/verbose_inchikey/BNRNXUUZRGQAQC-UHFFF...
and the application/json header"
 

I tried to find the correct configuration, but I got errors.

 

Frank

 

 

Hi Frank,

Try downloading and importing this worklow:

https://dl.dropbox.com/u/22273283/UniChem_NEW.zip

George

 

Hi Anna,

I tried your nodes with a new EBI RESTful service: 

http://europepmc.org/restfulwebservice

When I tried this URL:

http://www.ebi.ac.uk/europepmc/webservices/rest/search/query=p53

with the default application/xml header, the 'Read REST represantation' node flattened the XML response into just one row/record.

Is it possible to retrieve the 25 <result> elements in 25 rows in the table?

Many thanks,

George

Hi George,

thank you for the example workflows.

@Anna: Although George's workflow is running, I found a strange behaviour of the GET Resource node. After downloading the workflow the option "Manual Input" was activated without any given URL, but the node got the URL from its predecessor and the workflow runs without errors.

One can try to activate "Column Selection", but the message is "The settings were not changed. The node will not be reset." But if you open the configuration menu again, you will see "Column Selection" activated.

 

Frank

 

Hi

 

I have been out-of-office for a week that's why it took a little longer.

As for the problem with Column Selection/Manual Selection: This is a bug (the UI is not initialized correctly). I will fix it.

 

The problem with the 25 rows conversion is a little more complicated. The problem here is that the underlying XML representation is not a pure XML resource representation but ATOM-like one (it contains global tags like versions, hitcount, etc.). The actual resources are wrapped in the resultlist tag.

 

So far, we expected the resource to be child elements of the root tag (for XML - in case of ATOM there are marked by a entry tag). I have tried playing with the tags to be ignored but this does not help if the tags are located at the beginning of the XML document. I will add a setting then that allows you to define the name of the tag that contains the resources.

Both issues should be fixed now and be available with the next nightly build.

 

As I annouced in the last post I have added a setting which allows you to define the tag that contains the resource. So if you want to parse the representation from the URL you have posted, you have to activate the new Resource tag name setting and set it to result.

 

If there is no more issues so far I will move to the stable branch next week.

 

Happy Easter

Anna

Many thanks Anna, this is exactly what I wanted! 

Is it only available with XML for now? Are there plans to add it to the JSON represantation too?

 

George

 

Hello,

I have only added it for XML so far. Do you think there are cases like this in JSON, too? In theory, it is not a problem. I just wanted to change to the stable build now and adding a new setting always makes problems in existing workflows using this nodes (you loose the configuration of the affected nodes).

Hi Anna

After installation of the new version (nigthly build) I get some errors like these when loading the affected workflows:

WARN   LoadWorkflowRunnable      Status: Warning: Read REST Representation 0:64
WARN   LoadWorkflowRunnable        Status: Warning: Loading model settings failed: String for key "XML_RESOURCE_TAG_KEY" not found.

 

But these errors do not affected the workflows themselves. So, no problem.

Would be great to see the KREST nodes in the stable branch of the community contributions.

Frank

 

Hello Frank,

 

yes, these errors occur because there is a new setting in the nodes and the loader does not find values for them. Unfortunately you might loose your node configuration data due to this.

 

However, this only occurs one time when you load the workflow for the first time with the new version (and save it). Since the nodes there will not be new versions in the next future (hopefully) things like this should not happen again.