lucapinello / CRISPResso

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

RuntimeWarning: invalid value encountered in divide #13

Closed mmcneill123 closed 7 years ago

mmcneill123 commented 7 years ago

When running control samples using CRISPResso v1.0.2, I get the following warnings: /usr/lib/python2.7/site-packages/CRISPResso-1.0.2-py2.7.egg/CRISPResso/CRISPRessoCORE.py:1315: RuntimeWarning: invalid value encountered in divide avg_vector_ins_all/=(effect_vector_insertion+effect_vector_insertion_hdr+effect_vector_insertion_mixed) /usr/lib/python2.7/site-packages/CRISPResso-1.0.2-py2.7.egg/CRISPResso/CRISPRessoCORE.py:1316: RuntimeWarning: invalid value encountered in divide avg_vector_del_all/=(effect_vector_deletion+effect_vector_deletion_hdr+effect_vector_deletion_mixed)

I did not get these warnings when I ran the same sample using v0.9.8. Here is my command: FQ1=161219_A4_S4_L001_R1_001.fastq.gz FQ2=161219_A4_S4_L001_R2_001.fastq.gz

AmpliconSequence=TAAGTGAATTACTTTTTTTGTCAATCATTTAACCATCTTTAACCTAAAAGAGTTTTATGTGAAATGGCTTATAATTGCTTAGAGAATATTTGTAGAGAGGCACATTTGCCAGTATTAGATTTAAAAGTGATGTTTTCTTTATCTAAATGA sgRNA=TGTGAAATGGCTTATAATTGC SAMPLE_NAME=38343_S_3 OUTDIR=$(pwd)

    CRISPResso \
    -r1 $FQ1 \
    -r2 $FQ2 \
    -a $AmpliconSequence \
    -g $sgRNA \
    -n $SAMPLE_NAME \
    -o $OUTDIR \
    --keep_intermediate \
    --save_also_png \
    --window_around_sgrna 10 \
    --hide_mutations_outside_window_NHEJ

I've attached two example files that generate this error. Would you please take a look?

Thanks for your help! Matt

161219_A4_S4_L001_R2_001.fastq.gz 161219_A4_S4_L001_R1_001.fastq.gz

lucapinello commented 7 years ago

Hi Matt, I have checked the code on your data and you can safely ignore those warnings. Could you please send me the output folder you get after the execution? I want to double check we have the same output.

Best,

Luca

mmcneill123 commented 7 years ago

Hi Luca,

Thanks for taking a look. Here is a compressed version of the output folder.

Cheers, Matt CRISPResso_on_38343_S_3.zip

lucapinello commented 7 years ago

Yep same output. Thanks!

mmcneill123 commented 7 years ago

Glad to hear it. Can you tell me what in the code is causing this warning?

lucapinello commented 7 years ago

Yes there is a division of 0 by 0 when you don't have any events covering a particular bp in the calculation of the average profiles. This will trigger the warnings, but you can safely ignore them.

2017-01-04 16:01 GMT-05:00 mmcneill123 notifications@github.com:

Glad to hear it. Can you tell me what in the code is causing this warning?

— 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/13#issuecomment-270485383, or mute the thread https://github.com/notifications/unsubscribe-auth/ABB_6rZyUJ2n_hzG-n9ypPR9pctETZKLks5rPAi-gaJpZM4LZvNY .

mmcneill123 commented 7 years ago

OK. Thanks.

From: Luca Pinello [mailto:notifications@github.com] Sent: Wednesday, January 04, 2017 3:05 PM To: lucapinello/CRISPResso CRISPResso@noreply.github.com Cc: Matthew McNeill mmcneill@idtdna.com; Author author@noreply.github.com Subject: Re: [lucapinello/CRISPResso] RuntimeWarning: invalid value encountered in divide (#13)

Yes there is a division of 0 by 0 when you don't have any events covering a particular bp in the calculation of the average profiles. This will trigger the warnings, but you can safely ignore them.

2017-01-04 16:01 GMT-05:00 mmcneill123 notifications@github.com<mailto:notifications@github.com>:

Glad to hear it. Can you tell me what in the code is causing this warning?

— 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/13#issuecomment-270485383, or mute the thread https://github.com/notifications/unsubscribe-auth/ABB_6rZyUJ2n_hzG-n9ypPR9pctETZKLks5rPAi-gaJpZM4LZvNY .

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/lucapinello/CRISPResso/issues/13#issuecomment-270486002, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AQ4-Bc9SQx-Aypf2ksbZaHquZUqdbumWks5rPAlggaJpZM4LZvNY.