BaseSpace API endpoint stopped working
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 21
- Forks
- 11
- Avg merge
- 12h 5m
- Merged PRs (30d)
- 24
Description
We currently fetch the list of samples in a BaseSpace run to check that all the samples came from that run before we use the phiX error rate to censor the sample files. Unfortunately, it looks like we used an undocumented endpoint, and it has stopped working.
Steps to reproduce:
- Choose the MiCall app on BaseSpace, and click the Launch Application button.
- Choose a run, choose a biosample, and choose a project to save the results in.
- Click the Launch Application button.
Expected results: run the analysis, including censoring the reads based on the phiX error rate data from the run.
Actual results: an error in the output log like this:
2019-07-16 18:40:13.214515 - [DEBUG](urllib3.connectionpool) https://api.basespace.illumina.com:443 "GET /v1pre3/runs/*******/samples?Offset=0&access_token=*******&Limit=1000 HTTP/1.1" 500 312
Traceback (most recent call last):
File "/opt/micall/micall_basespace.py", line 761, in <module>
main()
File "/opt/micall/micall_basespace.py", line 725, in main
[s["Id"] for s in run_json.samples])
File "/opt/micall/micall_basespace.py", line 161, in check_run_sample_ids
sample_set = set().union(*[self._get_all_sample_ids_from_run_id(runid) for runid in run_id_lst])
File "/opt/micall/micall_basespace.py", line 161, in <listcomp>
sample_set = set().union(*[self._get_all_sample_ids_from_run_id(runid) for runid in run_id_lst])
File "/opt/micall/micall_basespace.py", line 145, in _get_all_sample_ids_from_run_id
jobj = self._runssamples(runid, DOWNLOAD_BATCH_SIZE, numgot)
File "/opt/micall/micall_basespace.py", line 132, in _runssamples
raise RuntimeError("runsamples API error")
RuntimeError: runsamples API error
This code was originally added for #358 to find samples within a run.
The short term workaround is to not select a run. This won't let users censor reads based on the phiX error rate, but everything else should work.
Long term, it looks like we can use the run properties to get the list of samples in a run. We might need to get a list of biosamples instead of samples.
Even longer term, MiCall might be a lot easier to use if we work on #389 to get phiX error rates from undetermined FASTQ files.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in micall_basespace.py around _runssamples, _get_all_sample_ids_from_run_id, and check_run_sample_ids, then review the linked BaseSpace run-properties guidance. Determine whether run properties or biosamples provide the needed sample list, and verify the selected-run workflow completes with phiX-based read censoring.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, bioinformatics
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100