Skip to content

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

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

[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

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.
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

1 participant