예제 #1
0
        $sGene = '';
    } else {
        $sGene = $_DB->query('SELECT id FROM ' . TABLE_GENES . ' WHERE id = ?', array(rawurldecode($_PE[1])))->fetchColumn();
        $_GET['search_geneid'] = '="' . $sGene . '"';
        lovd_isAuthorized('gene', $sGene);
    }
    define('PAGE_TITLE', 'View all transcripts' . ($sGene ? ' of gene ' . $sGene : ''));
    $_T->printHeader();
    $_T->printTitle();
    if ($sGene) {
        lovd_printGeneHeader();
    }
    require ROOT_PATH . 'class/object_transcripts.php';
    $_DATA = new LOVD_Transcript();
    $_DATA->sSortDefault = $sGene ? 'variants' : 'geneid';
    $_DATA->viewList('Transcripts', $sGene ? 'geneid' : '', false, false, (bool) ($_AUTH['level'] >= LEVEL_CURATOR));
    if ($sGene) {
        lovd_printGeneFooter();
    }
    $_T->printFooter();
    exit;
}
if (PATH_COUNT == 2 && ctype_digit($_PE[1]) && !ACTION) {
    // URL: /transcripts/00001
    // View specific entry.
    $nID = sprintf('%08d', $_PE[1]);
    define('PAGE_TITLE', 'View transcript #' . $nID);
    $_T->printHeader();
    $_T->printTitle();
    // Load appropriate user level for this transcript.
    lovd_isAuthorized('transcript', $nID);
예제 #2
0
파일: genes.php 프로젝트: LOVDnl/LOVD3
        $aNavigation[$_PE[0] . '/' . $sID . '?empty'] = array('menu_empty.png', 'Empty this gene database', (bool) $zData['variants']);
        $aNavigation[$_PE[0] . '/' . $sID . '/graphs'] = array('menu_graphs.png', 'View graphs about this gene database', 1);
        $aNavigation[$_PE[0] . '/' . $sID . '/columns'] = array('menu_columns.png', 'View enabled variant columns', 1);
        $aNavigation[$_PE[0] . '/' . $sID . '/columns?order'] = array('menu_columns.png', 'Re-order enabled variant columns', 1);
        $aNavigation['columns/VariantOnTranscript'] = array('menu_columns.png', 'View all available variant columns', 1);
        $aNavigation['download/all/gene/' . $sID] = array('menu_save.png', 'Download all this gene\'s data', 1);
        $aNavigation['javascript:lovd_openWindow(\'' . lovd_getInstallURL() . 'scripts/refseq_parser.php?step=1&symbol=' . $sID . '\', \'refseq_parser\', 900, 500);'] = array('menu_scripts.png', 'Create human-readable refseq file', $zData['refseq_UD'] && count($zData['transcripts']));
    }
    lovd_showJGNavigation($aNavigation, 'Genes');
    $_GET['search_geneid'] = '="' . $sID . '"';
    print '<BR><BR>' . "\n\n";
    $_T->printTitle('Active transcripts', 'H4');
    require ROOT_PATH . 'class/object_transcripts.php';
    $_DATA = new LOVD_Transcript();
    $_DATA->setSortDefault('variants');
    $_DATA->viewList('Transcripts_for_G_VE', 'geneid', true, true);
    // Disclaimer.
    if ($zData['disclaimer']) {
        print '<BR>' . "\n\n" . '      <TABLE border="0" cellpadding="0" cellspacing="1" width="950" class="data">' . "\n" . '        <TR>' . "\n" . '          <TH class="S15">Copyright &amp; disclaimer</TH></TR>' . "\n" . '        <TR class="S11">' . "\n" . '          <TD>' . $zData['disclaimer_text_'] . '</TD></TR></TABLE><BR>' . "\n\n";
    }
    lovd_printGeneFooter();
    $_T->printFooter();
    exit;
}
if (PATH_COUNT == 1 && ACTION == 'create') {
    // URL: /genes?create
    // Create a new entry.
    define('PAGE_TITLE', 'Create a new gene information entry');
    define('LOG_EVENT', 'GeneCreate');
    // Require manager clearance.
    lovd_requireAUTH(LEVEL_MANAGER);