From 1bd2f5f973037324ec80edca26647da4e39f6296 Mon Sep 17 00:00:00 2001 From: Nathan Dunn Date: Tue, 21 Oct 2014 09:49:51 -0700 Subject: [PATCH 1/5] updated --- golr/build_golr_schema.sh | 3 +++ 1 file changed, 3 insertions(+) create mode 100755 golr/build_golr_schema.sh diff --git a/golr/build_golr_schema.sh b/golr/build_golr_schema.sh new file mode 100755 index 000000000..6e6b1afbf --- /dev/null +++ b/golr/build_golr_schema.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +~/git/OWLTools-GO-svn/bin/owltools -solr-config ~/git/amigo/metadata/ont-config.yaml ~/git/amigo/metadata/bio-config.yaml ~/git/amigo/metadata/ann-config.yaml ~/git/amigo/metadata/ann_ev_agg-config.yaml -solr-schema-dump > ~/git/amigo/golr/solr/conf/2-schema.xml From c110729067d29d1f4b6e0d753637e2a414ef8ef9 Mon Sep 17 00:00:00 2001 From: Nathan Dunn Date: Wed, 25 Apr 2018 09:54:58 -0700 Subject: [PATCH 2/5] added intellij ignore, fixed wormbase links, and added tests --- .gitignore | 1 + external/db-xrefs.yaml | 22 +++++++++++----------- javascript/lib/amigo/linker.js.tests | 12 ++++++++++++ 3 files changed, 24 insertions(+), 11 deletions(-) diff --git a/.gitignore b/.gitignore index 6eedf7c2e..ddee16936 100644 --- a/.gitignore +++ b/.gitignore @@ -70,3 +70,4 @@ tramp ## Would rather not have the minimal java stuff pollute. *.class +.idea diff --git a/external/db-xrefs.yaml b/external/db-xrefs.yaml index e563e3a63..13f974ae7 100644 --- a/external/db-xrefs.yaml +++ b/external/db-xrefs.yaml @@ -2999,22 +2999,22 @@ entity_types: - type_name: gene type_id: SO:0000704 - id_syntax: (WP:CE[0-9]{5})|(WB(Gene|Var|RNAi|Transgene)[0-9]{8}) - url_syntax: http://www.wormbase.org/db/gene/gene?name=[example_id] + id_syntax: (WB(Gene|RNAi|Transgene)[0-9]{8}) + url_syntax: http://www.wormbase.org/get?name=[example_id]&class=Gene example_id: WB:WBGene00003001 - example_url: http://www.wormbase.org/db/get?class=Gene;name=WBGene00003001 + example_url: http://www.wormbase.org/get?name=WBGene00003001&class=Gene - type_name: variation type_id: VariO:0001 - id_syntax: (WP:CE[0-9]{5})|(WB(Gene|Var|RNAi|Transgene)[0-9]{8}) - url_syntax: http://www.wormbase.org/db/gene/gene?name=[example_id] - example_id: WB:WBGene00003001 - example_url: http://www.wormbase.org/db/get?class=Gene;name=WBGene00003001 + id_syntax: (WB(Var)[0-9]{8}) + url_syntax: http://www.wormbase.org/get?name=[example_id]&class=Variation + example_id: WB:WBVar00249887 + example_url: http://www.wormbase.org/get?name=WBVar00249887&class=Variation - type_name: protein type_id: PR:000000001 - id_syntax: (WP:CE[0-9]{5})|(WB(Gene|Var|RNAi|Transgene)[0-9]{8}) - url_syntax: http://www.wormbase.org/db/gene/gene?name=[example_id] - example_id: WB:WBGene00003001 - example_url: http://www.wormbase.org/db/get?class=Gene;name=WBGene00003001 + id_syntax: (WP:CE[0-9]{5}) + url_syntax: http://www.wormbase.org/get?name=[example_id]&class=Protein + example_id: WP:CE01843& + example_url: http://www.wormbase.org/get?name=WP:CE01843&class=Protein - database: WB_REF name: WormBase database of nematode biology generic_urls: diff --git a/javascript/lib/amigo/linker.js.tests b/javascript/lib/amigo/linker.js.tests index 45a422fda..4ade26115 100644 --- a/javascript/lib/amigo/linker.js.tests +++ b/javascript/lib/amigo/linker.js.tests @@ -39,6 +39,18 @@ mr_t.is_same_atom(l.url('XXXX:S000006169'), null, 'linker: null'); + +mr_t.is_same_atom(l.url('WB:WBGene00003001'), + 'http://www.wormbase.org/get?name=WBGene00003001&class=Gene', + 'linker: wb gene'); +mr_t.is_same_atom(l.url('WB:WBVar00249887'), + 'http://www.wormbase.org/get?name=WBVar00249887&class=Variation', + 'linker: wb variation'); +mr_t.is_same_atom(l.url('WP:CE01843'), + 'http://www.wormbase.org/get?name=WP:CE01843&class=Protein', + 'linker: wb protein'); + + // Okay, now check that synonyms work like we think they should. // Try it on the every annoying NCBITaxon. mr_t.is_same_atom(l.url('taxon:7227'), From a51e7f31b27fbe1b854f7cfb11caf555b17738a5 Mon Sep 17 00:00:00 2001 From: Nathan Dunn Date: Wed, 25 Apr 2018 11:26:30 -0700 Subject: [PATCH 3/5] removed errant file --- golr/build_golr_schema.sh | 3 --- 1 file changed, 3 deletions(-) delete mode 100755 golr/build_golr_schema.sh diff --git a/golr/build_golr_schema.sh b/golr/build_golr_schema.sh deleted file mode 100755 index 6e6b1afbf..000000000 --- a/golr/build_golr_schema.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -~/git/OWLTools-GO-svn/bin/owltools -solr-config ~/git/amigo/metadata/ont-config.yaml ~/git/amigo/metadata/bio-config.yaml ~/git/amigo/metadata/ann-config.yaml ~/git/amigo/metadata/ann_ev_agg-config.yaml -solr-schema-dump > ~/git/amigo/golr/solr/conf/2-schema.xml From dfef6d714232e174e5892568ae1d10273bfe7c47 Mon Sep 17 00:00:00 2001 From: SC Date: Wed, 25 Apr 2018 13:22:29 -0700 Subject: [PATCH 4/5] add WB test back in at right location; work on #492 --- .../tests/linker.tests.js | 21 +++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/javascript/npm/amigo2-instance-data/tests/linker.tests.js b/javascript/npm/amigo2-instance-data/tests/linker.tests.js index 53f8ac6c0..f241ff6c6 100644 --- a/javascript/npm/amigo2-instance-data/tests/linker.tests.js +++ b/javascript/npm/amigo2-instance-data/tests/linker.tests.js @@ -47,7 +47,16 @@ describe('linker tests', function(){ assert.equal(l.url('XXXX:S000006169'), null, 'linker: null'); - + + assert.equal(l.url('WB:WBGene00003001'), + 'http://www.wormbase.org/get?name=WBGene00003001&class=Gene', + 'linker: wb gene'); + assert.equal(l.url('WB:WBVar00249887'), + 'http://www.wormbase.org/get?name=WBVar00249887&class=Variation', + 'linker: wb variation'); + assert.equal(l.url('WP:CE01843'), + 'http://www.wormbase.org/get?name=WP:CE01843&class=Protein', + 'linker: wb protein'); }); it('internal edge cases', function(){ @@ -77,7 +86,7 @@ describe('linker tests', function(){ assert.isTrue(_ends_with(l.url('foo', 'grebe'), '/grebe'), 'interlink: grebe not special (3): ' + l.url('foo', 'grebe')); - + }); it('synonyms', function(){ @@ -101,13 +110,13 @@ describe('linker tests', function(){ assert.isNull(l.url(null), 'null url'); assert.isNull(l.url(''), "'' url"); assert.isNull(l.anchor(null), 'null anchor'); - + // And make sure that we can do things like PANTHER's double. // url_syntax: http://www.geneontology.org/gene-associations/submission/paint/[example_id]/[example_id].txt - assert.equal(l.url('PAINT_REF:PTHR10046'), - 'http://www.geneontology.org/gene-associations/submission/paint/PTHR10046/PTHR10046.txt', + assert.equal(l.url('PAINT_REF:10046'), + 'http://www.pantherdb.org/panther/lookupId.jsp?id=PTHR10046', 'linker: panther'); - + }); }); From e39ef5aca611eb30a539899ca04c1fbd807fbcda Mon Sep 17 00:00:00 2001 From: Nathan Dunn Date: Wed, 25 Apr 2018 13:45:38 -0700 Subject: [PATCH 5/5] added RNAi data --- external/db-xrefs.yaml | 10 ++++++++-- javascript/lib/amigo/linker.js.tests | 12 ------------ .../npm/amigo2-instance-data/tests/linker.tests.js | 3 +++ 3 files changed, 11 insertions(+), 14 deletions(-) diff --git a/external/db-xrefs.yaml b/external/db-xrefs.yaml index ac527e8d4..ea44d906f 100644 --- a/external/db-xrefs.yaml +++ b/external/db-xrefs.yaml @@ -3233,13 +3233,19 @@ entity_types: - type_name: gene type_id: SO:0000704 - id_syntax: (WB(Gene|RNAi|Transgene)[0-9]{8}) + id_syntax: (WB(Gene|Transgene)[0-9]{8}) url_syntax: http://www.wormbase.org/get?name=[example_id]&class=Gene example_id: WB:WBGene00003001 example_url: http://www.wormbase.org/get?name=WBGene00003001&class=Gene + - type_name: RNAi + type_id: SO:0000337 + id_syntax: (WBRNAi[0-9]{8}) + url_syntax: http://www.wormbase.org/get?name=[example_id]&class=RNAi + example_id: WB:WBRNAi00061231 + example_url: http://www.wormbase.org/db/get?name=WBRNAi00061231;class=RNAi - type_name: variation type_id: VariO:0001 - id_syntax: (WB(Var)[0-9]{8}) + id_syntax: (WBVar[0-9]{8}) url_syntax: http://www.wormbase.org/get?name=[example_id]&class=Variation example_id: WB:WBVar00249887 example_url: http://www.wormbase.org/get?name=WBVar00249887&class=Variation diff --git a/javascript/lib/amigo/linker.js.tests b/javascript/lib/amigo/linker.js.tests index 4ade26115..45a422fda 100644 --- a/javascript/lib/amigo/linker.js.tests +++ b/javascript/lib/amigo/linker.js.tests @@ -39,18 +39,6 @@ mr_t.is_same_atom(l.url('XXXX:S000006169'), null, 'linker: null'); - -mr_t.is_same_atom(l.url('WB:WBGene00003001'), - 'http://www.wormbase.org/get?name=WBGene00003001&class=Gene', - 'linker: wb gene'); -mr_t.is_same_atom(l.url('WB:WBVar00249887'), - 'http://www.wormbase.org/get?name=WBVar00249887&class=Variation', - 'linker: wb variation'); -mr_t.is_same_atom(l.url('WP:CE01843'), - 'http://www.wormbase.org/get?name=WP:CE01843&class=Protein', - 'linker: wb protein'); - - // Okay, now check that synonyms work like we think they should. // Try it on the every annoying NCBITaxon. mr_t.is_same_atom(l.url('taxon:7227'), diff --git a/javascript/npm/amigo2-instance-data/tests/linker.tests.js b/javascript/npm/amigo2-instance-data/tests/linker.tests.js index f241ff6c6..ef49c7f47 100644 --- a/javascript/npm/amigo2-instance-data/tests/linker.tests.js +++ b/javascript/npm/amigo2-instance-data/tests/linker.tests.js @@ -51,6 +51,9 @@ describe('linker tests', function(){ assert.equal(l.url('WB:WBGene00003001'), 'http://www.wormbase.org/get?name=WBGene00003001&class=Gene', 'linker: wb gene'); + assert.equal(l.url('WB:WBRNAi00061231'), + 'http://www.wormbase.org/get?name=WBRNAi00061231&class=RNAi', + 'linker: wb RNAi'); assert.equal(l.url('WB:WBVar00249887'), 'http://www.wormbase.org/get?name=WBVar00249887&class=Variation', 'linker: wb variation');