Skip to content

Commit

Permalink
fix bug with short matches
Browse files Browse the repository at this point in the history
  • Loading branch information
dorbarker committed Oct 29, 2018
1 parent adfc226 commit bd7b640
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/allele_call.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ def unpack_value(value):
'QueryName': blast_hit['qseqid'],
'SubjName': blast_hit['sseqid'],
'PercentIdentity': blast_hit['pident'],
'PercentLength': blast_hit['length'] / blast_hit['qlen'],
'SubjectStartIndex': blast_hit['sstart'],
'SubjectEndIndex': blast_hit['send'],
'QueryStartIndex': blast_hit['qstart'],
Expand Down
4 changes: 3 additions & 1 deletion src/update.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ def update_locus(gene: Dict[str, Union[str, int, bool, float]],
if not gene['BlastResult']:
return None, None

if gene['CorrectMarkerMatch'] or gene['IsContigTruncation']:
if any((gene['CorrectMarkerMatch'],
gene['IsContigTruncation'],
gene['PercentLength'] < 1)):

return None, None

Expand Down

0 comments on commit bd7b640

Please sign in to comment.