ngless-toolkit / ngless-toolkit/ngless

select/filter reads matching/not-matching regions of interest

Open
#69 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.