gpt4 book ai didi

cytoscape - 如何在Cytoscape中自动化[加载+导出]操作?

转载 作者:行者123 更新时间:2023-12-02 22:51:51 24 4
gpt4 key购买 nike

我有大约 100 个 *.xgmml 文件,每个文件指定不同的网络。如何通过 Cytoscape 为每个输入文件自动生成 PNG 图像文件的过程?

(Cytoscape 命令行选项包括一些用于加载文件的选项,但我没有看到任何用于将网络导出为图像文件的选项。)

最佳答案

(在 cytoscape 3+ 中)您可以执行如下操作,将其放入文本文件中并使用 cytoscape.sh -S [脚本文件] 运行,或者在打开 cytoscape 后直接输入它(工具 ->执行命令文件):

#Import network
network import file indexColumnTargetInteraction=1 ...
indexColumnSourceInteraction=2 file="[full path to .xgmml file]"
#Import and set style
vizmap load file file="[full path to .xml style file]"
vizmap apply styles=[style name]
#Set layout
layout attribute-circle
#Set view to fit display
view fit content
#Save
view export OutputFile="[full path to output file]" options=PDF

更一般地说,命令行实用程序(工具 -> 命令行对话框)上的帮助命令非常有用。它列出了所有可用的命令,并且可以查询每个命令的语法。

关于cytoscape - 如何在Cytoscape中自动化[加载+导出]操作?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14298096/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com