Commit 83e2c6b9 authored by Mathieu Giraud's avatar Mathieu Giraud
Browse files skip the clone (and warn) when the new window is already used

parent 910c6e93
......@@ -9,6 +9,8 @@ parser.add_argument('file', nargs='+', help='''.vidjil files''')
args = parser.parse_args()
used_windows = []
def change_window(clone, w):
old_window = clone['id']
pos = clone['sequence'].find(old_window)
......@@ -25,8 +27,12 @@ def change_window(clone, w):
new_window = clone['sequence'][new_start:new_start+w]
if new_window in used_windows:
print("! Window '%s' is already used - clone '%s' unchanged" % (new_window, old_window))
clone['id'] = new_window
class Analysis():
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment