lucapinello / CRISPResso

Software pipeline for the analysis of CRISPR-Cas9 genome editing outcomes from sequencing data
Other
131 stars 55 forks source link

Window around cleavage position seems to be asymmetrical #15

Closed mdyckmanns closed 7 years ago

mdyckmanns commented 7 years ago

With various data, I get different quantification results when I flip the reference amplicon sequence between sense and anti-sense strand (i.e. when I reverse-complement it) if I provide a guide RNA that I keep unchanged when I run CRISPRessoPooled. The results should be independent of that.

I think the problem is caused by the fact that the window around the cleavage position is asymmetrical with respect to the cleavage position (which by default is located between the third and fourth base of the guide sequence), i.e. there are more bases to the left of the cleavage position then on the right of the cleavage position taken into account when quantifying indels.

Looking at the code, I would propose st=max(0,cut_p-half_window+1) en=min(len(args.amplicon_seq),cut_p+half_window+1) in lines 1228 and 1229 of CRISPRessoCORE.py. This did make the asymmetry between the results better in my example, but did not fully remove it, so it can't be the full solution.

lucapinello commented 7 years ago

Thanks for reporting this! Do you mind to send me the amplicon sequence you have used for your tests and as well the sgRNA sequence. The asymmetry after correction it may caused also by non-unique alignments, but in order to exclude this I need to take a look to the sequence you have used. Also can you send me the allele-frequency txt file?

mdyckmanns commented 7 years ago

Dear Luca,

the problem only occurs if I provide a guide sequence and it does also vanish if I set "-w 0" to switch off the restriction to a window around the cleavage position.

I attached some files relevant for the experiment. I used your demo data (I think I cut off a few bases to avoid adapter sequences) and restricted it to 10000 reads.

Note that in most images, the cleavage position is shifted by one if I put the amplicon sequence on the reverse strand.

Thanks for looking into this!

Best Malte

crispresso.zip

lucapinello commented 7 years ago

Hi Malte,

Thanks for the detailed report and for sharing the data!

I should be able to test this by this week and I will let you know soon.

Best,

Luca

2017-03-28 7:47 GMT-04:00 mdyckmanns notifications@github.com:

Dear Luca,

the problem only occurs if I provide a guide sequence and it does also vanish if I set "-w 0" to switch off the restriction to a window around the cleavage position.

I attached some files relevant for the experiment. I used your demo data (I think I cut off a few bases to avoid adapter sequences) and restricted it to 10000 reads.

Note that in most images, the cleavage position is shifted by one if I put the amplicon sequence on the reverse strand.

Thanks for looking into this!

Best Malte

crispresso.zip https://github.com/lucapinello/CRISPResso/files/875509/crispresso.zip

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/lucapinello/CRISPResso/issues/15#issuecomment-289744726, or mute the thread https://github.com/notifications/unsubscribe-auth/ABB_6gsICBLshVmTfGWl3o-A9qtZqJmBks5rqPNPgaJpZM4MoDUK .

lucapinello commented 7 years ago

Hey Malte,

I think I have fixed all the problems, thanks again for reporting the problem and for the suggestions.

I would really appreciate if you can test this new version.

I have also created an ipython notebook for a quick test:

https://dl.dropboxusercontent.com/u/10719885/TEST_CRISPRESSO_FW_REVERSE_WINDOW.ipynb

Please let me know how it goes.

Best

lucapinello commented 7 years ago

Hi Malte,

I will close this for now. If you have still problems after testing CRISPResso please let me know.

Thanks,

Luca

mdyckmanns commented 7 years ago

Hi Luca,

sorry for the delay, I just returned from vacation. Looks good now! Thanks for fixing this so quickly!

Best Malte

lucapinello commented 7 years ago

No problem! Hope you enjoyed your vacation and thanks again for reporting the bug.

On Apr 10, 2017 4:01 AM, "mdyckmanns" notifications@github.com wrote:

Hi Luca,

sorry for the delay, I just returned from vacation. Looks good now! Thanks for fixing this so quickly!

Best Malte

— You are receiving this because you modified the open/close state.

Reply to this email directly, view it on GitHub https://github.com/lucapinello/CRISPResso/issues/15#issuecomment-292877263, or mute the thread https://github.com/notifications/unsubscribe-auth/ABB_6rjbtBuxbGAzWQM8iInPsAnMuZfNks5rueHTgaJpZM4MoDUK .