Vignette: range queries across a set of BED files
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 55/100
- Issue type
- Documentation
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- r
- Domain
- documentation
Research direction
Start from the bedbaser vignette, adding a section that uses bb_beds_in_bedset() to pick IDs and bb_beds_to_grangeslist() to fetch whole files as a GRangesList. Then show subsetByOverlaps() for whole-file hits and endoapply() for per-file regions, with a genome(which) check first. Run it against the live API to confirm it renders. This depends on #26, so check that issue is merged before you start.
Written by the indexing model from the issue text.
Description
The question "which BED files in bedbase have regions overlapping my GRanges, and what are they" comes up often and bedbaser doesn't show how to answer it. Benchmarks in databio/bedhost#291 showed that per-range remote access (the bedhost regions endpoint, or rtracklayer reading bigBeds with which=) loses to downloading whole files by more than 10x for a typical file, even for a single range. So the pattern is two steps: pick records by metadata, download them whole, overlap locally.
A vignette section showing exactly that:
ids <- bb_beds_in_bedset(bedbase, "lola_hg38_ucsc_features")$id # or text/exact search, or the snapshot
grl <- bb_beds_to_grangeslist(bedbase, ids)
subsetByOverlaps(grl, which) # files with any hit, whole
endoapply(grl, subsetByOverlaps, which) # overlapping regions within each file; lengths() gives hits per file
Points to make in the text:
subsetByOverlapson a GRangesList works at the element level: it returns whole files that overlap at all.endoapplyis for the regions inside each file, and keeps zero-length elements solengths()lines up with the input.- Check the genome of the records against
genome(which)before fetching; a mismatch returns zero hits with no error. - This covers hundreds of files comfortably. It won't find overlaps across all 665k records; that needs an index on the bedbase side, which is the open request upstream.
Depends on #26. Gets better as #27 and #28 land, but can be written against the BEDset route alone.
Drafted with Claude Code.
- Dominant language
- R
- Stars
- 3
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
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.
More from waldronlab/bedbaser
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
waldronlab/bedbaser#27 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 22/100
waldronlab/bedbaser#28 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
waldronlab/bedbaser#26 ·
-
Difficulty 5/5 Over a week Newbie friendliness 22/100
waldronlab/bedbaser#25 ·
-
Update bundled spec to bedhost 0.15.0 and add after to bb_list_beds()May be free again @jwokaty claimed this 308 days ago, and no pull request is open. Open
waldronlab/bedbaser#20 · 1 comment · 1 assignee ·
All issues in waldronlab/bedbaser
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
microsoft/ML-For-Beginners#1061 ·
-
Difficulty 1/5 1-3 hours Newbie friendliness 82/100
PecanProject/pecan#4218 · 1 comment ·
Maintainers usually reply within 3 days
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
HenrikBengtsson/R.matlab#61 ·
-
easy first-contributor first-contributors good first issue help wanted r up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 92/100
fork-commit-merge/fork-commit-merge#8524 ·
Maintainers usually reply within 1 day
-
documentation good first issue priority: low
Difficulty 1/5 Under an hour Newbie friendliness 88/100
Pascal-Kueng/dyadMLM#157 ·
Maintainers usually reply within 1 day