Skip to content

ENH: Move pairs_to_features and generate_kmer_vecs to transformer interface (#174)#628

Open
DashratRajpurohit wants to merge 1 commit intogc-os-ai:mainfrom
DashratRajpurohit:enh/transformer-interfaces-174
Open

ENH: Move pairs_to_features and generate_kmer_vecs to transformer interface (#174)#628
DashratRajpurohit wants to merge 1 commit intogc-os-ai:mainfrom
DashratRajpurohit:enh/transformer-interfaces-174

Conversation

@DashratRajpurohit
Copy link
Copy Markdown

Closes #174.

Overview

This PR addresses the "Redesigning the Public and Internal API" roadmap project by moving generate_kmer_vecs and pairs_to_features to the proper BaseTransform interface, standardizing their behavior with the rest of the trafos module (following the GreedyEncoder template).

Changes Made

  1. New Transformers:
    • Added KMerFeatures in pyaptamer/trafos/features/_kmer.py.
    • Added AptaNetFeatures in pyaptamer/trafos/features/_aptanet.py.
    • Both inherit from BaseTransform and return Pandas DataFrames.
  2. Pipeline Integration:
    • Updated AptaNetPipeline to use AptaNetFeatures instead of FunctionTransformer.
    • Added automated input coercion to ensure legacy list of tuples inputs from users still work transparently.
  3. Deprecations:
    • Added DeprecationWarnings to pairs_to_features and generate_kmer_vecs in _aptanet_utils.py, directing users to the new trafos.features classes.

This sets up a much cleaner architectural foundation for future trafos feature extractors.

…erface (gc-os-ai#174)

- Added KMerFeatures and AptaNetFeatures to pyaptamer.trafos.features that inherit from BaseTransform.
- Deprecated pairs_to_features and generate_kmer_vecs in pyaptamer.utils._aptanet_utils.
- Updated AptaNetPipeline to use AptaNetFeatures instead of FunctionTransformer.
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] move pairs_to_features, generate_kmer_vecs and other similar utilities to transformer interface

1 participant