Пример #1
0
   <tocpart>

HEADER;
require_once "XML_PullParser.inc";
$files = array();
$file = "synopsis.xml";
$xml_outfile = "XML_PullParser_contents.xml";
$html_outfile = "html_contents.html";
$handle = openOutputFile($xml_outfile);
$html_handle = openOutputFile($html_outfile);
writeHeader($handle);
writeText($html_handle, $HTML_Header);
echo "<A href = \"article2html.php?fn=synopsis.xml\">Synopsis</A><br>\n";
writeEntry($handle, "synopsis.xml", "Synopsis");
writeHTMLEntry($html_handle, "synopsis.xml", "Synopsis");
while ($file = toc($file)) {
}
writeFooter($handle, $xml_outfile);
writeHTMLFooter($html_handle, $html_outfile);
function toc($file)
{
    global $handle, $html_handle;
    global $files;
    $tags = array("para");
    $child_tags = array("ulink");
    $parser = new XML_PullParser($file, $tags, $child_tags);
    $next_url = "";
    $prev_url = "";
    while ($token = $parser->XML_PullParser_getToken()) {
        if ($link = $parser->XML_PullParser_getElement('ulink')) {
            while ($link = $parser->XML_PullParser_nextElement()) {
Пример #2
0
<?php

include 'html/header.html';
require_once 'db_functions.php';
require_once 'qtl_functions.php';
require_once 'utils.php';
require_once 'fill_related_projects.php';
fill_compara_array();
connectToQtlDBs(array('Ratte'));
global $compara_array;
$db = $compara_array['Ratte']['connection'];
useDB('eqtl_stockholm_eae_logplier', $db);
//useDB('eqtl_rostock_eae', $db);
$loci = array('c1.loc1', 'c1.loc10', 'c1.loc100', 'c1.loc101', 'c1.loc102', 'c1.loc103', 'c1.loc104', 'c1.loc105', 'c1.loc106', 'c1.loc107', 'c1.loc108', 'c1.loc109', 'c1.loc11', 'c1.loc110', 'c1.loc111', 'c1.loc112', 'c1.loc113', 'c1.loc114', 'c1.loc115');
//$loci = array('c9.loc48', 'c9.loc43', 'c9.loc40' , 'c9.loc39');
loci2stable_ids_new($loci, $db);
loci2stable_ids_new($loci, $db);
$t = tic();
print_r(loci2stable_ids_new($loci, $db));
print "<br>";
print "<br>";
toc($t, 'opt');
print "<br>";
print "<br>";
$t = tic();
print_r(loci2stable_ids($loci, $db));
print "<br>";
print "<br>";
toc($t, 'normal');
include 'html/footer.html';
Пример #3
0
    $intervalEnd[$i] = bp2cM($regionChr[$i], (int) $regionEnd[$i], $experiment1['species']);
}
$chromosomsEx1 = $regionChr;
$ex1 = get_loci_from_sql($database1, $experiment1['connection'], 'userinterval', $chromosomsEx1, $confidence_int, $group2region, $intervalStart, $intervalEnd);
if (!empty($ex1)) {
    // converts $ex1 in 2 arrays: $groups1 = groupnr -> ('loci' -> lociOfGroup, 'start', 'end', 'Chr') $mapEx1 = index -> (locus,groupNr)
    list($groups1, $mapEx1) = $ex1;
} else {
    echo '<INPUT TYPE=BUTTON VALUE="back" onClick="history.back()">';
    echo '<br />';
    fatal_error('nothing found for the given region(-s)');
}
// generates an arrays with index -> locinames
// $loci_ex1 = array_map('current',$mapEx1);
$chromosomsEx2 = getChromosomes($compara, $experiment2['ensembl_species']);
//filter compara chromosoms for existing chromosoms in QTL-database
$chromosomsEx2 = filter_chromos($experiment2['connection'], array_flip($chromosomsEx2));
$chromosomsEx2 = array_flip($chromosomsEx2);
$ex2 = get_loci_from_sql($database2, $experiment2['connection'], 'wholeGenome', $chromosomsEx2, $confidence_int, $group2region2);
// converts $ex2 in 2 arrays: $groups2 = groupnr -> ('loci' -> lociOfGroup, 'start', 'end') $mapEx2 = index -> (locus,groupNr)
list($groups2, $mapEx2) = $ex2;
// generates an arrays with index -> locinames
// $loci_ex2 = array_map('current',$mapEx2);
// SYNTENY
$genome_db_ids = getGenomeDBIDs($compara, array($experiment1['ensembl_species'], $experiment2['ensembl_species']));
$dbs = array($database1, $database2);
$groupSynteny_ex12ex2 = getSyntenyGroups(array($experiment1['connection'], $experiment2['connection']), $compara, $groups1, $groups2, $species_names, $genome_db_ids, $dbs);
// display -----------------------
include 'display_table.php';
toc($start, 'Synteny search');
require_once "../eqtl/footer.php";
Пример #4
0
function runTest($func, $name, $octave)
{
    $func($octave);
    echo $name . str_repeat(" ", 10 - strlen($name)) . toc() . "\n";
}