Commit f32aa33f authored by Ivo Fokkema's avatar Ivo Fokkema

Reverted changes made for supporting full_group_by in object_genes.php and screenings.php.

- Genes are assumed to be in sense when at least one transcript is in sense.
parent 4f47758c
......@@ -4,10 +4,10 @@
* LEIDEN OPEN VARIATION DATABASE (LOVD)
*
* Created : 2010-12-15
* Modified : 2017-10-26
* Modified : 2019-08-07
* For LOVD : 3.0-21
*
* Copyright : 2004-2017 Leiden University Medical Center; http://www.LUMC.nl/
* Copyright : 2004-2019 Leiden University Medical Center; http://www.LUMC.nl/
* Programmers : Ivar C. Lugtenburg <I.C.Lugtenburg@LUMC.nl>
* Ivo F.A.C. Fokkema <I.F.A.C.Fokkema@LUMC.nl>
* Daan Asscheman <D.Asscheman@LUMC.nl>
......@@ -67,7 +67,7 @@ class LOVD_Gene extends LOVD_Object {
$this->aSQLViewEntry['SELECT'] = 'g.*, g.id_entrez AS id_pubmed_gene, IF(g.show_genetests AND g.id_entrez, g.id_entrez, 0) AS show_genetests, ' .
'GROUP_CONCAT(DISTINCT d.id, ";", IFNULL(d.id_omim, 0), ";", IF(CASE d.symbol WHEN "-" THEN "" ELSE d.symbol END = "", d.name, d.symbol), ";", d.name ORDER BY (d.symbol != "" AND d.symbol != "-") DESC, d.symbol, d.name SEPARATOR ";;") AS __diseases, ' .
'GROUP_CONCAT(DISTINCT t.id, ";", t.id_ncbi ORDER BY t.id_ncbi SEPARATOR ";;") AS __transcripts, ' .
'(MAX(t.position_g_mrna_start) < MAX(t.position_g_mrna_end)) AS sense, ' .
'MAX(t.position_g_mrna_start < t.position_g_mrna_end) AS sense, ' .
'LEAST(MIN(t.position_g_mrna_start), MIN(t.position_g_mrna_end)) AS position_g_mrna_start, ' .
'GREATEST(MAX(t.position_g_mrna_start), MAX(t.position_g_mrna_end)) AS position_g_mrna_end, ' .
'GROUP_CONCAT(DISTINCT u2g.userid, ";", ua.name, ";", u2g.allow_edit, ";", show_order ORDER BY (u2g.show_order > 0) DESC, u2g.show_order SEPARATOR ";;") AS __curators, ' .
......
......@@ -4,10 +4,10 @@
* LEIDEN OPEN VARIATION DATABASE (LOVD)
*
* Created : 2011-03-18
* Modified : 2018-08-09
* Modified : 2019-08-07
* For LOVD : 3.0-22
*
* Copyright : 2004-2018 Leiden University Medical Center; http://www.LUMC.nl/
* Copyright : 2004-2019 Leiden University Medical Center; http://www.LUMC.nl/
* Programmers : Ivar C. Lugtenburg <I.C.Lugtenburg@LUMC.nl>
* Ivo F.A.C. Fokkema <I.F.A.C.Fokkema@LUMC.nl>
* Daan Asscheman <D.Asscheman@LUMC.nl>
......@@ -845,7 +845,7 @@ if (PATH_COUNT == 2 && ctype_digit($_PE[1]) && ACTION == 'delete') {
$zData = $_DATA->loadEntry($nID);
require ROOT_PATH . 'inc-lib-form.php';
$a = $_DB->query('SELECT variantid, MIN(screeningid) FROM ' . TABLE_SCR2VAR . ' GROUP BY variantid HAVING COUNT(screeningid) = 1 AND MIN(screeningid) = ?', array($nID))->fetchAllColumn();
$a = $_DB->query('SELECT variantid, screeningid FROM ' . TABLE_SCR2VAR . ' GROUP BY variantid HAVING COUNT(screeningid) = 1 AND screeningid = ?', array($nID))->fetchAllColumn();
$aVariantsRemovable = array();
if (!empty($a)) {
$aVariantsRemovable = $_DB->query('SELECT variantid FROM ' . TABLE_SCR2VAR . ' WHERE screeningid = ? AND variantid IN (?' . str_repeat(', ?', count($a) - 1) . ')', array_merge(array($nID), $a))->fetchAllColumn();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment