ngless-toolkit / ngless-toolkit/ngless
select/filter reads matching/not-matching regions of interest
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 152
- Forks
- 23
- PR merge metrics
- No merged PRs in 30d
Description
We can currently count() reads overlapping with regions defined in a GFF file.
However this is only accessible for counting.
Another use-case is within select() in order to keep/drop reads that overlap a feature set.
This is useful to reduce a SAM/BAM file to regions or features of interest.
mapped = select(mapped) using |mr|:
mr = mr.filter(min_match_size=45, min_identity_pc=90, action={match})
mr = mr.intersect(action={match}, gff_file="regions_of_interest.gff",
features=["chr"], subfeatures=["highGC"])
if mr.flag({mapped}):
discard
A less flexible alternative but easier since we already bundle samtools, would be exposing samtools view to work with a target region.
Contributor guide
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 by tracing the existing count() support for GFF-defined regions and the select() filtering flow, then compare the proposed intersect() and samtools view approaches. Done should mean select() can keep or discard SAM/BAM reads based on overlap with the requested GFF features or target regions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- bioinformatics
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100