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

User cloning #314

Closed
wants to merge 91 commits into from
Closed

User cloning #314

wants to merge 91 commits into from

Conversation

dgruano
Copy link
Contributor

@dgruano dgruano commented Oct 16, 2024

A have a minimal working example of USER cloning, to address #309

As a summary, USER removes the uracil base from a dsDNA leaving an abasic site, that is subsequently cleaved by an AP liase. If the upstream sequence is short enough, it will detach due do instability of the ds bonds, leaving a 3' overhang.

I created a USER class that mimics the reaction of USER + AP liase. Did this following the structure of a restriction enzyme. However, the current implementation does now allow to use the search method by Dseq.cut. This is because:

  1. The overhang varies depending on the number of bases upstream of the dU.
  2. There is no way to check for the presence of a dU in the crick strand by looking on the watson strand. Therefore, instead of the usual method of searching for motifs in watson and rc(watson), the USER.search method only looks for USER sites in one strand.

Finally, the products method implements this search function properly, searching first in the watson and then in the crick to find all possible combinations. This are ordered by descending order of melting temperature of the double-stranded fragment (used here as a stability proxy).

@BjornFJohansson , you had noted down an outline and written some code and tests. While my implementation is different, could you check if this is moving in the right direction?

@hiyama341 you also have implemented USER in teemi, and may have used USER in vitro, any thoughts?

dependabot bot and others added 18 commits October 8, 2024 11:11
Bumps [black](https://github.com/psf/black) from 24.4.2 to 24.8.0.
- [Release notes](https://github.com/psf/black/releases)
- [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
- [Commits](psf/black@24.4.2...24.8.0)

---
updated-dependencies:
- dependency-name: black
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [sphinx-rtd-theme](https://github.com/readthedocs/sphinx_rtd_theme) from 2.0.0 to 3.0.0.
- [Changelog](https://github.com/readthedocs/sphinx_rtd_theme/blob/master/docs/changelog.rst)
- [Commits](readthedocs/sphinx_rtd_theme@2.0.0...3.0.0)

---
updated-dependencies:
- dependency-name: sphinx-rtd-theme
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [prettytable](https://github.com/jazzband/prettytable) from 3.10.0 to 3.11.0.
- [Release notes](https://github.com/jazzband/prettytable/releases)
- [Changelog](https://github.com/jazzband/prettytable/blob/main/CHANGELOG.md)
- [Commits](prettytable/prettytable@3.10.0...3.11.0)

---
updated-dependencies:
- dependency-name: prettytable
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
* closes pydna-group#270

* closes pydna-group#269 by adding an example notebook + extra tests

* closes pydna-group#288, includes the graphics in docs notebook
* new docs

* update action

* update action

* fix typo in action

* update README + closes pydna-group#305

* improve docs

* document how docs work

* fix autogen_docs.sh

* fix crispr docstring
* fix action

* fix action
- Sort possible final products by Tm (stability proxy)
- Tests passing
- Several TODOs
@manulera
Copy link
Collaborator

manulera commented Oct 17, 2024

Hello,

I have made a pull request to your pull request (dgruano#1) with a small refactor that allows to use the USER objects as regular restriction enzymes.

It's a bit hacky, but I don't think it could be a problem. Basically, you make the property .ovhg a method with a @property decorator, and as you find the sites in search, you store the overhangs of the cuts in a separate list (.ovhgs). When calling get_cutsites, you access the positions of the cuts in the same order as you found them, so .ovhgs.pop(0) yields the ovhg in the same order.

I don't see a dangerous scenario for this being used in Dseq.get_cutsites since they are called one after the other:

cuts_watson = [c - 1 for c in e.search(self, linear=(not self.circular))]
out += [((w, e.ovhg), e) for w in cuts_watson]

Regarding the "edge-case" situations (multiple u on the same strand / circular sequences), I think for now raising an error should be enough. I don't see a use-case to support those scenarios.

cccUaaaUaaa
tttGtttGttt

What should this give? I don't think it's worth supporting.

cccU


aaaU


cccUaaaU < This would be there probably as well, since USER probably does not cut if there is no double strand (if it cuts first the second U)


        aaa
tttGtttGttt

Of note, don't use .watson and .crick when calling search, because the cut coordinates are with respect to the "full sequence" (search for "full sequence" in the cutsite_pairs notebook).

@dgruano
Copy link
Contributor Author

dgruano commented Oct 17, 2024

Wow! I just learnt a lot of things! I realized the problem to use the search function was that ovhg had to be "dynamic" but didn't think it can actually be done.

And yeah, my bad! Did not realize that Dseq.reverse_complement() gets the ACTUAL reverse complement of the Dseq object but keeping the watson coordinates. Very happy to get to know pydna better.

Will write some tests, merge your PR, implement the nickase and push changes to this PR. Thanks for looking into this!!!

@hiyama341
Copy link
Collaborator

You guys are so cool. Good work!

@manulera manulera deleted the branch pydna-group:dev_bjorn October 24, 2024 07:52
@manulera manulera closed this Oct 24, 2024
@manulera manulera reopened this Oct 24, 2024
manulera and others added 2 commits October 25, 2024 11:18
* USER refactor

* clear ovhgs before searching for safety

* clear ovhgs before searching for safety
@dgruano
Copy link
Contributor Author

dgruano commented Oct 25, 2024

USER works like a charm. I will implement the nickase and publish the PR for review.

- Fix counting problem in USER search
- USER cannot cut if there are crick sites upstream of watson
sites (see tests)
- Nickase cannot cut if there are crick sites upstream of watson
sites (see tests)
@manulera manulera deleted the branch pydna-group:dev_bjorn November 10, 2024 08:37
@manulera manulera closed this Nov 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants