|
2 | 2 | from pathlib import Path |
3 | 3 | from typing import Any, Dict, List, Optional |
4 | 4 |
|
5 | | -from ddbj_search_converter.config import Config |
| 5 | +from ddbj_search_converter.config import SEARCH_BASE_URL, Config |
6 | 6 | from ddbj_search_converter.dblink.db import (AccessionType, |
7 | 7 | get_related_entities_bulk) |
8 | 8 | from ddbj_search_converter.id_patterns import ID_PATTERN_MAP |
9 | 9 | from ddbj_search_converter.schema import Xref, XrefType |
10 | 10 |
|
11 | 11 | URL_TEMPLATE: Dict[XrefType, str] = { |
12 | | - "biosample": "https://ddbj.nig.ac.jp/search/entries/biosample/{id}", |
13 | | - "bioproject": "https://ddbj.nig.ac.jp/search/entries/bioproject/{id}", |
14 | | - "umbrella-bioproject": "https://ddbj.nig.ac.jp/search/entries/bioproject/{id}", |
15 | | - "sra-submission": "https://ddbj.nig.ac.jp/search/entries/sra-submission/{id}", |
16 | | - "sra-study": "https://ddbj.nig.ac.jp/search/entries/sra-study/{id}", |
17 | | - "sra-experiment": "https://ddbj.nig.ac.jp/search/entries/sra-experiment/{id}", |
18 | | - "sra-run": "https://ddbj.nig.ac.jp/search/entries/sra-run/{id}", |
19 | | - "sra-sample": "https://ddbj.nig.ac.jp/search/entries/sra-sample/{id}", |
20 | | - "sra-analysis": "https://ddbj.nig.ac.jp/search/entries/sra-analysis/{id}", |
21 | | - "jga-study": "https://ddbj.nig.ac.jp/search/entries/jga-study/{id}", |
22 | | - "jga-dataset": "https://ddbj.nig.ac.jp/search/entries/jga-dataset/{id}", |
23 | | - "jga-dac": "https://ddbj.nig.ac.jp/search/entries/jga-dac/{id}", |
24 | | - "jga-policy": "https://ddbj.nig.ac.jp/search/entries/jga-policy/{id}", |
25 | | - "gea": "https://ddbj.nig.ac.jp/public/ddbj_database/gea/experiment/{prefix}/{id}/", |
| 12 | + "biosample": f"{SEARCH_BASE_URL}/search/entries/biosample/{{id}}", |
| 13 | + "bioproject": f"{SEARCH_BASE_URL}/search/entries/bioproject/{{id}}", |
| 14 | + "umbrella-bioproject": f"{SEARCH_BASE_URL}/search/entries/bioproject/{{id}}", |
| 15 | + "sra-submission": f"{SEARCH_BASE_URL}/search/entries/sra-submission/{{id}}", |
| 16 | + "sra-study": f"{SEARCH_BASE_URL}/search/entries/sra-study/{{id}}", |
| 17 | + "sra-experiment": f"{SEARCH_BASE_URL}/search/entries/sra-experiment/{{id}}", |
| 18 | + "sra-run": f"{SEARCH_BASE_URL}/search/entries/sra-run/{{id}}", |
| 19 | + "sra-sample": f"{SEARCH_BASE_URL}/search/entries/sra-sample/{{id}}", |
| 20 | + "sra-analysis": f"{SEARCH_BASE_URL}/search/entries/sra-analysis/{{id}}", |
| 21 | + "jga-study": f"{SEARCH_BASE_URL}/search/entries/jga-study/{{id}}", |
| 22 | + "jga-dataset": f"{SEARCH_BASE_URL}/search/entries/jga-dataset/{{id}}", |
| 23 | + "jga-dac": f"{SEARCH_BASE_URL}/search/entries/jga-dac/{{id}}", |
| 24 | + "jga-policy": f"{SEARCH_BASE_URL}/search/entries/jga-policy/{{id}}", |
| 25 | + "gea": f"{SEARCH_BASE_URL}/public/ddbj_database/gea/experiment/{{prefix}}/{{id}}/", |
26 | 26 | "geo": "https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc={id}", |
27 | 27 | "insdc-assembly": "https://www.ncbi.nlm.nih.gov/datasets/genome/{id}", |
28 | 28 | "insdc-master": "https://www.ncbi.nlm.nih.gov/nuccore/{id}", |
|
0 commit comments