Skip to content

Commit

Permalink
Fix for #89
Browse files Browse the repository at this point in the history
  • Loading branch information
cytham authored Jul 30, 2024
1 parent d218a27 commit bff4b56
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion nanovar/nv_alt_seq.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,13 @@ def make_bed(line, sv_type, sv_id):
elif sv_type == 'Del':
start = int(data[6].split('~')[1].split(':')[1].split('-')[0]) - 1
end = int(data[6].split('~')[1].split(':')[1].split('-')[1])
else: # ['Nov_Ins', 'E-Nov_Ins_bp', 'S-Nov_Ins_bp', 'Inv', 'Inv(1)', 'Inv(2)', 'TDupl', 'Intra-Ins', 'Intra-Ins(1)', 'Intra-Ins(2)']
elif sv_type in ['Nov_Ins', 'E-Nov_Ins_bp', 'S-Nov_Ins_bp']:
end = int(data[6].split('~')[1].split(':')[1].split('-')[0])
start = end - 1
else: # ['Inv', 'Inv(1)', 'Inv(2)', 'TDupl', 'Intra-Ins', 'Intra-Ins(1)', 'Intra-Ins(2)']
# end = int(data[6].split('~')[1].split(':')[1].split('-')[0])
# start = end - 1 # Might be causing issue #89
return ''
start = max(start, 0)
end = max(end, 1)
bed_line = '\t'.join([chrm, str(start), str(end), sv_id]) + '\n'
Expand Down

0 comments on commit bff4b56

Please sign in to comment.