Question: How to color nodes in Cytoscape according to expression of genes? How should the input file look like?
3
gravatar for orzech_mag
3.1 years ago by
orzech_mag230
Poland/Łódź
orzech_mag230 wrote:

Dear Colleagues,

I would like to do some visualization of my network in Cytoscape. My file contains genes and their expression values in normal and tumor samples. The visualization of interest would be the same network colored according to A) expression in normal samples and B) expression in tumor samples.

Honestly, I completely do not know how should be prepared the input file with such annotation. Basic input file to create network in Cytoscape looks like:

Gene A - Gene B (and some additional annotations).

Some example of such analysis shown in Cytoscape tutorial indicates that such input file should look like this:

GENE COMMON gal1RG gal1RG gal80R

YHR051W COX6 -0.034 -0.034 -0.304

YHR124W NDT80 -0.090 -0.090 -0.348

YKL181W PRS1 -0.167 -0.167 0.112

YGR072W UPF3 0.245 0.245 0.787

(unfortunately, it is not described how the values were obtained).

The above arises in my question: what these values are related to? If in my file I will put expression values for genes only in first columns, then I won't be able to color genes from second column. Moreover, in Cytoscape I can use only one column as such annotation, so there is no chance to provide two columns with expression values for both nodes (start and end).

I would appreciate any suggestion how to solve such issue. Maybe there is some mathematical solution how to calculate "something" that I could possibly use as representation of expression or maybe there is some other software that would be able to do something like this?

Thanks in advance.

Best regards!

ADD COMMENTlink modified 3.1 years ago by a.zielezinski9.6k • written 3.1 years ago by orzech_mag230
7
gravatar for a.zielezinski
3.1 years ago by
a.zielezinski9.6k
a.zielezinski9.6k wrote:

INPUT DATA

You need two input files to color your network according to expression values in normal and cancer samples.

First file defines interactions between genes. For example, Excel file (interactions.xls):

Source  Target
Gene1   Gene2
Gene1   Gene3
Gene2   Gene3
Gene2   Gene4
Gene3   Gene4
Gene3   Gene4
Gene4   Gene5

Second file lists gene names with their expression values in normal and cancer samples. For example, Excel file (expressions.xls):

Gene_name   Normal  Cancer
Gene1   1.92    1.56
Gene2   0.56    2.02
Gene3   0.34    0.01
Gene4   0.98    0.98
Gene5   0.02    0.87

CYTOSCAPE

  1. Open Cytoscape.
  2. File > Import > Network > From file
  3. Load the interactions.xls file. Define first column as Source, and second as Target.
  4. Load the expressions.xls file.
    • File > Import > Table > File.
    • Label first column as Gene_name, second as Normal and third as Cancer.
  5. Color your network according to expression values in the Normal column.
    • Style > Fill color > Column: Normal
    • Mapping Type: Continuous
    • Current mapping: choose your colors.

OUTPUT

enter image description here

Pozdrawiam:)

ADD COMMENTlink modified 3.1 years ago • written 3.1 years ago by a.zielezinski9.6k
1

The best are the easiest solutions, but the hardest to find. Dziękuję ;)

ADD REPLYlink written 3.1 years ago by orzech_mag230

Hi, do you know if it is possible to extract the assigned color code in RGB (or whatever format)?

ADD REPLYlink written 18 months ago by Buffo1.8k

Hi,
Aside of each color in the panel there are RGB values. You can write them down.

Best regards!



-------- Wiadomość oryginalna --------
Temat: [biostar] How to color nodes in Cytoscape according to expression of genes? How should the input file look like?
Od: Buffo on Biostar mailer@biostars.org
Do: orzechowska.mag@wp.pl
DW:

Activity on a post you are following on Biostar

User Buffo wrote Comment: How to color nodes in Cytoscape according to expression of genes? How should the input file look like?:

Hi, do you know if it is possible to extract the assigned color code in RGB (or whatever format)?


You may reply via email or visit C: How to color nodes in Cytoscape according to expression of genes? How should the

ADD REPLYlink written 18 months ago by orzech_mag230

Ok this great however does anyone know how to assign a color say grey to a node with no value ( NA ) the issue I have is the value is not availaible cytoscape will just color it with the maximum color!

ADD REPLYlink written 13 months ago by simplitia40

Maybe you can replace NAs with a number that is not found in your dataset and assign that number a color.

This link might also help in terms of assigning colors to node attributes. Coloring nodes according to attribute value in Cytoscape 3

ADD REPLYlink written 13 months ago by Fatima930
1
gravatar for scooter
3.1 years ago by
scooter420
scooter420 wrote:

The two columns are the start and end and in the example you provided, they were obtained by a yeast-two-hybrid experiment. Sounds like you don't have any PPI data -- just your expression values. There are two approaches I can suggest.

  1. Just import your data with "Source Node" and two "Source Node Attributes". You won't get a network, so all of your nodes will show up as a grid. You can color them using your expression files, although typically you would want to convert your expression data to a fold-change.
  2. You can start by importing a PPI for all of your genes from STRING using the stringApp. Then you can import you expression data (again, I would recommend converting it to differential expression values) and color the nodes.

Hope this helps! -- scooter

ADD COMMENTlink written 3.1 years ago by scooter420

Thanks scooter for suggestions. It does make sense for me. However I think that real issue lays in my experiment or workflow. I am afraid that I am not able to import the networks from STRING, because I have my own network that was created with another approach based on co-expression patterns. That's why I wish to get this particular network colored according to expression or FC. In fact, there was software doing such thing - Biolayout Express 3D, but recently it has turned into commercial paid software :(

ADD REPLYlink written 3.1 years ago by orzech_mag230
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1765 users visited in the last hour
_