Import Table from File - problem with decimal separator

344 views
Skip to first unread message

Max Gilbert

unread,
Jul 19, 2019, 5:12:33 AM7/19/19
to cytoscape-helpdesk
Hello!

I am trying to import a table from file (Excel file .xlsx) with cytoscape 3.7.1. There seems to be a problem: Whenever I import the data, Cytoscape mistakes numerical values (floating point, e.g. 0.788) as string values because the import window switches the decimal point . to a comma ,
In this case, if i manually assing the column type to "Floating Point" it results in an error and the data cannot be loaded. Strangely, after importing the file, the datatype of the corresponding column is "double" althought I assinged it to "floating point" and the import window interpreted my data as "string". I think this behaviour is not expected. If i convert the same data to .txt first and then import, all values are recognized correctly.
Do you have a suggestion on how to fix that problem? Thanks a lot! I attached the corresponding file to this post.

Cheers,
Max
test.xlsx

piet molenaar

unread,
Jul 19, 2019, 6:01:15 AM7/19/19
to cytoscape-helpdesk
Hi Max,
I just imported the edges and the values for R1 were imported as floating point (double).
Find the session file attached. Did you have a problem with the nodes attributes file, because I did notice missing values there as empty fields that will be interpreted as strings...
Let me know,
Kind regards,
Piet 

--
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 view this discussion on the web visit https://groups.google.com/d/msgid/cytoscape-helpdesk/cc241b51-7d71-454f-9ed7-2228b052fe3d%40googlegroups.com.


--
Piet Molenaar
piet...@gmail.com
Department of Oncogenomics, M1-131
Amsterdam University Medical Centers 
Meibergdreef 9
1105 AZ Amsterdam
the Netherlands

tel (+31) 20-5666592
fax (+31) 20-6918626
floatingpointimported.cys
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted

Max Gilbert

unread,
Jul 19, 2019, 6:57:12 AM7/19/19
to cytoscape...@googlegroups.com
Hey Piet,

Thanks for the super fast response! It seems like the problem is on my side then....
But I dont know whats wrong...as soon as I try to import my file, the import wizzard assings the string data type to my numbers (https://i.imgur.com/hUq5oRG.png), which is clearly wrong (also the comma instead of a point).
After changing manually to floating point, I still get the "Invalid value" error since it thinks my data is a string https://i.imgur.com/gadpz0E.png
So whats happening? Do you have any advice?
Yes, I also have problems with the node attributes, but only as long as I try to import them as .txt or .csv (.xlsx is "OK"....decimal problem remains)....I actually opened another thread regarding this problem.

Thanks for the help.

Cheers,
Max

P.S.
there was a problem with my response...sry if you got it multiple times

Piet

unread,
Jul 19, 2019, 7:31:44 AM7/19/19
to cytoscape-helpdesk
Hi Max, 
So you're posts were deleted, that is strange, I'll try to find out what happened....

I now answer directly from the group so your mail should come through now.

Considering your problem, this might have to do with your default system locality, where the decimal point is considered a comma. 
The fast workaround is indeed saving the excel as a text file and make sure that decimal points are exported....
Other solutions might include the setting of your system locale, are you on windows?

Hope this helps,
Piet

Max Gilbert

unread,
Jul 19, 2019, 8:03:17 AM7/19/19
to cytoscape...@googlegroups.com
Yes I use windows 10.
actually I made sure that my systems settings are set to use a . as decimal separator
with .txt or .csv files I have another problem that only half of my node attributes can be mapped to the corresponding values see topic: https://groups.google.com/d/msg/cytoscape-helpdesk/tB4mcg8VHvA/uY12g4KKCAAJ

still, the original problem remains....

thanks

piet molenaar

unread,
Jul 19, 2019, 8:15:15 AM7/19/19
to cytoscape-helpdesk
Do you see any error output in the log (available in the task panel, see image below)?

And about the node attributes, I see quite some missing values or is that not what you mean?

image.png

On Fri, Jul 19, 2019 at 2:03 PM Max Gilbert <maxgil...@gmail.com> wrote:
Yes I use windows 10.
actually I made sure that my systems settings are set to use a . as decimal separator
with .txt or .csv files I have another problem that only half of my node attributes can be mapped to the corresponding values

--
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.
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted

Max Gilbert

unread,
Jul 19, 2019, 9:22:26 AM7/19/19
to cytoscape-helpdesk
hello again,

for the missing values, I made another screenshot to clarify: some nodes dont have a value in all columns, thats ok (red rectangles): https://i.imgur.com/yMoAIec.png
but some nodes dont have ANY values after importing the table, which is strange since I am absolutely sure they should at least have SOME values.
There was also no particiular error message in the task history: https://i.imgur.com/LiQ1n2W.png
but it seems like it stops at "loading..."?

max

Max Gilbert

unread,
Jul 23, 2019, 4:37:55 AM7/23/19
to cytoscape-helpdesk

hello again,

sorry, but the problem still remains...do you have any more advice?

thanks,
max
Message has been deleted

Scooter Morris

unread,
Aug 1, 2019, 11:36:29 AM8/1/19
to cytoscape-helpdesk
Reply all
Reply to author
Forward
0 new messages