Skip to content
Snippets Groups Projects
Commit a953baca authored by Rohmer Coralie's avatar Rohmer Coralie
Browse files

fix division by zero bug in data_formatting

parent 958e2857
No related branches found
No related tags found
No related merge requests found
...@@ -108,9 +108,14 @@ for file in files_alignement: ...@@ -108,9 +108,14 @@ for file in files_alignement:
r_identity=round( (nb_identity/len(seq)*100) ,1) r_identity=round( (nb_identity/len(seq)*100) ,1)
r_match=round( (match/len(seq)*100) ,1) r_match=round( (match/len(seq)*100) ,1)
r_error=round( (error/len(seq)*100) ,1) r_error=round( (error/len(seq)*100) ,1)
if (error != 0):
r_sub=round((nb_substitution/error*100),1) r_sub=round((nb_substitution/error*100),1)
r_del=round((nb_deletion/error*100),1) r_del=round((nb_deletion/error*100),1)
r_ins=round((nb_insertion/error*100),1) r_ins=round((nb_insertion/error*100),1)
else:
r_sub=0
r_del=0
r_ins=0
data[MSA][read_size][nb_read]=[nb_ambiguity,r_ambiguity,nb_identity,r_identity,match,r_match, data[MSA][read_size][nb_read]=[nb_ambiguity,r_ambiguity,nb_identity,r_identity,match,r_match,
error,r_error,nb_substitution,r_sub,nb_deletion,r_del,nb_insertion,r_ins,size_seq] error,r_error,nb_substitution,r_sub,nb_deletion,r_del,nb_insertion,r_ins,size_seq]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment