Commit 81faa6d7 authored by Ivo Fokkema's avatar Ivo Fokkema

Also enlarge the VOT/Protein field to VARCHAR(255), if it are smaller than this.

- This allows for larger insertions to be stored.
- LOVD+ is using the same size, so this also removes one difference between LOVD3 and LOVD+.
parent db80d713
...@@ -658,6 +658,15 @@ if ($sCalcVersionFiles != $sCalcVersionDB) { ...@@ -658,6 +658,15 @@ if ($sCalcVersionFiles != $sCalcVersionDB) {
UPDATE ' . TABLE_COLS . ' SET mysql_type = \"VARCHAR(255)\" WHERE id = \"VariantOnTranscript/DNA\"")', UPDATE ' . TABLE_COLS . ' SET mysql_type = \"VARCHAR(255)\" WHERE id = \"VariantOnTranscript/DNA\"")',
'PREPARE Statement FROM @sSQL', 'PREPARE Statement FROM @sSQL',
'EXECUTE Statement', '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/Protein" 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/Protein` 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/Protein\"")',
'PREPARE Statement FROM @sSQL',
'EXECUTE Statement',
), ),
); );
......
...@@ -84,7 +84,7 @@ $aColSQL = ...@@ -84,7 +84,7 @@ $aColSQL =
'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)', '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)',
'INSERT INTO ' . TABLE_COLS . ' VALUES ("VariantOnTranscript/PolyPhen", 8, 200, 0, 0, 0, "PolyPhen prediction", "", "Effect of variant, predicted by PolyPhen.", "Effect of variant, predicted by PolyPhen.", "VARCHAR(100)", "PolyPhen prediction|Effect of variant, predicted by PolyPhen|select|1|true|false|false", "benign = Benign\r\npossiblyDamaging = Possibly damaging\r\nprobablyDamaging = Probably damaging\r\nnoPrediction = No prediction", "", 1, 1, 1, 0, NOW(), NULL, NULL)', 'INSERT INTO ' . TABLE_COLS . ' VALUES ("VariantOnTranscript/PolyPhen", 8, 200, 0, 0, 0, "PolyPhen prediction", "", "Effect of variant, predicted by PolyPhen.", "Effect of variant, predicted by PolyPhen.", "VARCHAR(100)", "PolyPhen prediction|Effect of variant, predicted by PolyPhen|select|1|true|false|false", "benign = Benign\r\npossiblyDamaging = Possibly damaging\r\nprobablyDamaging = Probably damaging\r\nnoPrediction = No prediction", "", 1, 1, 1, 0, NOW(), NULL, NULL)',
'INSERT INTO ' . TABLE_COLS . ' VALUES ("VariantOnTranscript/Position", 5, 100, 0, 0, 0, "Position", "", "Position of variant in coding DNA sequence.", "Position of variant in coding DNA sequence; note that coding DNA position can also be derived from the variant description.", "MEDIUMINT(6)", "cDNA position|Note that cDNA position can be derived from the variant description.|text|5", "", "", 1, 1, 1, 0, NOW(), NULL, NULL)', 'INSERT INTO ' . TABLE_COLS . ' VALUES ("VariantOnTranscript/Position", 5, 100, 0, 0, 0, "Position", "", "Position of variant in coding DNA sequence.", "Position of variant in coding DNA sequence; note that coding DNA position can also be derived from the variant description.", "MEDIUMINT(6)", "cDNA position|Note that cDNA position can be derived from the variant description.|text|5", "", "", 1, 1, 1, 0, NOW(), NULL, NULL)',
'INSERT INTO ' . TABLE_COLS . ' VALUES ("VariantOnTranscript/Protein", 7, 200, 1, 1, 1, "Protein", "", "Description of variant at protein level (following HGVS recommendations).", "Description of variant at protein level (following HGVS recommendations).<BR>\r\n<UL style=\"margin-top : 0px;\">\r\n <LI>p.(Arg345Pro) = change predicted from DNA (RNA not analysed)</LI>\r\n <LI>p.Arg345Pro = change derived from RNA analysis</LI>\r\n <LI>p.? = unknown effect</LI>\r\n <LI>p.0? = probably no protein produced</LI>\r\n</UL>", "VARCHAR(100)", "Protein change (HGVS format)|Description of variant at protein level (following HGVS recommendations); e.g. p.(Arg345Pro) = change predicted from DNA (RNA not analysed), p.Arg345Pro = change derived from RNA analysis, p.0 (no protein produced), p.? (unknown effect).|text|30", "", "", 1, 1, 1, 0, NOW(), NULL, NULL)', 'INSERT INTO ' . TABLE_COLS . ' VALUES ("VariantOnTranscript/Protein", 7, 200, 1, 1, 1, "Protein", "", "Description of variant at protein level (following HGVS recommendations).", "Description of variant at protein level (following HGVS recommendations).<BR>\r\n<UL style=\"margin-top : 0px;\">\r\n <LI>p.(Arg345Pro) = change predicted from DNA (RNA not analysed)</LI>\r\n <LI>p.Arg345Pro = change derived from RNA analysis</LI>\r\n <LI>p.? = unknown effect</LI>\r\n <LI>p.0? = probably no protein produced</LI>\r\n</UL>", "VARCHAR(255)", "Protein change (HGVS format)|Description of variant at protein level (following HGVS recommendations); e.g. p.(Arg345Pro) = change predicted from DNA (RNA not analysed), p.Arg345Pro = change derived from RNA analysis, p.0 (no protein produced), p.? (unknown effect).|text|30", "", "", 1, 1, 1, 0, NOW(), NULL, NULL)',
'INSERT INTO ' . TABLE_COLS . ' VALUES ("VariantOnTranscript/Published_as", 4, 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)', 'INSERT INTO ' . TABLE_COLS . ' VALUES ("VariantOnTranscript/Published_as", 4, 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)',
'INSERT INTO ' . TABLE_COLS . ' VALUES ("VariantOnTranscript/RNA", 6, 200, 1, 1, 1, "RNA change", "", "Description of variant at RNA level (following HGVS recommendations).", "Description of variant at RNA level (following HGVS recommendations).<BR>\r\n<UL style=\"margin-top : 0px;\">\r\n <LI>r.123c>u</LI>\r\n <LI>r.? = unknown</LI>\r\n <LI>r.(?) = RNA not analysed but probably transcribed copy of DNA variant</LI>\r\n <LI>r.spl? = RNA not analysed but variant probably affects splicing</LI>\r\n <LI>r.(spl?) = RNA not analysed but variant may affect splicing</LI>\r\n <LI>r.0? = change expected to abolish transcription</LI>\r\n</UL>", "VARCHAR(100)", "RNA change (HGVS format)|Description of variant at RNA level (following HGVS recommendations); e.g. r.123c>u, r.? = unknown, r.(?) = RNA not analysed but probably transcribed copy of DNA variant, r.spl? = RNA not analysed but variant probably affects splicing, r.(spl?) = RNA not analysed but variant may affect splicing.|text|30", "", "", 1, 1, 1, 0, NOW(), NULL, NULL)', 'INSERT INTO ' . TABLE_COLS . ' VALUES ("VariantOnTranscript/RNA", 6, 200, 1, 1, 1, "RNA change", "", "Description of variant at RNA level (following HGVS recommendations).", "Description of variant at RNA level (following HGVS recommendations).<BR>\r\n<UL style=\"margin-top : 0px;\">\r\n <LI>r.123c>u</LI>\r\n <LI>r.? = unknown</LI>\r\n <LI>r.(?) = RNA not analysed but probably transcribed copy of DNA variant</LI>\r\n <LI>r.spl? = RNA not analysed but variant probably affects splicing</LI>\r\n <LI>r.(spl?) = RNA not analysed but variant may affect splicing</LI>\r\n <LI>r.0? = change expected to abolish transcription</LI>\r\n</UL>", "VARCHAR(100)", "RNA change (HGVS format)|Description of variant at RNA level (following HGVS recommendations); e.g. r.123c>u, r.? = unknown, r.(?) = RNA not analysed but probably transcribed copy of DNA variant, r.spl? = RNA not analysed but variant probably affects splicing, r.(spl?) = RNA not analysed but variant may affect splicing.|text|30", "", "", 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