下载外部生成的SVG

时间:2013-12-13 10:04:31

标签: javascript jquery perl svg

使用我的webtool我为AmiGO工具生成一个输入链接:

http://amigo.geneontology.org/cgi-bin/amigo/visualize?mode=advanced&term_data={%22GO%3A0003994%22%3A{%22title%22%3A%22GO%3A0003994%22%2C%22body%22%3A%22aconitate hydratase activity (AFUA_1G06810)%22%2C%22fill%22%3A%22%23f9c132%22}%2C%22GO%3A0006099%22%3A{%22title%22%3A%22GO%3A0006099%22%2C%22body%22%3A%22tricarboxylic acid cycle (AFUA_1G06810)%22%2C%22fill%22%3A%22%23f9c132%22}%2C%22GO%3A0008152%22%3A{%22title%22%3A%22GO%3A0008152%22%2C%22body%22%3A%22metabolic process (AFUA_1G06810)%22%2C%22fill%22%3A%22%23fc3232%22}%2C%22GO%3A0016829%22%3A{%22title%22%3A%22GO%3A0016829%22%2C%22body%22%3A%22lyase activity (AFUA_1G06810%2C AFUA_4G07120)%22%2C%22fill%22%3A%22%23f9c132%22}%2C%22GO%3A0051539%22%3A{%22title%22%3A%22GO%3A0051539%22%2C%22body%22%3A%224 iron%2C 4 sulfur cluster binding (AFUA_1G06810)%22%2C%22fill%22%3A%22%23f9c132%22}%2C%22GO%3A0016491%22%3A{%22title%22%3A%22GO%3A0016491%22%2C%22body%22%3A%22oxidoreductase activity (AFUA_1G17180%2C AFUA_3G14490)%22%2C%22fill%22%3A%22%23fc3232%22}%2C%22GO%3A0050660%22%3A{%22title%22%3A%22GO%3A0050660%22%2C%22body%22%3A%22flavin adenine dinucleotide binding (AFUA_1G17180)%22%2C%22fill%22%3A%22%23f9c132%22}%2C%22GO%3A0055114%22%3A{%22title%22%3A%22GO%3A0055114%22%2C%22body%22%3A%22oxidation-reduction process (AFUA_1G17180%2C AFUA_3G14490)%22%2C%22fill%22%3A%22%23fc3232%22}%2C%22GO%3A0004455%22%3A{%22title%22%3A%22GO%3A0004455%22%2C%22body%22%3A%22ketol-acid reductoisomerase activity (AFUA_3G14490)%22%2C%22fill%22%3A%22%23f9c132%22}%2C%22GO%3A0008652%22%3A{%22title%22%3A%22GO%3A0008652%22%2C%22body%22%3A%22cellular amino acid biosynthetic process (AFUA_3G14490)%22%2C%22fill%22%3A%22%23f9c132%22}%2C%22GO%3A0009082%22%3A{%22title%22%3A%22GO%3A0009082%22%2C%22body%22%3A%22branched-chain amino acid biosynthetic process (AFUA_3G14490)%22%2C%22fill%22%3A%22%23f9c132%22}%2C%22GO%3A0016616%22%3A{%22title%22%3A%22GO%3A0016616%22%2C%22body%22%3A%22oxidoreductase activity%2C acting on the CH-OH group of donors%2C NAD or NADP as acceptor (AFUA_3G14490)%22%2C%22fill%22%3A%22%23f9c132%22}%2C%22GO%3A0016853%22%3A{%22title%22%3A%22GO%3A0016853%22%2C%22body%22%3A%22isomerase activity (AFUA_3G14490)%22%2C%22fill%22%3A%22%23fc3232%22}%2C%22GO%3A0050662%22%3A{%22title%22%3A%22GO%3A0050662%22%2C%22body%22%3A%22coenzyme binding (AFUA_3G14490)%22%2C%22fill%22%3A%22%23f9c132%22}%2C%22GO%3A0004408%22%3A{%22title%22%3A%22GO%3A0004408%22%2C%22body%22%3A%22holocytochrome-c synthase activity (AFUA_4G07120)%22%2C%22fill%22%3A%22%23f9c132%22}%2C%22GO%3A0005739%22%3A{%22title%22%3A%22GO%3A0005739%22%2C%22body%22%3A%22mitochondrion (AFUA_4G07120)%22%2C%22fill%22%3A%22%23fc3232%22}%2C%22GO%3A0003674%22%3A{%22title%22%3A%22GO%3A0003674%22%2C%22body%22%3A%22molecular_function (AFUA_5G14680)%22%2C%22fill%22%3A%22%23fc3232%22}%2C%22GO%3A0005622%22%3A{%22title%22%3A%22GO%3A0005622%22%2C%22body%22%3A%22intracellular (AFUA_5G14680)%22%2C%22fill%22%3A%22%23fc3232%22}%2C%22GO%3A0008150%22%3A{%22title%22%3A%22GO%3A0008150%22%2C%22body%22%3A%22biological_process (AFUA_5G14680)%22%2C%22fill%22%3A%22%23fc3232%22}}&term_data_type=json&format=svg_raw

AmiGO生成GO(基因本体)图作为SVG元素。在<img><object>标记内,我在我的网站上包含此外部生成的SVG元素。此外,我将提供下载此SVG作为SVG,PDF或PNG的选项。我使用Perl脚本进行转换(例如d3.js生成的SVG图)但这些脚本需要SVG

(new XMLSerializer).serializeToString(svg)

作为输入。如何访问AmiGO生成的SVG元素进行转换?可能吗?还有其他解决方案吗?

谢谢!

0 个答案:

没有答案