Example #1
0
        $_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'])) {
    // URL: /screenings?create
    // Create a new entry.
    define('LOG_EVENT', 'ScreeningCreate');
    lovd_requireAUTH(LEVEL_SUBMITTER);
    $_GET['target'] = sprintf('%08d', $_GET['target']);
    $z = $_DB->query('SELECT id FROM ' . TABLE_INDIVIDUALS . ' WHERE id = ?', array($_GET['target']))->fetchAssoc();
    if (!$z) {
        define('PAGE_TITLE', 'Create a new screening entry');
        $_T->printHeader();
Example #2
0
         $aVOT = $_DB->query('SELECT t.id, t.geneid, t.name, t.id_ncbi FROM ' . TABLE_TRANSCRIPTS . ' AS t LEFT OUTER JOIN ' . TABLE_GENES . ' AS g ON (t.geneid = g.id) WHERE g.chromosome = ? AND t.id IN (?' . str_repeat(', ?', count($_POST['transcripts']) - 1) . ')', array_merge(array($zData['chromosome']), $_POST['transcripts']))->fetchAllAssoc();
     } else {
         $aVOT = array();
     }
 } else {
     $aVOT = $_DB->query('SELECT t.id, t.geneid, t.name, t.id_ncbi FROM ' . TABLE_TRANSCRIPTS . ' AS t LEFT OUTER JOIN ' . TABLE_VARIANTS_ON_TRANSCRIPTS . ' AS vot ON (t.id = vot.transcriptid) WHERE vot.id = ? ORDER BY t.geneid, id_ncbi', array($nID))->fetchAllAssoc();
 }
 $_GET['page_size'] = 10;
 $_GET['search_id'] = '';
 foreach ($aVOT as $aTranscript) {
     $_GET['search_id'] .= '!' . $aTranscript['id'] . ' ';
 }
 $_GET['search_id'] = !empty($_GET['search_id']) ? rtrim($_GET['search_id']) : '!0';
 $_GET['search_chromosome'] = '="' . $zData['chromosome'] . '"';
 require ROOT_PATH . 'class/object_custom_viewlists.php';
 $_DATA = new LOVD_CustomViewList(array('Gene', 'Transcript', 'DistanceToVar'), $zData['id']);
 // DistanceToVar needs the VariantID.
 $_DATA->setRowLink('VOT_map', 'javascript:lovd_addTranscript(\'{{ViewListID}}\', \'{{ID}}\', \'{{zData_geneid}}\', \'{{zData_name}}\', \'{{zData_id_ncbi}}\'); return false;');
 $_DATA->viewList('VOT_map', array(), true);
 print '      <BR><BR>' . "\n\n";
 lovd_showInfoTable('The variant entry is currently mapped to the following transcripts. Click on the cross at the right side of the transcript to remove the mapping.', 'information');
 print '      <TABLE class="sortable_head" style="width : 652px;"><TR><TH width="100">Gene</TH>' . '<TH style="text-align : left;">Name</TH><TH width="123" style="text-align : left;">Transcript ID</TH><TH width="20">&nbsp;</TH>' . '</TR></TABLE>' . "\n" . '      <FORM action="' . CURRENT_PATH . '?' . ACTION . '" method="post">' . "\n" . '        <UL id="transcript_list" class="sortable" style="margin-top : 0px; width : 650px;">' . "\n";
 // Now loop the items in the order given.
 foreach ($aVOT as $aTranscript) {
     print '          <LI id="li_' . $aTranscript['id'] . '"><INPUT type="hidden" name="transcripts[]" value="' . $aTranscript['id'] . '"><TABLE width="100%"><TR><TD width="98">' . $aTranscript['geneid'] . '</TD>' . '<TD align="left">' . $aTranscript['name'] . '</TD><TD width="120" align="left">' . $aTranscript['id_ncbi'] . '</TD><TD width="20" align="right"><A href="#" onclick="lovd_removeTranscript(\'VOT_map\', \'' . $aTranscript['id'] . '\', \'' . $aTranscript['id_ncbi'] . '\'); return false;"><IMG src="gfx/mark_0.png" alt="Remove" width="11" height="11" border="0"></A></TD>' . '</TR></TABLE></LI>' . "\n";
 }
 print '        </UL>' . "\n";
 // Array which will make up the form table.
 $aForm = array(array('POST', '', '', '', '0%', '0', '100%'), array('', '', 'print', 'Enter your password for authorization'), array('', '', 'password', 'password', 20), array('', '', 'print', '<INPUT type="submit" value="Save transcript list">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<INPUT type="submit" value="Cancel" onclick="window.location.href=\'' . lovd_getInstallURL() . CURRENT_PATH . '\'; return false;" style="border : 1px solid #FF4422;">'));
 lovd_viewForm($aForm);
 print "\n" . '      </FORM>' . "\n\n";
Example #3
0
    }
    if (count($zData['screeningids'])) {
        $_GET['search_individualid'] = $nID;
        print '<BR><BR>' . "\n\n";
        $_T->printTitle('Screenings', 'H4');
        require ROOT_PATH . 'class/object_screenings.php';
        $_DATA = new LOVD_Screening();
        $_DATA->setSortDefault('id');
        $_DATA->viewList('Screenings_for_I_VE', array('screeningid', 'individualid', 'created_date', 'edited_date'), true, true);
        unset($_GET['search_individualid']);
        $_GET['search_screeningid'] = implode('|', $zData['screeningids']);
        print '<BR><BR>' . "\n\n";
        $_T->printTitle('Variants', '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_I_VE', array(), false, false, (bool) ($_AUTH['level'] >= LEVEL_MANAGER));
    }
    $_T->printFooter();
    exit;
}
if (PATH_COUNT == 1 && ACTION == 'create') {
    // URL: /individuals?create
    // Create a new entry.
    define('PAGE_TITLE', 'Create a new individual information entry');
    define('LOG_EVENT', 'IndividualCreate');
    lovd_isAuthorized('gene', $_AUTH['curates']);
    lovd_requireAUTH(LEVEL_SUBMITTER);
    require ROOT_PATH . 'class/object_individuals.php';
    $_DATA = new LOVD_Individual();
    require ROOT_PATH . 'inc-lib-form.php';
Example #4
0
        $_GET['search_transcriptid'] = $nTranscriptID;
        $sMessage = 'The variants shown are described using the ' . $sTranscript . ' transcript reference sequence.';
    } else {
        // Create select box.
        // We would like to be able to link to this list, focussing on a certain transcript but without restricting the viewer, by sending a (numeric) get_transcriptid search term.
        if (!isset($_GET['search_transcriptid']) || !isset($aTranscripts[$_GET['search_transcriptid']])) {
            $_GET['search_transcriptid'] = $nTranscriptID;
        }
        $sSelect = '<SELECT id="change_transcript" onchange="$(\'input[name=\\\'search_transcriptid\\\']\').val($(this).val()); lovd_AJAX_viewListSubmit(\'' . $sViewListID . '\');">';
        foreach ($aTranscripts as $nTranscriptID => $sTranscript) {
            $sSelect .= '<OPTION value="' . $nTranscriptID . '"' . ($_GET['search_transcriptid'] != $nTranscriptID ? '' : ' selected') . '>' . $sTranscript . '</OPTION>';
        }
        $sTranscript = $sSelect . '</SELECT>';
        $sMessage = 'The variants shown are described using the ' . $sTranscript . ' transcript reference sequence.';
    }
    if (FORMAT == 'text/html') {
        lovd_showInfoTable($sMessage);
    }
    if ($nTranscripts > 0) {
        require ROOT_PATH . 'class/object_custom_viewlists.php';
        $_DATA = new LOVD_CustomViewList(array('VariantOnTranscript', 'VariantOnGenome', 'Screening', 'Individual'), $sGene);
        $_DATA->viewList($sViewListID, array('chromosome'), false, false, $_AUTH['level'] >= LEVEL_CURATOR, false, true);
        // Notes for the variant listings...
        if (!empty($_SETT['currdb']['note_listing'])) {
            print $_SETT['currdb']['note_listing'] . '<BR><BR>' . "\n\n";
        }
    }
    lovd_printGeneFooter();
    $_T->printFooter();
    exit;
}