-
Notifications
You must be signed in to change notification settings - Fork 13
added fasta parsing for compatible primers and revisited primer dimer evaluation #57
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
Merged
Merged
Changes from 2 commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
ed87dcc
added fasta parsing
jonas-fuchs 9177fbc
implemented fasta parsing and dimer check
jonas-fuchs aab3a4c
inluded endoverlap in log
jonas-fuchs 7f3b28b
renamed function
jonas-fuchs 714834a
Merge branch 'master' into scheme_compatibility
jonas-fuchs 5c6de3c
optimized the primer dimer solve
jonas-fuchs ae2980a
added multi-processing for final dimer solve
jonas-fuchs e0f94f0
added multi-batch processing for kmer evaluations and amplicon evalau…
jonas-fuchs 8b3a88f
fix when there are no dimers
jonas-fuchs 77cb3a5
fixed bug with compatible primers and qPCR mode
jonas-fuchs e52f558
moved get_permutations and changed threshold to required
jonas-fuchs 7b1d130
Update varvamp/scripts/primers.py
jonas-fuchs c6cb54f
Update varvamp/scripts/primers.py
jonas-fuchs 336b8cb
Update varvamp/command.py
jonas-fuchs 2ec7d45
Update varvamp/scripts/qpcr.py
jonas-fuchs e9679cd
Update varvamp/scripts/qpcr.py
jonas-fuchs 0cb29a7
Update varvamp/scripts/qpcr.py
jonas-fuchs 6c4c75d
moved deduplication to parse function
jonas-fuchs e5ebc68
changed combination logic
jonas-fuchs 9b8bcec
update
jonas-fuchs 2f3c47f
Merge remote-tracking branch 'origin/scheme_compatibility' into schem…
jonas-fuchs 4765001
fixed outer loop
jonas-fuchs 4fb8226
batch size calc for find primers
jonas-fuchs 549d48b
finalized review from wm75
jonas-fuchs 5fc0795
small stuff
jonas-fuchs 1bad536
added multi-batch processing for deltaG and fixed bug for batch calcu…
jonas-fuchs 2cf54fa
added n_to_test again
jonas-fuchs File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -2,12 +2,18 @@ | |||||
| primer creation and evaluation | ||||||
| """ | ||||||
|
|
||||||
| # BUILTIN | ||||||
| from itertools import chain | ||||||
| import re | ||||||
| import multiprocessing | ||||||
|
|
||||||
| # LIBS | ||||||
| from Bio.Seq import Seq | ||||||
|
||||||
| from Bio.Seq import Seq | |
| from Bio.Seq import MutableSeq |
jonas-fuchs marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
jonas-fuchs marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
jonas-fuchs marked this conversation as resolved.
Show resolved
Hide resolved
jonas-fuchs marked this conversation as resolved.
Show resolved
Hide resolved
jonas-fuchs marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
jonas-fuchs marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -139,26 +139,6 @@ def hardfilter_amplicon(majority_consensus, left_primer, right_primer): | |
| ) | ||
|
|
||
|
|
||
| def check_end_overlap(dimer_result): | ||
jonas-fuchs marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| """ | ||
| checks if two oligos overlap at their ends (pretty rare) | ||
| Example: | ||
| xxxxxxxxtagc------- | ||
| --------atcgxxxxxxx | ||
| """ | ||
| if dimer_result.structure_found: | ||
| # clean structure | ||
| structure = [x[4:] for x in dimer_result.ascii_structure_lines] | ||
| # calc overlap and the cumulative len of the oligos | ||
| overlap = len(structure[1].replace(" ", "")) | ||
| nt_count = len(re.findall("[ATCG]", "".join(structure))) | ||
| # check for overlaps at the ends and the min overlap (allows for some amount of mismatches) | ||
| if overlap > config.END_OVERLAP and nt_count <= len(structure[0]) + overlap + 1 and " " not in structure[1].lstrip(" "): | ||
| return True | ||
|
|
||
| return False | ||
|
|
||
|
|
||
| def forms_dimer_or_overhangs(right_primer, left_primer, probe, ambiguous_consensus): | ||
| """ | ||
| checks if combinations of primers/probe form dimers or overhangs | ||
|
||
|
|
@@ -179,8 +159,7 @@ def forms_dimer_or_overhangs(right_primer, left_primer, probe, ambiguous_consens | |
| for combination in [(probe_per, left_per), (probe_per, right_per)]: | ||
| for oligo1 in combination[0]: | ||
| for oligo2 in combination[1]: | ||
| dimer_result = primers.calc_dimer(oligo1, oligo2, structure=True) | ||
| if dimer_result.tm >= config.PRIMER_MAX_DIMER_TMP or check_end_overlap(dimer_result): | ||
| if primers.is_dimer(oligo1, oligo2): | ||
| forms_structure = True | ||
| break | ||
| # break all loops because we found an unwanted structure in one of the permutations | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.