Ejemplo n.º 1
0
=head1 COPYRIGHT

University of LE<uuml>beck, Germany, 2011

=cut

ENDOFDOCUMENTATION
*/
//include 'html/header.html';
require_once 'qtl_functions.php';
require_once 'db_functions.php';
require_once 'utils.php';
//measure running-time
//$start = tic();
$qtldb = connectToQtlDB();
$compara = connectToCompara(3306);
//get is not working for now...
$loci_str = 'loci';
if (isset($_GET[$loci_str])) {
    $loci = $_GET[$loci_str];
} else {
    $speciesArray = array("Rattus norvegicus", "Mus musculus");
    $genome_db_ids = array(57, 3);
    $species2genome_db_ids = array("Rattus norvegicus" => 3, "Mus musculus" => 57);
    $genome_ids2dbs = array(57 => 'eqtl_rostock_eae', 3 => 'eqtl_stockholm_eae_logplier');
    $num_species = sizeof($speciesArray);
    $species_str = 'species';
    $reg_str = 'region';
    $chr_str = 'chr';
    $args = $_GET;
    $species1 = "Mus musculus";
Ejemplo n.º 2
0
		<?php 
showProjectList($projects, false);
?>
	</div>
</div>
<br style="clear: both;" />
		<?php 
if ($projects[0] == NULL || $projects[0] == "NULL") {
    include "../eqtl/footer.php";
    exit;
}
// only the database of the source project needs to be opened
$src_proj = $projects[0];
connectToQtlDBs(array($src_proj));
$qtldb = $compara_array[$src_proj]['connection'];
$compara = connectToCompara();
// region selection
// fetch chromosomes to species id
$ens_species = $compara_array[$src_proj]['ensembl_species'];
$chrs = getChromosomesAndLengths($compara, $ens_species);
// additional filtering
$chrs = filter_chromos($qtldb, $chrs);
$species = $compara_array[$src_proj]['species'];
// get selected regions
$chr2reg = array();
if (isset($args[$reg_str])) {
    $regs = $args[$reg_str];
    foreach ($regs as $reg) {
        $pos = strpos($reg, ":");
        $chr2reg[substr($reg, 0, $pos)][] = substr($reg, $pos + 1);
    }
Ejemplo n.º 3
0
Michael Brehler <*****@*****.**>,
Georg Zeplin <*****@*****.**>,

=head1 COPYRIGHT

University of LE<uuml>beck, Germany, 2011

=cut

ENDOFDOCUMENTATION
*/
require_once 'db_functions.php';
require_once 'analysis/func_analysis.php';
$fptr = fopen('analysis/QTL.txt', 'w');
echo "a";
$targetdb = connectToQTL();
echo "a";
$comparaDB = connectToCompara();
echo "a";
$table = get_all_QTL($targetdb);
echo "a";
$str = "start_bps\t\tstop_bps\t\tChr\t\tspecies\t\tsyntenyID\r\n";
foreach ($table as $row) {
    if ($row[0] != NULL && $row[1] != NULL && $row[2] != NULL && $row[3] != NULL) {
        $tmp = getSyntenyRegionIDs($comparaDB, $row);
        $str .= $row[0] . "\t\t" . $row[1] . "\t\t" . $row[2] . "\t\t" . $row[3] . "\t\t" . $tmp . "\n";
    }
}
fwrite($fptr, $str);
fclose($fptr);