Commit db80d713 authored by Fokkema's avatar Fokkema

Enlarge the VOG/DNA and VOT/DNA fields to VARCHAR(255), if they are smaller than this.

- This allows for larger insertions to be stored.
- LOVD+ is using the same sizes, so this also reduces one difference between LOVD3 and LOVD+.
parent f8ae6b0d
......@@ -4,7 +4,7 @@
* LEIDEN OPEN VARIATION DATABASE (LOVD)
*
* Created : 2009-10-19
* Modified : 2019-02-13
* Modified : 2019-07-30
* For LOVD : 3.0-22
*
* Copyright : 2004-2019 Leiden University Medical Center; http://www.LUMC.nl/
......@@ -149,7 +149,7 @@ $aRequired =
$_SETT = array(
'system' =>
array(
'version' => '3.0-21c',
'version' => '3.0-21d',
),
'user_levels' =>
array(
......
......@@ -4,7 +4,7 @@
* LEIDEN OPEN VARIATION DATABASE (LOVD)
*
* Created : 2010-01-14
* Modified : 2019-02-13
* Modified : 2019-07-30
* For LOVD : 3.0-22
*
* Copyright : 2004-2019 Leiden University Medical Center; http://www.LUMC.nl/
......@@ -639,6 +639,26 @@ if ($sCalcVersionFiles != $sCalcVersionDB) {
'PREPARE Statement FROM @sSQL',
'EXECUTE Statement',
),
'3.0-21d' => array(
'SET @bExists := (SELECT COUNT(*) FROM information_schema.COLUMNS WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = "' . TABLE_VARIANTS . '" AND COLUMN_NAME = "VariantOnGenome/DNA" AND CHARACTER_MAXIMUM_LENGTH < 255)',
'SET @sSQL := IF(@bExists < 1, \'SELECT "INFO: Column not found or already enlarged."\', "
ALTER TABLE ' . TABLE_VARIANTS . ' MODIFY COLUMN `VariantOnGenome/DNA` VARCHAR(255) NOT NULL")',
'PREPARE Statement FROM @sSQL',
'EXECUTE Statement',
'SET @sSQL := IF(@bExists < 1, \'SELECT "INFO: Column not found or already enlarged."\', "
UPDATE ' . TABLE_COLS . ' SET mysql_type = \"VARCHAR(255)\" WHERE id = \"VariantOnGenome/DNA\"")',
'PREPARE Statement FROM @sSQL',
'EXECUTE Statement',
'SET @bExists := (SELECT COUNT(*) FROM information_schema.COLUMNS WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = "' . TABLE_VARIANTS_ON_TRANSCRIPTS . '" AND COLUMN_NAME = "VariantOnTranscript/DNA" AND CHARACTER_MAXIMUM_LENGTH < 255)',
'SET @sSQL := IF(@bExists < 1, \'SELECT "INFO: Column not found or already enlarged."\', "
ALTER TABLE ' . TABLE_VARIANTS_ON_TRANSCRIPTS . ' MODIFY COLUMN `VariantOnTranscript/DNA` VARCHAR(255) NOT NULL")',
'PREPARE Statement FROM @sSQL',
'EXECUTE Statement',
'SET @sSQL := IF(@bExists < 1, \'SELECT "INFO: Column not found or already enlarged."\', "
UPDATE ' . TABLE_COLS . ' SET mysql_type = \"VARCHAR(255)\" WHERE id = \"VariantOnTranscript/DNA\"")',
'PREPARE Statement FROM @sSQL',
'EXECUTE Statement',
),
);
if ($sCalcVersionDB < lovd_calculateVersion('3.0-alpha-01')) {
......
......@@ -4,10 +4,10 @@
* LEIDEN OPEN VARIATION DATABASE (LOVD)
*
* Created : 2009-10-22
* Modified : 2017-03-10
* For LOVD : 3.0-19
* Modified : 2019-07-30
* For LOVD : 3.0-22
*
* Copyright : 2004-2017 Leiden University Medical Center; http://www.LUMC.nl/
* Copyright : 2004-2019 Leiden University Medical Center; http://www.LUMC.nl/
* Programmers : Ivo F.A.C. Fokkema <I.F.A.C.Fokkema@LUMC.nl>
* Ivar C. Lugtenburg <I.C.Lugtenburg@LUMC.nl>
* M. Kroon <m.kroon@lumc.nl>
......@@ -66,7 +66,7 @@ $aColSQL =
'INSERT INTO ' . TABLE_COLS . ' VALUES ("VariantOnGenome/Conservation_score/GERP", 4, 100, 0, 0, 0, "GERP conservation", "", "Conservation score as calculated by GERP.", "The Conservation score as calculated by GERP.", "DECIMAL(5,3)", "GERP conservation score||text|6", "", "", 1, 1, 1, 0, NOW(), NULL, NULL)',
'INSERT INTO ' . TABLE_COLS . ' VALUES ("VariantOnGenome/DBID", 7, 120, 1, 1, 1, "DB-ID", "NOTE: This field will be predicted and filled in by LOVD, if left empty.", "Database ID of variant starting with the HGNC gene symbol, followed by an underscore (_) and a six digit number (e.g. DMD_012345). _000000 is used for variants where DNA was not analysed (change predicted from RNA analysis), variants seen in animal models or variants not seen in humans but functionally tested in vitro.", "Database ID of variant, grouping multiple observations of the same variant together, starting with the HGNC gene symbol, followed by an underscore (_) and a six digit number (e.g. DMD_012345). _000000 is used for variants where DNA was not analysed (change predicted from RNA analysis), variants seen in animal models or variants not seen in humans but functionally tested in vitro.", "VARCHAR(50)", "ID|This ID is used to group multiple observations of the same variant together. This field will be predicted and filled in by LOVD when left empty. The ID starts with the HGNC gene symbol of the transcript most influenced by the variant or otherwise the closest gene, followed by an underscore (_) and a six digit number (e.g. DMD_012345). _000000 is used for variants where DNA was not analysed (change predicted from RNA analysis), variants seen in animal models or variants not seen in humans but functionally tested in vitro.|text|20", "", "/^(chr(\\\\d{1,2}|[XYM])|(C(\\\\d{1,2}|[XYM])orf[\\\\d][\\\\dA-Z]*-|[A-Z][A-Z0-9]*-)?(C(\\\\d{1,2}|[XYM])orf[\\\\d][\\\\dA-Z]*|[A-Z][A-Z0-9-]*))_\\\\d{6}$/", 1, 0, 1, 0, NOW(), NULL, NULL)',
'INSERT INTO ' . TABLE_COLS . ' VALUES ("VariantOnGenome/dbSNP", 8, 120, 0, 0, 0, "dbSNP ID", "", "The dbSNP ID.", "The dbSNP ID.", "VARCHAR(15)", "dbSNP ID|If available, please fill in the dbSNP ID, such as rs12345678.|text|10", "", "/^[rs]s\\\\d+$/", 1, 1, 1, 0, NOW(), NULL, NULL)',
'INSERT INTO ' . TABLE_COLS . ' VALUES ("VariantOnGenome/DNA", 2, 200, 1, 1, 1, "DNA change (genomic)", "", "Description of variant at DNA level, based on the genomic DNA reference sequence (following HGVS recommendations).", "Description of variant at DNA level, based on the genomic DNA reference sequence (following HGVS recommendations).<BR>\r\n<UL style=\"margin-top : 0px;\">\r\n <LI>g.12345678C>T</LI>\r\n <LI>g.12345678_12345890del</LI>\r\n <LI>g.12345678_12345890dup</LI>\r\n</UL>", "VARCHAR(100)", "Genomic DNA change (HGVS format)|Description of variant at DNA level, based on the genomic DNA reference sequence (following HGVS recommendations); e.g. g.12345678C>T, g.12345678_12345890del, g.12345678_12345890dup.|text|30", "", "", 1, 1, 1, 0, NOW(), NULL, NULL)',
'INSERT INTO ' . TABLE_COLS . ' VALUES ("VariantOnGenome/DNA", 2, 200, 1, 1, 1, "DNA change (genomic)", "", "Description of variant at DNA level, based on the genomic DNA reference sequence (following HGVS recommendations).", "Description of variant at DNA level, based on the genomic DNA reference sequence (following HGVS recommendations).<BR>\r\n<UL style=\"margin-top : 0px;\">\r\n <LI>g.12345678C>T</LI>\r\n <LI>g.12345678_12345890del</LI>\r\n <LI>g.12345678_12345890dup</LI>\r\n</UL>", "VARCHAR(255)", "Genomic DNA change (HGVS format)|Description of variant at DNA level, based on the genomic DNA reference sequence (following HGVS recommendations); e.g. g.12345678C>T, g.12345678_12345890del, g.12345678_12345890dup.|text|30", "", "", 1, 1, 1, 0, NOW(), NULL, NULL)',
'INSERT INTO ' . TABLE_COLS . ' VALUES ("VariantOnGenome/Frequency", 9, 90, 0, 1, 0, "Frequency", "", "Frequency in which the variant was found; e.g 5/760 chromosomes (in 5 of 760 chromosomes tested), 1/33 patients (in 1 of 33 patients analysed in study), 0.05 controls (in 5% of control cases tested).", "Frequency in which the variant was found; e.g 5/760 chromosomes (in 5 of 760 chromosomes tested), 1/33 patients (in 1 of 33 patients analysed in study), 0.05 controls (in 5% of control cases tested).", "VARCHAR(15)", "Frequency|Frequency in which the variant was found; e.g 5/760 chromosomes (in 5 of 760 chromosomes tested), 1/33 patients (in 1 of 33 patients analysed in study), 0.05 controls (in 5% of control cases tested). Preferred format is 3/75, not 0.04.|text|10", "", "", 1, 1, 1, 0, NOW(), NULL, NULL)',
'INSERT INTO ' . TABLE_COLS . ' VALUES ("VariantOnGenome/Genetic_origin", 11, 200, 0, 0, 1, "Genetic origin", "", "Origin of variant; unknown, germline, somatic, de novo, from parental disomy (maternal or paternal) or in vitro (cloned) when tested for functional consequences.", "Origin of variant; unknown, germline, somatic, de novo, from parental disomy (maternal or paternal) or in vitro (cloned) when tested for functional consequences.", "VARCHAR(100)", "Genetic origin||select|1|--Not specified--|false|false", "Unknown\r\nGermline\r\nSomatic\r\nDe novo\r\nUniparental disomy\r\nUniparental disomy, maternal allele\r\nUniparental disomy, paternal allele\r\nIn vitro (cloned)", "", 1, 1, 1, 0, NOW(), NULL, NULL)',
'INSERT INTO ' . TABLE_COLS . ' VALUES ("VariantOnGenome/Published_as", 3, 200, 0, 0, 0, "Published as", "Variant as originally reported (e.g. 521delT); provide only when different from \"DNA change\".", "Variant as originally reported (e.g. 521delT); listed only when different from \"DNA change\". Variants seen in animal models, tested in vitro, predicted from RNA analysis, etc. are described between brackets like c.(456C>G).", "Variant as originally reported (e.g. 521delT); listed only when different from \"DNA change\". Variants seen in animal models, tested in vitro, predicted from RNA analysis, etc. are described between brackets like c.(456C>G).", "VARCHAR(100)", "Published as|Variants seen in animal models, tested in vitro, predicted from RNA analysis, etc. are described between brackets like c.(456C>G).|text|30", "", "", 1, 1, 1, 0, NOW(), NULL, NULL)',
......@@ -78,7 +78,7 @@ $aColSQL =
// FIXME; link this one to an ontology?
'INSERT INTO ' . TABLE_COLS . ' VALUES ("VariantOnGenome/Type", 1, 200, 0, 0, 1, "Type", "", "Type of variant at DNA level.", "Type of variant at DNA level; note that the variant type can also be derived from the variant description (for all levels).", "VARCHAR(100)", "Type of variant (DNA level)|Type of variant at DNA level; note that the variant type can also be derived from the variant description (for all levels).|select|1|true|false|false", "Substitution\r\nDeletion\r\nDuplication\r\nInsertion\r\nInversion\r\nInsertion/Deletion\r\nTranslocation\r\nOther/Complex", "", 1, 1, 1, 0, NOW(), NULL, NULL)',
'INSERT INTO ' . TABLE_COLS . ' VALUES ("VariantOnTranscript/Distance_to_splice_site", 10, 150, 0, 0, 0, "Splice distance", "", "The distance to the nearest splice site.", "The distance to the nearest splice site.", "MEDIUMINT(8) UNSIGNED", "Distance to splice site||text|8", "", "", 1, 1, 1, 0, NOW(), NULL, NULL)',
'INSERT INTO ' . TABLE_COLS . ' VALUES ("VariantOnTranscript/DNA", 3, 200, 1, 1, 1, "DNA change (cDNA)", "", "Description of variant at DNA level, based on a coding DNA reference sequence (following HGVS recommendations).", "Description of variant at DNA level, based on a coding DNA reference sequence (following HGVS recommendations); e.g. c.123C>T, c.123_145del, c.123_126dup.", "VARCHAR(100)", "DNA change (HGVS format)|Description of variant at DNA level, based on a coding DNA reference sequence (following HGVS recommendations); e.g. c.123C>T, c.123_145del, c.123_126dup.|text|30", "", "", 1, 1, 1, 0, NOW(), NULL, NULL)',
'INSERT INTO ' . TABLE_COLS . ' VALUES ("VariantOnTranscript/DNA", 3, 200, 1, 1, 1, "DNA change (cDNA)", "", "Description of variant at DNA level, based on a coding DNA reference sequence (following HGVS recommendations).", "Description of variant at DNA level, based on a coding DNA reference sequence (following HGVS recommendations); e.g. c.123C>T, c.123_145del, c.123_126dup.", "VARCHAR(255)", "DNA change (HGVS format)|Description of variant at DNA level, based on a coding DNA reference sequence (following HGVS recommendations); e.g. c.123C>T, c.123_145del, c.123_126dup.|text|30", "", "", 1, 1, 1, 0, NOW(), NULL, NULL)',
'INSERT INTO ' . TABLE_COLS . ' VALUES ("VariantOnTranscript/Exon", 2, 50, 0, 1, 0, "Exon", "", "Number of exon/intron containing the variant.", "Number of exon/intron containing variant; 2 = exon 2, 12i = intron 12, 2i_7i = exons 3 to 7, 8i_9 = border intron 8/exon 9.", "VARCHAR(7)", "Exon|Format: 2 = exon 2, 12i = intron 12, 2i_7i = exons 3 to 7, 8i_9 = border intron 8/exon 9.|text|7", "", "", 1, 1, 1, 0, NOW(), NULL, NULL)',
'INSERT INTO ' . TABLE_COLS . ' VALUES ("VariantOnTranscript/GVS/Function", 9, 200, 0, 0, 0, "GVS function", "", "Functional annotation of this position from the Genome Variation Server.", "The functional annotation of this position from the Genome Variation Server.", "VARCHAR(100)", "GVS function||select|1|true|false|false", "intergenic\r\nnear-gene-5\r\nutr-5\r\ncoding\r\ncoding-near-splice\r\ncoding-synonymous\r\ncoding-synonymous-near-splice\r\ncodingComplex\r\ncodingComplex-near-splice\r\nframeshift\r\nframeshift-near-splice\r\nmissense\r\nmissense-near-splice\r\nsplice-5\r\nintron\r\nsplice-3\r\nstop-gained\r\nstop-gained-near-splice\r\nstop-lost\r\nstop-lost-near-splice\r\nutr-3\r\nnear-gene-3", "", 1, 1, 1, 0, NOW(), NULL, NULL)',
'INSERT INTO ' . TABLE_COLS . ' VALUES ("VariantOnTranscript/Location", 1, 200, 0, 0, 1, "Location", "", "Location of variant at DNA level.", "Location of variant at DNA level; note that the variant location can also be derived from the variant description.", "VARCHAR(100)", "Location of variant|The variant location can also be derived from the variant description|select|1|true|false|false", "5\' gene flanking\r\n5\' UTR\r\nExon\r\nIntron\r\n3\' UTR\r\n3\' gene flanking", "", 1, 1, 1, 0, NOW(), NULL, NULL)',
......
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