TeselaGen/openVectorEditor

Feature Request: PCR simulation

jdmccauley opened this issue ยท 15 comments

@tnrich

Hi TeselaGen,

One common feature in modern plasmid editors is the ability to simulate PCR products given a pair of primer bind features. Having this would be very helpful in visually confirming that primers generated manually or informatically. SnapGene does this well, and I found that ApE just released the feature in the last 6 months.

At first it would be helpful to see PCR products with primers that are a 100% match to the vector, and even better if we can have primers that are not a 100% match. For example, a primer to make a part for assembly will have an overhang not contained in the original map, but seeing a PCR product with the overhang included would be invaluable. This would be more complicated though, because primers would have to be allowed to be put in the map that are not just +/- slices of the map.

Best,
Josh

Hi @jdmccauley thanks for making this issue! I think that is probably a good idea. OVE actually does allow non-exact primer matches currently when the allowPrimerBasesToBeEdited=true prop is passed to the editor. You can see that option in effect here:
https://teselagen.github.io/openVectorEditor/#/Editor?allowPrimerBasesToBeEdited=true

If you could please post screenshots here explaining how the simulate PCR products given a pair of primer bind features functionality works in other editors. That would probably be the best place to start to figure out how we'd want this functionality to work in OVE.

Thanks very much!
Thomas

Hi @tnrich,

Thanks for getting back to me! I didn't know that option existed, and this is what I was hoping for with the primers! Is there a way to enable this in the Electron version? I can get to the console, but I can't tell where I would pass allowPrimerBasesToBeEdited=true.

For simulate PCR products, see this in the attached images where I do it in ApE. In short, it lets you select primer_bind features that point in opposing directions (one positive, one negative), and then creates a new vector/sequence view that is just a slice of the original vector sequence between and including the primers. If allowPrimerBasesToBeEdited is true, then the resulting PCR product should have those edited bases in the new product, not the original bases the primer binds to. If it makes sense, this is what I mean, where pcr_product is a new 'Sequence' to be viewed:

pcr_product = positive_primer_sequence + original_sequence[positive_primer_end_position + 1:negative_primer_end_position - 1] + negative_primer_sequence

So just a concatenation of primers and the region between their binding sites. This would be helpful because it would let me view that my intended PCR product should look like in OVE.

Please let me know if this makes no sense. I would attach an example gb of a 'PCR product', but GitHub won't let me do that...

Best,
Josh

Screen Shot 2022-07-27 at 4 58 46 PM

Screen Shot 2022-07-27 at 5 00 42 PM

.

Is there a way to enable this in the Electron version?

No there is not a way to do this in the electron version currently.

it lets you select primer_bind features that point in opposing directions (one positive, one negative)

How does the selection work? Do you click the two primers and then trigger an action from the file menu? Can you provide more info on the process here.

This would be helpful because it would let me view that my intended PCR product should look like in OVE.

Would you just want a temporary pop-up of the resultant PCR product or would you want it to create a new file that you could download and open? Should the resultant PCR product file include the primers used to create it?

I would attach an example gb of a 'PCR product', but GitHub won't let me do that

You can always compress a file with a non-standard file type to a .zip file and then attach it in a github issue.

Thanks for the additional details here. This is getting me closer to understanding what you're asking for. Cheers!

re: Electron
Understandable.

re: Selection
In ApE, it first asks where to source the primers. It is nice to allow for sourcing primers from another file, but I only use primers already included in the sequence file most often.
Screen Shot 2022-07-29 at 5 06 12 PM

From there, you can select which primers you want to use for generating the PCR product:
Screen Shot 2022-07-29 at 5 06 40 PM

re: pop-up
Yes! Ideally I think the PCR product should be an other pop-up, which a user could then decide to save as a genbank/fasta/json if they want; not automatically saving the file like you mention. And yes, the PCR product pop-up/file should include the primers used to create it: that would save annotating again and helps visualize the product better.

Thanks for the zip advice. I'm attaching a zip of the default 'pj5_00001.ape' that the demo returns when you export as genbank, 'pj5_00001_with_primer.ape' which has the same pj5_00001.ape map, but with a reverse primer I added. Finally, 'pj5_00001_pcr.gb' which is a PCR of the pj5_00001.ape using the primers noted in pj5_00001_with_primer.ape. The PCR sequence map is exactly what I'd like to see load in a new OVE window when I use the 'PCR' feature we're talking about.
pj5_00001_pcr.zip

Thank you for asking these great questions! Cheers!

@jdmccauley here's what I am tinkering with as a first pass:

Does this look like it would encompass the functionality you'd like to see?

image

Basically the flow would be Tools > Create New PCR and then select your forward and reverse primers from a dropdown and then see a downloadable preview below based on the chosen primers.

Lemme know!

Hey @tnrich

This looks amazing, and it's exactly what I was hoping for! The only thing I'd want to add is that the PCR product include that primer mismatch. If we do a PCR in the lab and there's an overhang in the primer like that, the PCR product would have that overhang included. So the PCR product should start with 'agggaa'. With that included, ship it!

Cheers,
Josh

@jdmccauley yep I am working on getting the additional primer bases to be included there. I'll publish a new version of OVE shortly that you can try this new feature out on.

@tnrich Sounds perfect, thank you!

@jdmccauley here ya go:

https://teselagen.github.io/openVectorEditor/#/Editor?showDemoOptions=false&allowPrimerBasesToBeEdited=true

To use it, go to Tools > Simulate PCR

Please let me know how that works for you!

@njhillson just pinging you here in case you might find this functionality interesting. (no rush on responding to this!)

@tnrich This is perfect! Also, fantastic job on adding this so quickly!

Do you know when OVE-Electron will be released with this feature?

@jdmccauley looking into that now

@jdmccauley ok I've pushed a mac and linux release - https://github.com/TeselaGen/ove-electron/releases/tag/v1.4.0

windows should be available sometime soon on the store.

Let me know if it works for you!

@tnrich
I finally got to try it on mac. This is AWESOME! Thank you so much!

@jdmccauley no problem! Glad you like it. Going to close this issue but feel free to re-open or create a new one if necessary.