Detail network of Gastrodia elata
Details of development response dynamic network relationship";
echo "
Gene A | Gene B | PCC | MR | Relationship |
";
echo "ID | Ortholog in Arabidopsis (E-value) | Annotation | ID | Ortholog in Arabidopsis (E-value) | Annotation |
";
while(!feof($fp1))
{
$line = fgets($fp1);
$arr=explode("\t",$line);
$query=mysql_query("SELECT * FROM ortholog_annotation WHERE gene = '$arr[0]'");
$result1=mysql_fetch_row($query);
$query=mysql_query("SELECT * FROM ortholog_annotation WHERE gene = '$arr[1]'");
$result2=mysql_fetch_row($query);
if($result1[1]==""){$result1[1]="--";}
if($result2[1]==""){$result2[1]="--";}
if($hash{$arr[0]} && $hash{$arr[1]})
{
$arr[3] = sprintf("%.2f",$arr[3]);
echo "$arr[0] | $result1[1] | $result1[2] | $arr[1] | $result2[1] | $result2[2] | $arr[2] | $arr[3] | $arr[4] |
";
$node{$arr[0]}=2;
$node{$arr[1]}=2;
}
}
}else{
echo "Details of network
";
echo "Gene A | Gene B | Relationship |
";
echo "ID | Ortholog in Arabidopsis (E-value) | Annotation | ID | Ortholog in Arabidopsis (E-value) | Annotation |
";
while(!feof($fp1))
{
$line = fgets($fp1);
$arr=explode("\t",$line);
$query=mysql_query("SELECT * FROM ortholog_annotation WHERE gene = '$arr[0]'");
$result1=mysql_fetch_row($query);
$query=mysql_query("SELECT * FROM ortholog_annotation WHERE gene = '$arr[1]'");
$result2=mysql_fetch_row($query);
if($result1[1]==""){$result1[1]="--";}
if($result2[1]==""){$result2[1]="--";}
$arr[2] = sprintf("%.2f",$arr[2]);
echo "$arr[0] | $result1[1] | $result1[2] | $arr[1] | $result2[1] | $result2[2] | $arr[4] |
";
$node{$arr[0]}=2;
$node{$arr[1]}=2;
}
}
echo "
";
foreach($node as $geneid=>$age){
$gene="$geneid\n";
fwrite($fp2,$gene);
}
?>