Skip to content

[ENH] Add augment_complement for RNA/DNA reverse complement augmentation#623

Closed
Vaishnav88sk wants to merge 1 commit into
gc-os-ai:mainfrom
Vaishnav88sk:feature/augment-complement
Closed

[ENH] Add augment_complement for RNA/DNA reverse complement augmentation#623
Vaishnav88sk wants to merge 1 commit into
gc-os-ai:mainfrom
Vaishnav88sk:feature/augment-complement

Conversation

@Vaishnav88sk

Copy link
Copy Markdown
Contributor

Reference Issues/PRs

Fixes #618

What does this implement/fix? Explain your changes.

Adds augment_complement to utils/_augment.py which computes biologically meaningful reverse complement sequences.

  • Supports RNA (A↔U, C↔G) and DNA (A↔T, C↔G).
  • Preserves case.
  • Concatenates originals with their reverse complements.

What should a reviewer concentrate their feedback on?

  • Mapping table accuracy for RNA vs DNA.
  • Consistency with the existing augment_reverse API.

Did you add any tests for the change?

Yes, added 8 tests in test_augment.py covering case handling, molecule types, and round-trip validation.

Any other comments?

N/A

PR checklist

  • The PR title starts with either [ENH], [MNT], [DOC], or [BUG].
  • Added/modified tests
  • Used pre-commit hooks

Add augment_complement() to _augment.py that generates biologically
meaningful reverse complement sequences (A↔U for RNA, A↔T for DNA, C↔G).
Supports both RNA and DNA via molecule_type parameter, preserves case,
and follows the same API pattern as augment_reverse.

Includes 8 new tests covering RNA/DNA complements, case handling,
round-trip validation, multiple arrays, and error handling.
@siddharth7113

Copy link
Copy Markdown
Collaborator

Please have discussion before opening a PR for an issue, or if you create one please keep it draft PR until discussion around it has happened.

@Vaishnav88sk

Copy link
Copy Markdown
Contributor Author

Hi @siddharth7113, my apologies! I got a bit too eager with the implementation since I already had it passing locally. I completely respect the workflow, I will convert this to a draft PR while we finalize the architectural discussion over in issue #618. Thanks for guiding me on the project conventions!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ENH] Add augment_complement for RNA/DNA reverse complement augmentation

2 participants