Пример #1
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";
Пример #2
0
		<?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);
    }
}
//confidence intervall
$confidence_int_str = 'confidence_int';
if (isset($args[$confidence_int_str])) {
    $confidence_int_len = $args[$confidence_int_str];
} else {
Пример #3
0
$chrs = filter_chromos($experiment1['connection'], $chrs);
$chromosomsEx1 = array_keys($chrs);
//getChromosoms($compara, $experiment1['genome_db_id']);
//initialize array for mapping groupnumbers to regions
$group2region = array();
$ex1 = get_loci_from_sql($database1, $experiment1['connection'], 'wholeGenome', $chromosomsEx1, $confidence_int, $group2region);
// converts $ex1 in 2 arrays: $groups1 = groupnr -> ('loci' -> lociOfGroup, 'start', 'end', 'Chr') $mapEx1 = index -> (locus,groupNr)
list($groups1, $mapEx1) = $ex1;
// generates an arrays with index -> locinames
$loci_ex1 = array_map('current', $mapEx1);
$groupnr_ex1 = array_map('next', $mapEx1);
$loci2group1 = array_combine($loci_ex1, $groupnr_ex1);
$chrs = getChromosomesAndLengths($compara, $experiment2['ensembl_species']);
// additional filtering
useDB($database2, $experiment2['connection']);
$chrs = filter_chromos($experiment1['connection'], $chrs);
$chromosomsEx2 = array_keys($chrs);
//getChromosoms($compara, $experiment1['genome_db_id']);
//initialize array for mapping groupnumbers to regions
$group2region2 = array();
$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']));
$groupSynteny_ex12ex2 = getSyntenyGroups(array($experiment1['connection'], $experiment2['connection']), $compara, $groups1, $groups2, $species_names, $genome_db_ids, $dbs);
// homo
useDB($database1, $experiment1['connection']);
$loci2stable_ids_ex1 = loci2stable_ids($loci_ex1, $experiment1['connection']);