-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #654 from LOVDnl/update-external-tools
Update libraries/scripts connecting to external tools.
- Loading branch information
Showing
2 changed files
with
13 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,8 +4,8 @@ | |
* LEIDEN OPEN VARIATION DATABASE (LOVD) | ||
* | ||
* Created : 2020-10-01 | ||
* Modified : 2024-05-07 | ||
* For LOVD : 3.0-30 | ||
* Modified : 2024-07-03 | ||
* For LOVD : 3.0-31 | ||
* | ||
* Copyright : 2004-2024 Leiden University Medical Center; http://www.LUMC.nl/ | ||
* Programmer : Ivo F.A.C. Fokkema <[email protected]> | ||
|
@@ -197,7 +197,7 @@ | |
print(' | ||
$("#mobidetails_dialog").html("Error while requesting MobiDetails to annotate this variant.<BR>' . | ||
implode(array_map(function ($sKey, $sVal) { | ||
return $sKey . ': ' . $sVal . '<BR>'; | ||
return $sKey . ': ' . trim($sVal) . '<BR>'; | ||
}, array_keys($aJSON), array_values($aJSON))) . '"); | ||
// Select the right buttons. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,8 +4,8 @@ | |
* LEIDEN OPEN VARIATION DATABASE (LOVD) | ||
* | ||
* Created : 2020-03-09 | ||
* Modified : 2024-01-25 | ||
* For LOVD : 3.0-30 | ||
* Modified : 2024-07-03 | ||
* For LOVD : 3.0-31 | ||
* | ||
* Copyright : 2004-2024 Leiden University Medical Center; http://www.LUMC.nl/ | ||
* Programmer : Ivo F.A.C. Fokkema <[email protected]> | ||
|
@@ -131,7 +131,8 @@ private function addFault (&$aData, $sFault, $sVariant, $aVariantInfo = false) | |
// EREF error. | ||
$aData['errors']['EREF'] = $sFault; | ||
} elseif (strpos($sFault, 'is not associated with genome build') !== false | ||
|| strpos($sFault, 'No transcript definition for') !== false) { | ||
|| strpos($sFault, 'No transcript definition for') !== false | ||
|| strpos($sFault, 'is not in our database. Please check the transcript') !== false) { | ||
// EREFSEQ error. | ||
$aData['errors']['EREFSEQ'] = $sFault; | ||
} elseif (substr($sFault, 0, 5) == 'char ' | ||
|
@@ -152,6 +153,11 @@ private function addFault (&$aData, $sFault, $sVariant, $aVariantInfo = false) | |
$sFault, $aRegs)) { | ||
// This is not that important, but we won't completely discard it, either. | ||
$aData['messages']['IREFSEQUPDATED'] = 'Reference sequence ' . $aRegs[1] . ' can be updated to ' . $aRegs[2] . '.'; | ||
} elseif (preg_match( | ||
'/^The following versions of the requested transcript are available in our database: (.+)$/', | ||
$sFault, $aRegs)) { | ||
// This is not that important, but we won't completely discard it, either. | ||
$aData['messages']['IREFSEQUPDATED'] = 'Reference sequence can be updated to one of: ' . str_replace('|', ', ', $aRegs[1]) . '.'; | ||
} elseif (strpos($sFault, 'Caution should be used when reporting the displayed variant descriptions') !== false | ||
|| strpos($sFault, 'The displayed variants may be artefacts of aligning') !== false) { | ||
// Both these warnings are thrown at the same time when there are mismatches between the | ||
|
@@ -199,6 +205,7 @@ private function callVV ($sMethod, $aArgs = array()) | |
if (!$hCurl) { | ||
$hCurl = curl_init(); | ||
curl_setopt($hCurl, CURLOPT_RETURNTRANSFER, true); // Return the result as a string. | ||
curl_setopt($hCurl, CURLOPT_FOLLOWLOCATION, true); // Make sure we follow redirects. | ||
if (!empty($_SETT['system']['version'])) { | ||
curl_setopt($hCurl, CURLOPT_USERAGENT, 'LOVDv.' . $_SETT['system']['version']); // Return the result as a string. | ||
} | ||
|