Skip to content
Snippets Groups Projects
Commit 2394d56c authored by Anthony Bretaudeau's avatar Anthony Bretaudeau
Browse files

use organism for alignment links

parent 4cd4c20c
No related branches found
No related tags found
No related merge requests found
......@@ -27,3 +27,9 @@ services:
APOLLO_LINKS: "SFRU_RICE>rice" # correspondance between contig name prefix and apollo organism id, example: "SFRU_RICE>rice_1;SFRU_CORN>corn_2"
[...]
```
If you prefer, you can also use the organism abbreviation in JBROWSE_LINKS:
```
JBROWSE_LINKS: "S.frugiperda corn>corn;S.frugiperda rice>sfrice"
```
......@@ -104,11 +104,12 @@ if(count($alignments) > 0){ ?>
$links = getenv(JBROWSE_LINKS);
$found_link = false;
if ($links) {
$cur_org = $feature->organism_id->abbreviation;
$dlist = explode(';', $links);
foreach ($dlist as $delem) {
$d = explode('>', $delem);
if (substr($alignment->name, 0, strlen($d[0])) === $d[0]) {
if ($cur_org === $d[0] || substr($alignment->name, 0, strlen($d[0])) === $d[0]) {
$url = "/jbrowse?data=data/".$d[1]."&";
$found_link = true;
break;
......@@ -139,11 +140,12 @@ if(count($alignments) > 0){ ?>
$links = getenv(JBROWSE_LINKS);
$found_link = false;
if ($links) {
$cur_org = $feature->organism_id->abbreviation;
$dlist = explode(';', $links);
foreach ($dlist as $delem) {
$d = explode('>', $delem);
if (substr($alignment->name, 0, strlen($d[0])) === $d[0]) {
if ($cur_org === $d[0] || substr($alignment->name, 0, strlen($d[0])) === $d[0]) {
$url = "/apollo/annotator/loadLink?organism=".$d[1]."&";
$found_link = true;
break;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment