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

Dev #13

Merged
merged 2 commits into from
Nov 28, 2024
Merged

Dev #13

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions primalscheme3/interaction/interaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,22 @@ def visualise_interactions(bedpath: pathlib.Path, threshold: float) -> None:
for bedline in bedlines:
pools[bedline.pool].append(bedline)

tested = 0
interactions = 0

# Loop over the pools
for pool in pools:
# Loop over the bedlines in the pool
for bedline1 in pool:
for bedline2 in pool:
tested += 1
for line in interaction(
bedline1.sequence, bedline2.sequence, threshold
):
interactions += 1
print(bedline1.primername, bedline2.primername)
print(line)

print(
f"Tested {tested} possible combinations and found {interactions} interactions"
)
6 changes: 2 additions & 4 deletions primalscheme3/panel/panel_classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -400,13 +400,11 @@ def add_next_primerpair(
for pospool in pos_pools_indexes:
# Check if the primerpair can be added
match self.check_primerpair_can_be_added(
pospp, current_pool, seqs_in_each_pool[pospool]
pospp, pospool, seqs_in_each_pool[pospool]
):
case PrimerPairCheck.OK:
# _add_primerpair updates the score array for the added primerpair
self._add_primerpair(
pospp, current_pool, self._current_msa_index
)
self._add_primerpair(pospp, pospool, self._current_msa_index)
# Check for other regions in the same group
# Find regions with overlap
if current_msa.regions:
Expand Down