From 63653387c707bf9d4bfe2b093a6255f35d08564b Mon Sep 17 00:00:00 2001
From: Abhas Bhattacharya 
Now, this is how I plan to deal with each of them.
-1. Xgmml: This is the top priority format and hence @@ -1802,36 +1328,200 @@ library in Gremlin (written in java): https://github.com/tinkerpop/blueprints/wiki/GraphSON-Reader-and-Writer-Library )
-This required some separate +
This requires some separate functions which can:
· convert parsed xml to jS variables and objects
· create xml from given jS variables and objects
· save given jS variables and objects as json
· -convert json into given jS variables and objects
+convert json into jS variables and objects -Guidelines for the conversion: +<Note: See Possible hurdle 1>
-1. +Whether it is a “node” or a +“edge” is represented by “group” in json. All its data is stored in the “data” +object.
+ +2. +All the attributes of “node” or “edge” are +converted to strings in json.
+ +3. +All the <att> tags of nodes/edges which +are of type “real” are converted into numbers, “list” and “string” into their +json counterparts.
+ +4. +The <att> tags without a “value” attribute +are considered as objects and its sub-tags and attributes are considered as properties +of that object. These sub-tags and attributes are then converted in accordance +with the previous rules.
+ +5. +The <graphics> tag is considered as a json +object named “graphics”. Its sub-tags and attributes are then converted in +accordance with the previous rules.
+ +Here’s some side-by-side comparison +of xgmml format and its corresponding json form:
+ +XGMML (https://github.com/bendtherules/GSOC_13/blob/master/Proposal/preview.xgmml )
<node
+id="-331" label="YBR043C">
<att label="gal1RGexp"
+name="gal1RGexp" value="0.454" type="real"/>
<att label="GO Cellular
+Component" name="GO Cellular Component"
+type="list">
<att value="cell"
+type="string"/>
<att value="cell part"
+type="string"/>
</att>
<graphics width="1"
+fill="#fcfffd">
<att name="cytoscapeNodeGraphicsAttributes">
<att name="nodeTransparency" value="1.0"/>
<att name="nodeLabelFont" value="Default-0-12"/>
</att>
</graphics>
</node>
JSON (https://github.com/bendtherules/GSOC_13/blob/master/Proposal/preview_json_of_xgmml.json )
[
{ “data”: {
"id":"YKR026C",
"label":"YBR043C",
"gal1RGexp":0.454,
"GO Cellular
+Component":["cell", "cell
+part"],
"graphics":{"width":"1",
"fill":"#fcfffd",
"cytoscapeNodeGraphicsAttributes":{
+"nodeTransparency":"1.0",
+"nodeLabelFont":"Default-0-12"
}
}
},
"group":
+"nodes"
}
]
2. Graphml: @@ -1839,34 +1529,80 @@ style='mso-list:Ignore'>2.   implementation process is same as that of the previous one. Only the code will be different to take care of the syntax difference of these formats.
+Conversion guideline:
+ +1. +Make use of the graphml – attribute values ( http://graphml.graphdrawing.org/primer/graphml-primer.html#AttributesValues +) to know the attribute type and the default values, if present.
+ +2. +All the +“key” attributes in the <data> tags will be converted into json +data of type “attr.type” (which are provided as +graphml – attribute values )
+ +3. +Convert complex types ( http://graphml.graphdrawing.org/primer/graphml-primer.html#Complex +) into objects.
+ +4. +Support nested graphs (http://graphml.graphdrawing.org/primer/graphml-primer.html#Nested +) with the help of parent variable. (Might be a little complex, but surely +do-able.)
+ +[Side-by-side examples are not provided for +this one, as they are pretty easy to understand. ]
+ +Before I move on to the other ones, here is a small chart for reference:

3. Sif and Nnf: Very simple jS code needs to be written to take care of these file formats. There is already a python-based implementation of these converters (written by me) available at https://github.com/bendtherules/GSOC_13/tree/master/nnf_and_sif_to_json_py - . Nnf files will be stripped off its -network information and treated just like a Sif file (Possible problem with -multi-network files ??)
+ . Unlike the python implementation, network information +in Nnf will be taken care of (stored in the “parent” variable in json). -4. GML: A @@ -1874,7 +1610,102 @@ custom-made parser needs to be built based on regular expressions (native js or possibly using xregexp library http://xregexp.com/ ). The rest of the plan is the same as that of xgmml, only this new parser will -be used.
+be used. As XGMML is the successor of +GML, the conversion guidelines used in xgmml should suffice (only the idea of +tags are not present here, everything is separated by space/tab). + +Side-by-side example:
+ +GML ( https://github.com/bendtherules/GSOC_13/blob/master/Proposal/preview.gml
+)
node
[
id 0
label "YKR026C"
graphics
[
x 1916.0
type "ellipse"
fill "#E1E1E1"
]
]
JSON (https://github.com/bendtherules/GSOC_13/blob/master/Proposal/preview_json_of_gml.json )
[
{ data: {
"id":0,
"label":"YKR026C",
"graphics":{"x":1916.0,
"type":"ellipse",
"fill":"#E1E1E1",
}
},
"group":
+"nodes"
}
]
Few words on the extras:
@@ -1888,19 +1719,21 @@ side note, in future, I wish to release this codes as a separate jS library for converting customized-xml formats into json (I hope my mentoring org will allow this). -5. Csv: Use any well-documented csv parser and rest is the same.
-6. -Xlsx: This is the most challenging part. I -wouldn’t have tried this if there was no cross-browser external library to read -and write xlsx format. But thankfully and quite surprisingly, there is one -called Xlsx.js https://github.com/stephen-hardy/xlsx.js +Xlsx: **Potential License Issue** This is the most challenging +part. I wouldn’t have tried this if there was no cross-browser external library +to read and write xlsx format. But thankfully and quite surprisingly, there is +one called Xlsx.js https://github.com/stephen-hardy/xlsx.js . I am not much sure if I can pull off this part, but I am still including this in the proposal mostly for my inspiration than anything else. Also, I know that the Cytoscape project originally supported .xls, but I think its best kept to @@ -1912,7 +1745,7 @@ Microsoft Excel for converting .xls into .xlsx .
1.
o Learn
more about: o
and the graph formats. o Set
up development environment 2.
o June
17 – June 29 (12 days): Implement xgmml parser o July
30 – July 5 (6 days): Rest of the converter 3. July
5 – July 7 (3 days): Test converter with different xgmml files. 4.
o
parser o July
20 – July 25 (6 days): Rest of the converter 5. July 26 – July 28 (3 days): Test graphml
converter 6. Deliver
fully-implemented xgmml and graphml parser. 7. ? :D) 8. July
31 – August 2 (3 days): Implement and test Sif and Nnf converter. 9.
- 10. August
21 – August 23 (3 days): Test Gml converter 11. August
-24 – August 27 (4 days): Put all the converters
-together and test them (Packaging). 12.
- 13.
(Feedback will be obtained for all the converters from the
-community and they will be of more importance than the extras) 1.
- 2. Make
sure the regular-expression based Gml parser is not buggy. 3.
·
-Yes, I am committed in working hard for this
-GSOC project this summer. I do not have
-any other commitment during the summer other than my college internals for the
-next session which should be held near the end of August or the start of
-September. I am not yet sure about the date, but I will ask for a one-week
-break during that time. I hope it won’t be much of a problem. ·
Being my first GSOC project, I am also
super-excited about it, can’t wait to have a fruitful summer this year. ·
I wish to learn some more about the core
Cytoscape project but as I am not a Java developer, I
wish to linger with the Cytoscape.js project. Possible hurdles:
Bio <To be added soon>
+