Will any body will tell me how to draw nodes with arcs by using PHP?
The nodes values is gene names.
3 2133
The best way to get some help on this forum is to show you've had a go first.
So I would suggest having a look around and have a go at it. then when you get stuck post back with the code and the specific problem.
Perhaps a look at the manual?
Cheers
nathj
Look at the graphics libraries built in and that can extend php.
Thanks for ur reply. I got some package Graph.jar. They designed it in Smarty. It is working well. If i do change the coding in .tpl file, the result is not coming.
Do anybody know about template_c?
The coding is
draw_Nodes.tpl - <div style= "border:1px solid #000000;position: relative; width: 760px; left:50%; margin-left: -380px;z-index: 2; " id="layer65">
-
-
<table border="0" width="300" bordercolor="#C0C0C0" cellspacing="0" cellpadding="0" align ="center">
-
<td><p align=left"><b><font face="Verdana" size="2">Network Visualization</font></b></td></table>
-
</table>
-
<table border="1" width="95%" height="250" cellpadding="0" cellspacing="0" align="center" bordercolor="#C0C0C0">
-
<tr><td>
-
<table border="0" width="700" height="400" cellpadding="0" cellspacing="0" align="center" bordercolor="#C0C0C0">
-
<tr><td>
-
{if $regulation_array[0][0] == ''}
-
<table border="1" width="120" height="120" cellpadding="0" cellspacing="0" align="center" bordercolor="#C0C0C0"><tr><td align = center><font size="2"><b></b></font></td></tr></table>
-
-
{else}
-
<table border="0" width="120" height="120" cellpadding="0" cellspacing="0" align="center" bordercolor="#C0C0C0"><tr><td align =center><font size ="2"><b>Regulators/sRNAs</b></font></td></tr><tr><td><p align="center"><form method="GET" action="regulation_query.php?acc="><select size="3" name="acc" multiple>{section name=sec1 loop=$regulation_array}
-
<option value = {$regulation_array[sec1][0]}>{$regulation_array[sec1][1]}</option>
-
{/section}<option value = {section name=sec1 loop=$regulation_array}{$regulation_array[sec1][0]}-{/section} selected>Select All</option></select><br><input type="submit" value=" Submit " ></form></p></td></tr></table>{/if}</td>
-
-
<td rowspan="3"><table border="1" width="550" height="300" cellpadding="0" cellspacing="0" align="center" bordercolor="#C0C0C0"><tr><td>
-
<applet codebase="./Graph/" code="Graph.class" archive="SGraph.jar" width=550 height=330>
-
<param name=edges value="{if $targeting_array[0][0] == ''}
-
{else}
-
{section name=sec1 loop=$targeting_array}{$gene_array[1]}({$gene_array[0]})-{$targeting_array[sec1][1]}({$targeting_array[sec1][2]})/ST:({$targeting_array[sec1][0]}),{/section}
-
{/if}
-
{if $regulation_array[0][0] == ''}
-
{else}
-
{section name=sec1 loop=$regulation_array}{$gene_array[1]}({$gene_array[0]})-{$regulation_array[sec1][1]}({$regulation_array[sec1][2]})/SR:({$regulation_array[sec1][0]}),{/section}
-
{/if}">
-
<param name=center value="{$gene_array[1]}({$gene_array[0]})/S">
-
alt="Your browser understands the <APPLET> tag but isn't running the applet, for some reason."
-
Your browser is completely ignoring the <APPLET> tag!
-
</applet><font face="Verdana" size="2">
-
Requires <a href ="http://www.java.com/en/download/index.jsp">Java Web Start</a>, which is automatically installed when you install JRE/JDK with version 1.4.2 above.</font>
-
</td></tr></table></td></tr>
-
<tr><td>
-
{if $targeting_array[0][0] == ''}
-
<table border="1" width="120" height="120" cellpadding="0" cellspacing="0" align="center" bordercolor="#C0C0C0"><tr><td align = center><font size="2"><b></b></font></td></tr></table>
-
{else}
-
<table border="0" width="120" height="120" cellpadding="0" cellspacing="0" align="center" bordercolor="#C0C0C0"><tr><td align = center><font size="2"><b>sRNAs/Targets</b></font></td></tr><tr><td><p align="center"><form method="GET" action="targeting_query.php?acc={$acc}"><select size="3" name="acc">
-
{section name=sec1 loop=$targeting_array}<option value = {$targeting_array[sec1][0]}>{$targeting_array[sec1][1]}</option>
-
{/section}
-
<option value ={section name=sec1 loop=$targeting_array}{$targeting_array[sec1][0]}-{/section} selected>Select All</option>
-
</select><br><input type="submit" value=" Submit " ></form></p></td></tr></table>
-
{/if}</td>
-
-
-
<tr><td>
-
{if $coprotein[0][0] == ''}
-
<table border="0" width="120" height="120" cellpadding="0" cellspacing="0" align="center" bordercolor="#C0C0C0"><tr><td align = center><font size="2"><b></b></font></td></tr></table></td></tr></table>
-
{else}
-
<table border="1" width="120" height="80" cellpadding="0" cellspacing="0" align="center" bordercolor="#C0C0C0"><tr><td align=center><font size ="2"><b>Co protein</b></font></td></tr><tr><td align = center><form method="GET" action="co_protein.php"><select size="2" name="coprotein"></select><br><input type="submit" value=" Submit " ></form></td></tr></table></td></tr></table></td></tr></table>
-
{/if}</td></tr></table>
-
-
</div>
draw_Nodes.php - <?php
-
-
-
$targeting_array = array(0=>array(0=>"sRNAT0003",1 =>"ftsZ",2 =>"sRNATG0002"));
-
$gene_array = array(0 =>"sRNAG0012",1 =>"dicF",2 =>"ECK1568;b1574;",3 =>"1647406",4 =>"1647458",5 =>"forward",6 =>"Qin prophage; DicF antisense RNA",7 =>"Escherichia coli K12 MG1655",8=>"Inferred from genetic interaction;Inferred from direct assay;",9 =>"TTTCTGGTGACGTTTGGCGGTATCAGTTTTACTCCGTGACTGCTCTGCCGCCC",10=>"regulonDB",11=>"The DicF RNA acts to inhibit cell division (Bouche F,1989). DicF causes inhibition of the formation of the constriction and the separation of the replicated chromosomes into the daughter nucleoids (Tetart F,1992). DicF RNA interferes with FtsZ mRNA translation (Tetart F,1992); DicF may bind to and occlude the ribosome binding site on the FtsZ mRNA (Tetart F,1992). The DicF-mediated delay in nucleoid segregation is suppressed by FtsZ overproduction (Tetart F,1992). The DicF-mediated decrease in FtsZ abundance and activity is suppressed by an rpoB mutation, and this effect is partially counteracted by an rpoS mutation (Cam K,1995). The DicF RNA is subject to processing by RNase III and RNase E (Faubladier M,1990). The DicF gene has similarity to multiple prophage sequences (Faubladier M,1994). Regulation has been described (Faubladier M,1990). Reviews: (Delihas N.,1995. Wassarman KM,1999).",12=>"2477663;1552861;7651342;7540245;7508908;1691299;1372677;10068996;");
-
$regulation_array =array(0=>array(0=>"sRNAR0026",1=>"hfq ",2=>"sRNARG0025"));
-
-
require './library/smarty/Smarty.class.php';
-
-
$tpl = new Smarty;
-
$tpl->compile_check = true;
-
-
$tpl->assign("gene_array", $gene_array);
-
$tpl->assign("regulation_array", $regulation_array);
-
$tpl->assign("targeting_array",$targeting_array);
-
$tpl->display('draw_Nodes.tpl');
-
-
?>
-
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Raja |
last post by:
Dear Members,
Has anyone used the Vector Draw (www.vdraw.com) Component in Visual
Basic. I need to create an application to be able to draw the plan
view of a building. Any help in this regard...
|
by: Florian Lindner |
last post by:
Hello,
I'm looking for a program or python library to draw graphs.
They should look like the that:
/--------\ /--------\
| Node A | ------ belongs to ----> | Node B |...
|
by: _andrea.l |
last post by:
I'd like to draw a graph using a different pictures for each node.
How can I do?
I'd like to link the nodes and the arcs.
There is a library for doing that?
if it not exists what is the best...
|
by: Mark Ingram |
last post by:
Hi, how can i draw a rounded rectange, with a border within a specified
area?
i.e. if i have a Rectangle with width and height of 100, how can i draw
a rectange with 2 pixel border inside of the...
|
by: Jeff Uchtman |
last post by:
Can I draw from 2 XML sources, the structure is exactly the same execpt for
data contained into 1 xslt using math to add some structrure, and displaying
others as node 1 and node 2? This data is...
|
by: serge calderara |
last post by:
Dear all,
I was wondering is there is a way to customise the treView control in order
to get any Control as a Node. What I try to do is having a Progress bar as a
treeview node object.
Is...
|
by: lgeastwood |
last post by:
I have tweaked the PictureBox97.mdb (Stephen Lebans <www.lebans.com>)
code to nicely draw lines, rectangles and circles to the specs that I
input.
I'm at a loss though with trying to setup an...
|
by: =?iso-8859-1?Q?Vicente_Garc=EDa?= |
last post by:
Hi,
I need to programmatically draw a graph (his nodes and his edges) from
dynamic XML file. The graph is very complex and I don't know how I could do
this task. Any ideas please? Microsoft...
|
by: mistusen |
last post by:
the nodes of the graph has got x and y coordinate.we'll have to draw a directed graph with the nodes in java.where can i find the source code or what is used to draw the graph?plz suggest.how can i...
|
by: John |
last post by:
Hi All,
I have a simple TreeView app that I need to color out certain nodes
(draw text only). The problem is the root node (which is a normal
node) will be unwantedly colored over when expanding...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |