Skip to content

Commit 8a8456c

Browse files
authored
Merge pull request #1461 from microbiomedata/fix_cog_url
Update base url for cog
2 parents 7ffdc51 + 089f011 commit 8a8456c

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
@@ -112,16 +112,16 @@ function cogEncode(v: string, url = false) {
112112
return `COG.PATHWAY:${v}`;
113113
}
114114
// Or figure out if it is a term, pathway, or function
115-
const urlBase = 'https://www.ncbi.nlm.nih.gov/research/cog';
115+
const urlBase = 'https://bioregistry.io/cog';
116116
const id = v.split(':')[1];
117117
if (v.length === 1 || v.startsWith('COG.FUNCTION:')) {
118-
return `${urlBase}/cogcategory/${id}`;
118+
return `${urlBase}.category:/${id}`;
119119
}
120120
if (v.startsWith('COG.PATHWAY')) {
121-
return `${urlBase}/pathway/${id}`;
121+
return `${urlBase}.pathway:/${id}`;
122122
}
123123
if (v.startsWith('COG:COG')) {
124-
return `${urlBase}/cog/${id}`;
124+
return `${urlBase}:/${id}`;
125125
}
126126
return v;
127127
}

0 commit comments

Comments
 (0)