cytoscape/cyREST

Add support for loading lists of values to tables

Closed this issue · 4 comments

http://localhost:1234/v1/swaggerUI/swagger-ui/index.html?url=http://localhost:1234/v1/swagger.json#!/Tables/updateTable_1

Something like this should work:

{
  "key": "SUID",
  "dataKey": "id",
  "data": [
    {
    "id": 12345,
    "my_list": ["brca1","brca2"]
    }
  ]
}

It looks like this feature already exists, BUT will not create a list column if one doesn't exist yet.

I'm going to see if it's possible to add the creation of a list column as well.

I've added some code that does this. What do you think of this limitation:

  • List columns must be valid, and of non-zero length, with no nulls or heterogenous content.

In order to generate a column, we need to know the intended content. The following is impossible to infer a list type from:

myColumn: []

For this to work, the input needs to be non-empty:

myColumn: [0.0,1.0, 2.0]

I can try to do something clever later, but will the be sufficient for now?

Yes, this would be great. I can easily check (and reject) empty lists. Let me know when/how to test an R function against this.

Tested 3.9-SNAPSHOT via RCy3 and it works!