Skip to content
This repository has been archived by the owner on Jun 9, 2020. It is now read-only.

Edge property type is string instead of type defined in header #6

Closed
amergin opened this issue Aug 29, 2012 · 2 comments
Closed

Edge property type is string instead of type defined in header #6

amergin opened this issue Aug 29, 2012 · 2 comments

Comments

@amergin
Copy link

amergin commented Aug 29, 2012

Might there be a bug in reading the types of edge properties? I have an edge TSV file that contains lines like:

bash-4.1$ head -n 5 edges.tsv 
start       end type    correlation:double  importance:double   pvalue:double   distance:int
37626   49171   ASSOCIATION -0.344578   0   1.40818904813735        
14256   3992    ASSOCIATION -0.3184399  0.001083176 2.36807765466284        
39138   36494   ASSOCIATION -0.01435775 0   2.44707505427999        
36421   17548   ASSOCIATION 0.3961878   0.0001725019    1.56627511748036        

The distance property is not defined for every edge. The importer script seems to create a database in which correlation, importance and pvalue are all strings instead of double. The distance values, oddly enough, are casted correctly to int. Typecasting works without problems for nodes.

The edge file is created in a Python script where the code creating a one line is

edge_tsv_file.write( start + "\t" + stop + "\t" + edgeName + "\t"  + "\t".join( [ lineDict[i] for i in edgeAttributes ] ) + "\t" + "" + "\t" + "\n" )

(notice "" for indicating the absence of distance value)

@jexp
Copy link
Owner

jexp commented Aug 30, 2012

did you build it yourself? should be fixed in the source code on github?

@amergin
Copy link
Author

amergin commented Aug 30, 2012

You were right; I was using a slightly old version of the importer. Updated to latest git clone and recompiled; the issue went away.

@amergin amergin closed this as completed Aug 30, 2012
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants