Skip to content

Conversation

@dgruano
Copy link
Collaborator

@dgruano dgruano commented Apr 23, 2024

Hi @manulera !

Following our discussion on #102 , I implemented some basic functionality to use CRISPR. It follows the same logic as standard Homologous Recombination, but checks that the Cas9 cut occurs within the homology region.

I added a file with an example cloning strategy with template, insert and guide to test CRISPR in the app, crispr_test.json.

We just need to find a nice way to add tests for edge cases. I did quick and dirty tests in the crispr.ipynb notebook, but I have not found a way to properly implement them just yet. This is because the tests use a hypothetical Cas9 enzyme with a 5 bp guide (makes it easy to design the sequences for the tests), but the current version of the endpoint uses a hardcoded standard Cas9 with 20 bp guide. We could:

  • Design appropriate example sequences to test the 20 bp Cas9.
  • Wait until we allow for custom Cas enzymes (if this is the case)

Let me know your thoughts.
Cheers!

  - Minimal working example with standard Cas9 and 20bp guide
  - Guide is provided as an primer
  - TODO: add tests for edge cases
@codecov
Copy link

codecov bot commented Apr 23, 2024

Codecov Report

Attention: Patch coverage is 93.33333% with 3 lines in your changes are missing coverage. Please review.

Project coverage is 93.68%. Comparing base (f08d023) to head (e59d459).

Files Patch % Lines
main.py 91.89% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #118      +/-   ##
==========================================
+ Coverage   93.61%   93.68%   +0.06%     
==========================================
  Files           7        7              
  Lines        1065     1108      +43     
==========================================
+ Hits          997     1038      +41     
- Misses         68       70       +2     
Flag Coverage Δ
unittests 93.68% <93.33%> (+0.06%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@manulera
Copy link
Owner

Hi @dgruano, I have added a few basic tests and refactored a bit. The most important change is that now you can add more than one guide RNA to be passed.

I can add for the tests cases you mentioned, but I have some questions about specific cases and what should happen to them:

Ex1 / Ex2: Not sure what should happen here. Here the homology region would clearly be too short, perhaps if the cut falls on top the homology region, it should only be allowed if the remaining homology arm is >= minimal_homology.

EX1: Cut on the right part of HR
        ><
       GTaaaPAM
       |||||
ACGtttGGTAAAAGGACGT
|||    |||
ACG....GTA

EX2: Cut on the left part of HR
 ><
ACGttPAM  
|||||
ACGttAGGCTGCA
 |||  |||
 CGT..GGC

EX4: This would be a no for me, I would say.


EX4: Cut to the left of HR
     ><
    GTaaaPAM
    |||||PAM
TTTGGTaaaAGGACGT
      |||   |||
      AAA...ACG

EX5: I did not see the difference between this and EX4

EX5: Double target HR
        ><
       GTaaaPAM
       |||||
ACGtttGGTAAAAGGTGCA
|||   |||
ACG...GGT

@manulera manulera mentioned this pull request Apr 25, 2024
@manulera
Copy link
Owner

I will merge this, since it has some minimal functionality, but I keep the issue open to add the tests.

@manulera manulera merged commit 7e06ae5 into master Apr 25, 2024
@manulera manulera deleted the crispr-rebase branch April 25, 2024 15:33
@dgruano
Copy link
Collaborator Author

dgruano commented Apr 26, 2024

Hi @manulera , great!

For Ex1/Ex2, I agree. The cloning strategy needs to have minimal homology in both sides of the cut, so I would add that limitation.

Ex4 should not work as the homology region does not span over both sides of the cut.

Ex5 is a special case because the right side of the insert is homologous to two different sections of the template. Here is a more clear representation:

EX5: Double target HR
        ><
       GTaaaPAM
       |||||
ACGtttGGTAAAAGGTGCA
|||   |||
ACG...GGT (HR1)
|||          |||
ACG..........GGT (HR2)

In this example, using HR2 homology regions, the cut happens between them and can be repaired.

PS: Great addition to allow for multiple guides! Looking forward to test it.

@manulera
Copy link
Owner

This is now added in the hosted version, thanks @dgruano

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.

3 participants