Commit 34cb758 1 parent 39a73f1 commit 34cb758 Copy full SHA for 34cb758
File tree 1 file changed +9
-3
lines changed
1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -782,13 +782,19 @@ def get_neighbour(part, lookup):
782
782
if prev_part is not None :
783
783
r_st = prev_part .alignment .r_st + position_offset
784
784
else :
785
- start_delta = - 1 * part .alignment .q_st
785
+ if part .name in bad_contigs :
786
+ start_delta = 0
787
+ else :
788
+ start_delta = - 1 * part .alignment .q_st
786
789
r_st = part .alignment .r_st + start_delta + position_offset
787
790
788
791
if next_part is not None :
789
792
r_ei = next_part .alignment .r_ei + position_offset
790
793
else :
791
- end_delta = len (part .seq ) - part .alignment .q_ei
794
+ if part .name in bad_contigs :
795
+ end_delta = 0
796
+ else :
797
+ end_delta = len (part .seq ) - 1 - part .alignment .q_ei
792
798
r_ei = part .alignment .r_ei + end_delta + position_offset
793
799
794
800
aligned_size_map [part .name ] = (r_st , r_ei )
@@ -807,7 +813,7 @@ def get_neighbour(part, lookup):
807
813
if next_part is not None and next_part .alignment .r_st > part .alignment .r_ei and next_part :
808
814
r_ei = next_part .alignment .r_ei + position_offset
809
815
else :
810
- end_delta = len (part .seq ) - part .alignment .q_ei
816
+ end_delta = len (part .seq ) - 1 - part .alignment .q_ei
811
817
r_ei = part .alignment .r_ei + end_delta + position_offset
812
818
813
819
full_size_map [part .name ] = (r_st , r_ei )
You can’t perform that action at this time.
0 commit comments