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

Indels aren't calculated correctly #178

Closed
MichaelRade opened this issue Aug 3, 2018 · 6 comments
Closed

Indels aren't calculated correctly #178

MichaelRade opened this issue Aug 3, 2018 · 6 comments

Comments

@MichaelRade
Copy link

Hi,
Indels aren't calculated correctly because sub_seq_i and sub_seq_j are identical.

deblurring.py
160 sub_seq_i = seq_i.np_sequence[:length]
161 sub_seq_j = seq_i.np_sequence[:length]

@amnona
Copy link
Contributor

amnona commented Aug 4, 2018

Hi,
thanks for the feeback.
I didn't fully understand what you mean regarding the indel calculation problem.
can you please elaborate what exactly you think the problem is?
can you give an example where you think the indel calculation isn't correct (starting from the non-aligned sequences)?

thanks
Amnon

@MichaelRade
Copy link
Author

Hi,
for example:
seq_i.sequence = ---GGAGGGT-----
seq_j.sequence = ---AGG-GCGG----
seq_i.np_sequence = [4 4 4 2 2 0 2 2 2 3 4 4 4 4 4]
seq_j.np_sequence = [4 4 4 0 2 2 4 2 1 2 2 4 4 4 4]

In line 160/161 you say this:
sub_seq_i = seq_i.np_sequence[:length]
sub_seq_j = seq_i.np_sequence[:length]
"sub_seq_i" and "sub_seq_j" assigned the same sequence. So "sub_seq_i == sub_seq_j"
Therefore:
sub_seq_i = [4 4 4 2 2 0 2 2 2 3 4 4 4 4 4]
sub_seq_j = [4 4 4 2 2 0 2 2 2 3 4 4 4 4 4]

in line 163 you say
mask = (sub_seq_i != sub_seq_j)
Because "sub_seq_i " and "sub_seq_j " are always equal all element in "mask" have the boolean false.

Consequently in line 165 "mut_is_indel " will be always an empty list
mut_is_indel = np.logical_or(sub_seq_i[mask] == 4, sub_seq_j[mask] == 4)

If you replace in line 161 sub_seq_j = seq_i.np_sequence[:length] with sub_seq_j = seq_j.np_sequence[:length] i think it will be work.

@amnona
Copy link
Contributor

amnona commented Aug 4, 2018 via email

@MichaelRade
Copy link
Author

Hi,
thanks. II'm going to check this out. Regarding your question: I've decided to read the scripts if I want to use it for my analyses. Let's see how long I can keep that up :)

@wasade
Copy link
Member

wasade commented Aug 4, 2018

Thank you @MichaelRade for reporting, and for a detailed example of the bug. I'm reopening the issue until a fix is in place.

@wasade wasade reopened this Aug 4, 2018
@RNAer
Copy link
Contributor

RNAer commented Sep 12, 2018

fix thru #179

@RNAer RNAer closed this as completed Sep 12, 2018
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

No branches or pull requests

4 participants