Example #1
0
    }
    return $sLogMessage;
}
if (PATH_COUNT == 1 && !ACTION) {
    // URL: /genes
    // View all entries.
    // Managers are allowed to download this list...
    if ($_AUTH['level'] >= LEVEL_MANAGER) {
        define('FORMAT_ALLOW_TEXTPLAIN', true);
    }
    define('PAGE_TITLE', 'View all genes');
    $_T->printHeader();
    $_T->printTitle();
    require ROOT_PATH . 'class/object_genes.php';
    $_DATA = new LOVD_Gene();
    $_DATA->viewList('Genes', array(), false, false, (bool) ($_AUTH['level'] >= LEVEL_MANAGER));
    $_T->printFooter();
    exit;
}
if (PATH_COUNT == 2 && preg_match('/^[a-z][a-z0-9#@-]*$/i', rawurldecode($_PE[1])) && !ACTION) {
    // URL: /genes/DMD
    // View specific entry.
    $sID = rawurldecode($_PE[1]);
    define('PAGE_TITLE', 'View ' . $sID . ' gene homepage');
    $_T->printHeader();
    $_T->printTitle();
    lovd_printGeneHeader();
    // Load appropriate user level for this gene.
    lovd_isAuthorized('gene', $sID);
    require ROOT_PATH . 'class/object_genes.php';
    $_DATA = new LOVD_Gene();
Example #2
0
            $aNavigation['variants?create&target=' . $nID] = array('menu_plus.png', 'Add variant to screening', 1);
            $aNavigation[CURRENT_PATH . '?removeVariants'] = array('cross.png', 'Remove variants from screening', $zData['variants_found_'] > 0 ? 1 : 0);
        }
        if ($_AUTH['level'] >= LEVEL_CURATOR) {
            $aNavigation[CURRENT_PATH . '?delete'] = array('cross.png', 'Delete screening entry', 1);
        }
    }
    lovd_showJGNavigation($aNavigation, 'Screenings');
    if (!empty($zData['search_geneid'])) {
        $_GET['search_geneid'] = html_entity_decode(rawurldecode($zData['search_geneid']));
        print '<BR><BR>' . "\n\n";
        $_T->printTitle('Genes screened', 'H4');
        require ROOT_PATH . 'class/object_genes.php';
        $_DATA = new LOVD_Gene();
        $_DATA->setSortDefault('id');
        $_DATA->viewList('Genes_for_S_VE', array(), true, true);
        unset($_GET['search_geneid']);
    }
    if ($zData['variants_found'] || !empty($zData['variants'])) {
        $_GET['search_screeningid'] = $nID;
        print '<BR><BR>' . "\n\n";
        $_T->printTitle('Variants found', 'H4');
        require ROOT_PATH . 'class/object_custom_viewlists.php';
        // VOG needs to be first, so it groups by the VOG ID.
        $_DATA = new LOVD_CustomViewList(array('VariantOnGenome', 'Scr2Var', 'VariantOnTranscript'));
        $_DATA->viewList('CustomVL_VOT_for_S_VE', array('transcriptid'), false, false, (bool) ($_AUTH['level'] >= LEVEL_MANAGER));
    }
    $_T->printFooter();
    exit;
}
if (PATH_COUNT == 1 && ACTION == 'create' && isset($_GET['target']) && ctype_digit($_GET['target'])) {
Example #3
0
     $aOptionsList['options'][1]['option_text'] = '<B>A variant that was only described on genomic level &raquo;&raquo;</B>';
     if ($_AUTH['level'] >= LEVEL_MANAGER) {
         $aOptionsList['options'][2]['onclick'] = 'variants/upload?create' . ($_GET['target'] ? '&amp;target=' . $_GET['target'] : '');
         $aOptionsList['options'][2]['option_text'] = '<B>I want to upload a file with genomic variant data &raquo;&raquo;</B>';
     }
     print '      What kind of variant would you like to submit?<BR><BR>' . "\n\n";
     print lovd_buildOptionTable($aOptionsList);
     require ROOT_PATH . 'class/object_genes.php';
     $_GET['page_size'] = 10;
     $_DATA = new LOVD_Gene();
     $_DATA->setRowLink($sViewListID, 'variants?create&reference=Transcript&geneid=' . $_DATA->sRowID . ($_GET['target'] ? '&target=' . $_GET['target'] : ''));
     $_GET['search_transcripts'] = '>0';
     print '      <DIV id="container" style="display : none;">' . "\n";
     // Extra div is to prevent "No entries in the database yet!" error to show up if there are no genes in the database yet.
     lovd_showInfoTable('Please find the gene for which you wish to submit this variant below, using the search fields if needed. <B>Click on the gene to proceed to the variant entry form</B>.<BR>If a gene is not shown in this display, but it does exist in this LOVD, then it does not have a transcript configured yet.', 'information', 600);
     $_DATA->viewList($sViewListID, array('transcripts', 'variants', 'diseases_', 'updated_date_'));
     print '      </DIV>' . "\n" . (!$bSubmit ? '' : '      <INPUT type="submit" value="Cancel" onclick="window.location.href=\'' . lovd_getInstallURL() . 'submit/screening/' . $_POST['screeningid'] . '\'; return false;" style="border : 1px solid #FF4422;">' . "\n");
     $_T->printFooter();
     exit;
 } elseif (!in_array($_GET['reference'], array('Genome', 'Transcript')) || $_GET['reference'] == 'Transcript' && empty($_GET['geneid'])) {
     exit;
 }
 // URL: /variants?create&reference=('Genome'|'Transcript')
 // Create a variant on the genome.
 if ($_GET['reference'] == 'Transcript') {
     // On purpose not checking for format of $_GET['geneid']. If it's not right, we'll automatically get to the error message below.
     $sGene = $_DB->query('SELECT id FROM ' . TABLE_GENES . ' WHERE id = ?', array($_GET['geneid']))->fetchColumn();
     if (!$sGene) {
         define('PAGE_TITLE', 'Create a new variant entry');
         $_T->printHeader();
         $_T->printTitle();