Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix instance data links #493

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,4 @@ tramp

## Would rather not have the minimal java stuff pollute.
*.class
.idea
28 changes: 17 additions & 11 deletions external/db-xrefs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3233,22 +3233,28 @@
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|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: 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: (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: (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
- 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:
Expand Down
24 changes: 18 additions & 6 deletions javascript/npm/amigo2-instance-data/tests/linker.tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,19 @@ 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: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');
assert.equal(l.url('WP:CE01843'),
'http://www.wormbase.org/get?name=WP:CE01843&class=Protein',
'linker: wb protein');
});

it('internal edge cases', function(){
Expand Down Expand Up @@ -77,7 +89,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(){
Expand All @@ -101,13 +113,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');

});

});