unpack_mixtures_and_reverse becomes computationally intractable when sequence has many ambiguous characters
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 21
- Forks
- 11
- Avg merge
- 12h 5m
- Merged PRs (30d)
- 24
Description
I traced a bug to this function where if the input argument seq contains too many ambiguous characters (ones that are resolved to many, i.e. '-' -> 'ACTG') then the function will hang because it attempts to resolve every possible sequence (which can be a very large number).
To correct this I count all mixture characters first and instantiate a count=1. For each mixture I multiply the count by the number of potential resolution characters. I.e. "A-A-" has 2 mixture characters, '-' resolves to A,C,T, or G so it can resolve to 4 potential sequences. Since I see two '-' characters I multiply the count by 4 twice. I then create a threshold (i.e. 1000) such that if the count (which equals the number of potential sequences) is greater than that number, this function returns with nothing.
Let me know if this is a viable solution or if you have a different or better proposal.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in micall/utils/probe_finder.py at unpack_mixtures_and_reverse, especially around line 127, and reproduce the hang with a sequence containing many ambiguous characters. Compare the behavior for ordinary inputs and highly ambiguous inputs; done means avoiding exhaustive expansion beyond a defined limit while preserving expected results for manageable sequences.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- bioinformatics
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100