Skip to content

Commit

Permalink
Merge pull request #13 from ChrisgKent/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
ChrisgKent authored Nov 28, 2024
2 parents 04d6f68 + 001e832 commit 3306d4d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
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

0 comments on commit 3306d4d

Please sign in to comment.