Skip to content

Commit 7caf762

Browse files
committed
Fix API call for SRA ids
1 parent 9fbfd67 commit 7caf762

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

bin/sra_ids_to_runinfo.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -246,13 +246,13 @@ def _content_check(cls, response, identifier):
246246
def _id_to_srx(cls, identifier):
247247
"""Resolve the identifier to SRA experiments."""
248248
params = {
249-
"save": "efetch",
249+
"id": identifier,
250250
"db": "sra",
251251
"rettype": "runinfo",
252-
"term": identifier,
252+
"retmode": "text"
253253
}
254254
response = fetch_url(
255-
f"https://trace.ncbi.nlm.nih.gov/Traces/sra/sra.cgi?{urlencode(params)}"
255+
f"https://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?{urlencode(params)}"
256256
)
257257
cls._content_check(response, identifier)
258258
return [row["Experiment"] for row in open_table(response, delimiter=",")]

0 commit comments

Comments
 (0)