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

Primer flow #43

Closed
Koeng101 opened this issue Sep 22, 2020 · 9 comments
Closed

Primer flow #43

Koeng101 opened this issue Sep 22, 2020 · 9 comments
Labels
enhancement New feature or request

Comments

@Koeng101
Copy link
Contributor

Koeng101 commented Sep 22, 2020

Primers are a common need for labs, and will be required for more complex protocols, like Gibson assemblies.

The most basic application of a primer design will be a simple amplification.

poly amplify pUC19.gb --amplicon "ATGACCATGATTACGCCAAGCTTGCATGCCTGCAGGTCGACTCTAGAGGATCCCCGGGTACCGAGCTCGAATTCACTGGCCGTCGTTTTACAACGTCGTGACTGGGAAAACCCTGGCGTTACCCAACTTAATCGCCTTGCAGCACATCCCCCTTTCGCCAGCTGGCGTAATAGCGAAGAGGCCCGCACCGATCGCCCTTCCCAACAGTTGCGCAGCCTGAATGGCGAATGGCGCCTGATGCGGTATTTTCTCCTTACGCATCTGTGCGGTATTTCACACCGCATATGGTGCACTCTCAGTACAATCTGCTCTGATGCCGCATAG" > primers.txt pUC19_amplified.gb

primers.txt would be a tab separated value file which looks like (similar to what Snapgene provides):

Primer 1	ATGACCATGATTACGCCAAG
Primer 2	CTATGCGGCATCAGAGCA  

While pUC19_amplified.gb would simply be a genbank file with only the primers + amplified sequence.

There are a few different flags that would be useful for poly amplify -

  1. --primer_for "pUC19_for" --primer_rev "pUC19_rev" for naming the output primers in primers.txt
  2. --amplicon "ATGC" amplifies the particular string
  3. --range 0,0 amplifies a particular range of sequence
  4. --no_amplify pGLO.gb prevents primers from amplifying a naughty sequence from a different file
  5. --validate 10:20 --size 100:150 --coverage 100 --overlap 10:40 amplifies a particular range of sequence with a size within the size limitations of the --size flag, the coverage limitations of the --coverage tag, and the overlap limitations of the --overlap tag.

These 4 functions generally fulfill all needs of a biologist. The first few cover the use cases of your average cloner - they simply want to clone out an amplicon, and don't really care about more advanced features. The 5th, --validate covers the use case of people who build primers to validate things, like a colony PCR, or a validation PCR for clinical samples. I think these 2 use cases cover ~90% of the different kinds of uses of poly amplify

Use cases:

poly amplify

poly amplify pUC19.gb --primer_for "pUC19_for" --primer_rev "pUC19_rev" --amplicon "ATGACCATGATTACGCCAAGCTTGCATGCCTGCAGGTCGACTCTAGAGGATCCCCGGGTACCGAGCTCGAATTCACTGGCCGTCGTTTTACAACGTCGTGACTGGGAAAACCCTGGCGTTACCCAACTTAATCGCCTTGCAGCACATCCCCCTTTCGCCAGCTGGCGTAATAGCGAAGAGGCCCGCACCGATCGCCCTTCCCAACAGTTGCGCAGCCTGAATGGCGAATGGCGCCTGATGCGGTATTTTCTCCTTACGCATCTGTGCGGTATTTCACACCGCATATGGTGCACTCTCAGTACAATCTGCTCTGATGCCGCATAG" > primers.txt amplified.gb

poly amplify range

poly amplify pUC19.gb --primer_for "pUC19_for" --primer_rev "pUC19_rev" --range 146:469 > primers.txt amplified.gb

poly no_amplify

poly amplify pUC19.gb --range 146:469 --no_amplify pGLO.gb > primers.txt amplified.gb

poly validate

poly amplify SARs-CoV-2.gb --validate 30:29886 --size 375:425 --coverage 100 --overlap 30:50 > primers.txt many_amplified.gb
(Note: this is pretty much the exact use case of https://artic.network/ncov-2019, which is why this kind of thing is important. It also doesn't fit in well to other parts of the program)
Another example:
poly amplify pUC19.gb --validate 146:469 --size 0:500 --coverage 100 --overlap 0:0 > primers.txt amplified.gb
In this example, we really just want to amplify a fragment that we know this sequence is inside of so we can do some sanger sequencing or the like on it.

@jecalles thoughts on different use cases I might be forgetting?

@Koeng101
Copy link
Contributor Author

Koeng101 commented Sep 22, 2020

Oh of course, the other flags of --tm x and --polymerase are important (Tm being the aimed for melting temperature for the primers, and polymerase being the polymerase used for those melting temperature calculations). For example:

poly amplify pUC19.gb  \
--primer_for "pUC19_for" \
--primer_rev "pUC19_rev" \
--range 146:469 \
--tm 65 \
--high_tm 66 \
--low_tm 60 \
--polymerase taq \
 > primers.txt amplified.gb

@TimothyStiles
Copy link
Collaborator

TimothyStiles commented Sep 22, 2020

@Koeng101 this is extremely helpful, thanks! I've been looking for the polymerase melting temp reference you mentioned that NEB puts out but can't find it. Do you have a link for it?

@Koeng101
Copy link
Contributor Author

https://tmcalculator.neb.com/#!/help

They have 3 equations on the bottom. Math time!

@TimothyStiles
Copy link
Collaborator

TimothyStiles commented Sep 22, 2020

It looks like they just changed the salt correction for phusion but I was under the impression that they'd publish a data table of values that could be plugged into poly using the --polymerase flag. Does anything like that exist or is even necessary?

@Koeng101
Copy link
Contributor Author

No, they just have the formulas for calculating the TMs there. I remembered incorrectly about the table :(

@TimothyStiles TimothyStiles added enhancement New feature or request ucb-students labels Oct 23, 2020
@TimothyStiles
Copy link
Collaborator

@Koeng101 what do you mean by validate. I'm trying to explain to some people what needs to be done here but I'm not sure.

@danielecook
Copy link

@TimothyStiles I wrote a tool called VCF-kit in graduate school. The documentation points to some use cases where you can use a VCF to generate primers for the purpose of validating variants. Unfortunately I haven't had time to keep up with the fast-evolving python ecosystem which has made installing and maintaining VCF-kit a challenge. The tool itself can also be slow.

However, I'm mentioning it here as you should consider these applications for Poly. The vk primer tool would iterate through a VCF, construct a template that incorporated variants, generate primers for those variants on the basis of:

  • RFLPs: validation via restriction-enzyme-based assay.
  • Indels: validation via PCR length differences.
  • Sanger template generation

Curious to hear your thoughts on this functionality. Thanks!

@TimothyStiles
Copy link
Collaborator

@danielecook at a glance it looks feasible. Someone actually wrote a VCF parser in Go which may come in handy. We also have multi primer stuff that's going to be merged with PR #88 that should be pretty fast. Build problems on our end shouldn't be an issue either though we still need to fix some test issues on windows via PR #45.

Would you consider writing something that we can review and merge? You'd probably have teach us a few things through the code review process and have some strong tests, comments, and examples to prevent code rot but if this is something that you think would be useful to Poly's and VCF-kit's users I'd be happy to include it in our builds if it'll save you time overall.

@TimothyStiles
Copy link
Collaborator

We're starting to prioritize the library over the CLI so this thread is now a little stale.

If you'd like to see a new feature related to primers please open a new 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
Projects
None yet
Development

No branches or pull requests

3 participants