Skip to content

Commit 7ffdc51

Browse files
authored
Merge pull request #1460 from microbiomedata/1457-fix_kegg_url
Change base urls for kegg
2 parents 54a24ea + 575029b commit 7ffdc51

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

web/src/encoding.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -57,19 +57,19 @@ const KeggPrefix: Record<string, PrefixInfo> = {
5757
pattern: /^((k:?)|(kegg\.orthology:k))(?=\d{5})/i,
5858
short: () => 'k',
5959
long: () => 'KEGG.ORTHOLOGY:K',
60-
urlBase: 'https://www.genome.jp/entry/',
60+
urlBase: 'https://bioregistry.io/kegg.orthology:/',
6161
},
6262
PATHWAY: {
6363
pattern: pathwayRegex,
6464
short: pathwayPrefixShort,
6565
long: pathwayPrefixLong,
66-
urlBase: 'https://www.genome.jp/kegg-bin/show_pathway?',
66+
urlBase: 'https://bioregistry.io/kegg.pathway:/',
6767
},
6868
MODULE: {
6969
pattern: /^((m:?)|(kegg.module:m))(?=\d{5})/i,
7070
short: () => 'M',
7171
long: () => 'KEGG.MODULE:M',
72-
urlBase: 'https://www.kegg.jp/entry/',
72+
urlBase: 'https://bioregistry.io/kegg.module:/',
7373
},
7474
};
7575

@@ -87,7 +87,7 @@ function keggEncode(v: string, url = false) {
8787
const transformed = v.replace(pattern, replacement);
8888
if (transformed !== v) {
8989
if (url) {
90-
return urlBase + transformed;
90+
return urlBase + transformed.toUpperCase();
9191
}
9292
return transformed;
9393
}

0 commit comments

Comments
 (0)