postgresqlcytoscape

Importing data from postgres to cytoscape


I have been trying to load some gis data from a postgis database into Cytoscape 3.6. I am trying to get some inDegree and outDegree values I have used the sif file format.

As long as the data is written out in the follow format

source_point\tinteracts with\ttarget_point

Cytoscape is happy to read it.

I am just wondering if there is anyway of including my own metric for the cost of getting between source_point and target_point


Solution

  • Sure! There are several ways to read in text files into Cytoscape -- SIF is just one of them. I would create a file that looks like SIF, but is actually a more complete text file:

    Source\tTarget\tScore
    source_point\ttarget_point\t1.1
    ...
    

    And then use the "File->Import Network->File", choose your source and target and leave score as an edge attribute. You can have as many attributes on each line as you want, and can even mix edge attributes, source node attributes, and target node attributes.