Download Latest Version simple_sbml.php.zip (1.1 kB)
Email in envelope

Get an email when there's a new version of Simple PHP SBML

Home
Name Modified Size InfoDownloads / Week
readme.txt 2011-10-11 1.2 kB
simple_sbml.php.zip 2011-10-11 1.1 kB
Totals: 2 Items   2.3 kB 0
README

File simple_sbml.php contains 1 class with SBML related methods.
There are:
	sbml_model($sbml_file) // recieves path to sbml file, returns simple_sbml object
	get_name() // extract sbml model name
	get_reaction_name($row) // receives integer, returns corresponding reaction name
	get_reaction_id($row) // receives integer, returns corresponding reaction sbml id
	get_reaction_count() // counts all reactions, returns total number
	get_reactants_count($row) // returns total number of reactants for particular reaction
	get_products_count($row) // returns total number of products for particular reaction
	get_reactants($row) // returns an array with reactants for particular reaction
	get_products($row) // returns an array with products for particular reaction
	get_reaction_string($row) // concatenates reactants and products, returns string similar to "APD + PPA -> PHP + FTP"
	
Example #1:
<?php
$sbml_model = new simple_sbml('data1.xml');
print($sbml_model->get_name()); // prints model name
?>

Example #2:
<?php
$sbml_model = new simple_sbml('data1.xml');
for($i=0;$i < $sbml_model->get_reaction_count();$i++) // prints all reactions
{
    print($sbml_model->get_reaction_string($i)."<br>");
}
?>
Source: readme.txt, updated 2011-10-11