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

[Feature]: Repeats Method #41

Open
sepandhaghighi opened this issue Jan 13, 2025 · 0 comments · May be fixed by #45
Open

[Feature]: Repeats Method #41

sepandhaghighi opened this issue Jan 13, 2025 · 0 comments · May be fixed by #45
Assignees
Labels
enhancement New feature or request new feature
Milestone

Comments

@sepandhaghighi
Copy link
Member

Describe the feature you want to add

Add repeats method to Primer class

Describe your proposed solution

>>> from opr import Primer
>>> p1 = Primer("ATCG")
>>> p1.repeats(sequence="A", consecutive=False)
1
>>> p1.repeats(sequence="AT", consecutive=False)
1
>>> p1.repeats(sequence="AC", consecutive=False)
0
>>> p1.repeats(sequence="A", consecutive=True)
0
>>> p1.repeats(sequence="AT", consecutive=False)
0
>>> p2 = Primer("AAAATCGTGT")
>>> p2.repeats(sequence="AA", consecutive=True)
2
>>> p2.repeats(sequence="GT", consecutive=True)
2
>>> p3 = Primer("ATCGATCGATCG")
>>> p3.repeats(sequence="ATCG", consecutive=True)
3

Describe alternatives you've considered, if relevant

No response

Additional context

Defaults:

  1. consecutive: False
@sepandhaghighi sepandhaghighi added this to the opr v0.3 milestone Jan 13, 2025
@sepandhaghighi sepandhaghighi added enhancement New feature or request new feature labels Jan 13, 2025
This was referenced Jan 15, 2025
Closed
@AHReccese AHReccese linked a pull request Jan 15, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request new feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants