how can I change the "source node" after I have generated a node

15 views
Skip to first unread message

Sergey

unread,
Apr 6, 2017, 5:33:52 PM4/6/17
to cytoscape...@googlegroups.com
I have a big graph of my information. I would like to switch the existing source node to a source node attribute , and change a different source node attribute to now become a source node.

I know I can re-do my entire graph and start from scratch, but I would think there is a way to choose a different source node in an existing graph. ( I don't want to go back and re-classify my other 18 attributes when doing a data import )

Thank you for any feedback!

Scooter Morris

unread,
Apr 7, 2017, 11:45:01 AM4/7/17
to cytoscape...@googlegroups.com
Hi Sergey,
    I'm not too sure what you mean.  The source and target nodes of an edge aren't attributes, per se, and there is no easy to "change" the source node of an edge -- you would essentially need to delete the edge and recreate it.  Can you say more about what you're trying to do?

-- scooter


On 04/06/2017 02:33 PM, Sergey wrote:
I have a big graph of my information. I would like to switch the existing source node to a source node attribute , and change a different source node attribute to now become a source node.

I know I can re-do my entire graph and start from scratch, but I would think there is a way to choose a different source node in an existing graph.

Thank you for any feedback!

--
You received this message because you are subscribed to the Google Groups "cytoscape-helpdesk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cytoscape-helpd...@googlegroups.com.
To post to this group, send email to cytoscape...@googlegroups.com.
Visit this group at https://groups.google.com/group/cytoscape-helpdesk.
For more options, visit https://groups.google.com/d/optout.


Sergey

unread,
Apr 7, 2017, 12:08:43 PM4/7/17
to cytoscape-helpdesk
hey Scooter, 

Here is a brief example:

Lets say I have this structure --
name    - source node
id          - source node attribute
age       - source node attribute
gender  - source node attirbute

Then lets say i want to change graph to this structure --
name     - source node attribute
id           - source node
age        - source node attribute
gender   - source node attribute

Do I have to "import network from file " again ? Or is there a quicker way to change some classifications ? ( having to classify age and gender again as attributes is a little bit of waist of time )

Thanks for the reply ! I appreciate the help.

On Friday, April 7, 2017 at 10:45:01 AM UTC-5, Scooter Morris wrote:
Hi Sergey,
    I'm not too sure what you mean.  The source and target nodes of an edge aren't attributes, per se, and there is no easy to "change" the source node of an edge -- you would essentially need to delete the edge and recreate it.  Can you say more about what you're trying to do?

-- scooter

On 04/06/2017 02:33 PM, Sergey wrote:
I have a big graph of my information. I would like to switch the existing source node to a source node attribute , and change a different source node attribute to now become a source node.

I know I can re-do my entire graph and start from scratch, but I would think there is a way to choose a different source node in an existing graph.

Thank you for any feedback!

--
You received this message because you are subscribed to the Google Groups "cytoscape-helpdesk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cytoscape-helpdesk+unsub...@googlegroups.com.

Scooter Morris

unread,
Apr 7, 2017, 12:16:58 PM4/7/17
to cytoscape...@googlegroups.com
Hi Sergey,
    If you've imported the networks as outlined below, the only difference between the two networks is that in the first case, data in the "name" column would be used to fill the "name" and "shared name" columns of the Node Table.  In the second case, data from "id" would be used to fill the "name" and "shared name" columns.  The actual structure of the network would not change assuming "name" and "id" are unique.  If you want to change the label for a node to reflect either "name" or "id", that's pretty simple.   Does that make sense?  Or is there a difference between "name" and "id" such that importing those would result in a difference structure to the network?

-- scooter
To unsubscribe from this group and stop receiving emails from it, send an email to cytoscape-helpd...@googlegroups.com.

Sergey

unread,
Apr 9, 2017, 6:05:47 PM4/9/17
to cytoscape-helpdesk
Hello Scooter,

Sorry for the delayed response. I understand your reasoning to my example. 

I made a bad example. I am thinking of a hypothetical scenario where the "importing those would result in a difference structure to the network" . So, hypothetically lets just say that "name" and "id" where different in nature such that the network graph would change depending on which one is the source node. With this in mind, I still ask my question whether I would need to re-start essentially and configure a new network graph, or in cytoscape can I just make some tweak to switch up a source node and source node attribute. 

Scooter Morris

unread,
Apr 9, 2017, 9:44:24 PM4/9/17
to cytoscape...@googlegroups.com
Hi Sergey,
    In that case, yes, you would need to re-import everything.  You could certainly keep both structures in your session, though, if you wanted to have them both for comparison, for example.

-- scooter
To unsubscribe from this group and stop receiving emails from it, send an email to cytoscape-helpd...@googlegroups.com.

Sergey

unread,
Apr 9, 2017, 9:45:45 PM4/9/17
to cytoscape-helpdesk
Hey Scooter,

Good to know ! Thanks for the information and the suggestion. 
Reply all
Reply to author
Forward
0 new messages