Numeric column in cytoscape - cytoscape

I'm new to cytoscape.
I want to make the width of edges in my network according to a certain number.
my file looks like this:
node1 node2 34.04
node3 node2 56.89
node4 node5 8.09
node1 node4 10.54
when I import my network file I choose column 3 to be the "interactions". Then the number in column 3 ends up in a string column, and can't be used to make a continuous mapping. When I import the same table as node attributes I am still only able to get it in to a string column.
I have tried to look in the manual and googled a lot - but I seem to be the only one having this problem. How do I solve it?
Thanks

This answer is for Cytoscape 2.8.3. It probably applies for 3.?.?.
Like you say, with your file format, the numbers will be used to population "interaction", and that is a String attribute.
So, for your file, do not set the Interaction Type (red) in the Import Network from Table dialog. Instead, set Source Interaction (purple) to Column 1 and Target Interaction (orange) to Column 2. Then, in the table at the bottom of the dialog, click the column header Column 3. It will turn blue. It will then be imported as a floating point attribute as "Column 3", and you can use it in a Continuous mapper.

Related

Importing table onto cytoskape, imports headings but not data

enter image description here
I import my metadata table from the cytoscape directory downloaded from GNPS.
The data shows up in the next window under the appropriate headings.
But when I click import and then go to select a node in my network, the information does not show up in the node table at the bottom.
I have added screenshots for clarity.
Thank you anyone who can help
Also asked and answered on BioStars:
Typically, this happens when there is a mismatch between the "Key Column for Networks", which you have set to "shared name" and the column in your spreadsheet to use to match it. I don't see what column you've selected to match the shared name column, but the values in those columns have to match in order to import the data.
-- scooter
-- scooter

Change node label from id to name

Very new to Cypher and Neo4j so please excuse my ignorance and misuse of terms. I am looking to change the label of a node from the ID to the property name (see image below). I used the following code to load the data from CSV.
load csv with headers from "file:///Goal.csv" as row
create (g:Goal) set g.name = row.goalName
Is there a way to change the label from the ID to the name property? I have tried the solution in the link below but it did not provide what I am looking for. Ultimately I would like the node to show the name information (i.e. reduce fuel, green, etc.)
Change node label in neo4j
Dave Bennett's comment's right - the docs will help show all the visualisation customisations you can do but for this specific case:
Click the node label above the graph visualisation you want to change - they're colour-coded
Choose a new caption field underneath the graph
In this graph, let's change the caption of the yellow 'Location' nodes:

Trying to set color point by column value in CartoDB

This is my first time using CartoDB. My dataset is a simulation of the behaviour of users arround the campus. My rows have latitude, longitude and the class column depending of the cluster in which the user is.
I saw an option to visualize the animation of the behaviour (cartodb transforms the data into a time lapse), but I'm trying to see the points colored by the class value. In the platform, there is an option to do that, but when I choose the "animation" mode then I can't choose any of the columns to set the color.
I show you an image:
However, if I choose the "By points" mode, I can display the points color by the class column value.
Is there anyone who has had the same problem? Do you have any recommendation?
I think the problem is on the column type, you need your column to be a string to be offered as a value, so maybe you want add a column to your SELECT statement on the DATA tab to reclassify your clusters. If you rename then you can also show them on the legend can reflect a better name for your clusters:
select *,
case cluster
when 1 then 'Cluster 1'
when 2 then 'Cluster 2'
else 'unknown'
end as cluster_named
from my_table
Something around that should help to convert cluster numeric field into a string one, then you'll see it offered to animate by that value.
Disclaimer: I work at CARTO

Import custom partition into Gephi

I was wondering if gephi supports importing a cluster file that has the community assignment of each node in a graph on a separate line (similar to the Pajek .clu format)? I am looking for a way to color the nodes belonging to the same community. In igraph (for R), I can import this file and set the vertex color attributes based on it. Was wondering if gephi had a similar feature?
I saw this answer here from over 5 years ago saying that it wasn't possible, was wondering if that had changed now?
Thanks!
The .clu file contains one line per node with the cluster number at least the example I see here. Gephi cannot import it directly but you can trick it to obtain the same result. Here are the steps I propose:
Import your .net file with Gephi
Go to Data Laboratory and sort your nodes according to the Id column, by clicking on the column name
Create a new column called Cluster by pressing Add column the bottom of the screen. The default String type will do
Click Export table, select only the fields Id and Cluster, and export the file somewhere
Open the CSV file with e.g. Excel or LibreOffice
Open your .clu file with a text editor, even Notepad will do
Copy all the numbers in the file and paste them in the Cluster column of your CSV. Save your CSV
Import the CSV back into Gephi, by clicking Import Spreadsheet and press ok through the next steps.
At the end you should see your Cluster values having the same values as in the .clu file!
Make sure that the same field delimiter is used throughout in steps 4. and 8. I would suggest to use ; as Excel directly understands it.
You are welcome to report back if you are still having problems

Set node weight

I have a CSV lists of nodes and edges, and load both accordingly in Gephi.
My node list looks like this:
Id Date weight
56079348 12.07.2009 141
77150491 25.09.2009 2161
612473 08.01.2007 94
621523 10.01.2007 128
I want to make node circles sized according weight column.
Is it possible, and if yes how to?
Yes it is possible, this is what the ranking panel is for.
Be sure to have imported your "weight" values as numerical values (Float, Integer, Long...), not textual (String). This can be checked in the import wizzard, at the step when you are asked to confirm / choose the type of each attribute.
Once you have made this check, visit the "ranking" panel in Gephi and select your weight attribute in the drop down menu. Then click on "Apply".
This tutorial has some slides on ranking, and more: http://www.slideshare.net/gephi/gephi-quick-start.

Resources