Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

begin new_alignment.SequenceCollection #1867

Open
8 tasks done
GavinHuttley opened this issue May 15, 2024 · 2 comments
Open
8 tasks done

begin new_alignment.SequenceCollection #1867

GavinHuttley opened this issue May 15, 2024 · 2 comments
Assignees

Comments

@GavinHuttley
Copy link
Collaborator

GavinHuttley commented May 15, 2024

Waiting on #1866

  • Create a SequenceCollection class
  • SequenceCollection(seq_data=, moltype=..)
  • type hints the constructor
  • Assigns seq_data to a _seq_data attribute
  • Assigns self._seq_data.seq_maker = self.moltype.make_seq
  • Implements a seqs property which returns the _seq_data
  • Ports relevant tests from test_alignment.py into test_new_alignment.py, converting them into pytest style (sorry!)
  • Implements a named_seqs property, which just returns .seqs . Deprecate this method and point to just using .seqs (give this 12 months).
@KatherineCaley
Copy link
Collaborator

@GavinHuttley will the new class be inheriting from _SequenceCollectionBase?

@GavinHuttley
Copy link
Collaborator Author

No. _SequenceCollectionBase is an artefact of needing core methods on both SequenceCollection (from which Alignment directly inherits) and ArrayAlignment (which inherits directly from _SequenceCollectionBase).

In new_alignment.py, define a SequenceCollection class without any reference to alignment.py classes. All it has to begin with is a constructor and .seqs attribute.

KatherineCaley added a commit to KatherineCaley/cogent3 that referenced this issue May 30, 2024
- absolute minimum functionality
- working towards cogent3#1867
KatherineCaley added a commit to KatherineCaley/cogent3 that referenced this issue May 31, 2024
- absolute minimum functionality
- working towards cogent3#1867
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

No branches or pull requests

2 participants