Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cyclient.network.export not returning position of nodes #98

Open
maurodlt opened this issue Feb 26, 2020 · 0 comments
Open

cyclient.network.export not returning position of nodes #98

maurodlt opened this issue Feb 26, 2020 · 0 comments

Comments

@maurodlt
Copy link

Cytoscape: 3.7.2

CyRest: v1

Java: 1.8.0_232

I am exporting my cytoscape network to a file, so I can open it in a browser using cytoscape.js.

However, the file that the cytoscape.network.export method outputs does not contain the position of the nodes. Primarily, I was just recalculating their position using cytoscape.js, but this workaround is not working properly.

Shouldn't the cytoscape.network.export method also return the position of the nodes?

Thanks!

Code: cytoscape.network.export(OutputFile=saveFileName, options='cyjs')

error: returning file

var networks = {"From cyREST": {
"format_version" : "1.0",
"generated_by" : "cytoscape-3.7.2",
"target_cytoscapejs_version" : "~2.1",
"data" : {
"shared_name" : "From cyREST",
"name" : "From cyREST",
"SUID" : 32610,
"__Annotations" : [ ],
"selected" : true
},
"elements" : {
"nodes" : [ {
"data" : {
"id" : "32815",
"shared_name" : "bn:03304206n",
"peso" : 1.0,
"name" : "bn:03304206n",
"SUID" : 32815,
"dicionario" : "fluorescence+spectrum",
"id_original" : "bn:03304206n",
"selected" : false
}
}, {
"data" : {
"id" : "32814",
"shared_name" : "bn:03690097n",
"peso" : 1.0,
"name" : "bn:03690097n",
"SUID" : 32814,
"dicionario" : "pathway",
"id_original" : "bn:03690097n",
"selected" : false
}
}, {
"data" : {
"id" : "32813",
"shared_name" : "bn:00091165v",
"peso" : 1.0,
"name" : "bn:00091165v",
"SUID" : 32813,
"dicionario" : "opens",
"id_original" : "bn:00091165v",
"selected" : false
}
}

what I expected :

var networks = {"From cyREST": {
"format_version" : "1.0",
"generated_by" : "cytoscape-3.7.2",
"target_cytoscapejs_version" : "~2.1",
"data" : {
"shared_name" : "From cyREST",
"name" : "From cyREST",
"SUID" : 7105,
"__Annotations" : [ ],
"selected" : true
},
"elements" : {
"nodes" : [ {
"data" : {
"id" : "7182",
"shared_name" : "bn:00059470n",
"peso" : 1.0,
"name" : "bn:00059470n",
"SUID" : 7182,
"dicionario" : "transplantation",
"id_original" : "bn:00059470n",
"selected" : false
},
"position" : {
"x" : 119.07734971186693,
"y" : -94.44902563095093

},
"selected" : false
}, {
"data" : {
"id" : "7181",
"shared_name" : "bn:01361897n",
"peso" : 1.0,
"name" : "bn:01361897n",
"SUID" : 7181,
"dicionario" : "precursor+cell",
"id_original" : "bn:01361897n",
"selected" : false
},
"position" : {
"x" : 124.65753464839037,
"y" : -37.36738348007202

},
"selected" : false
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant