Skip to content
Snippets Groups Projects
Commit 64cd64bb authored by François  LAURENT's avatar François LAURENT
Browse files

fixes #4 and implements ABC -> AAC

parent 7c90c963
No related branches found
No related tags found
No related merge requests found
...@@ -175,8 +175,13 @@ def apply_filters(labels, post_filters): ...@@ -175,8 +175,13 @@ def apply_filters(labels, post_filters):
# modify sequentially # modify sequentially
for k in range(1, len(labels)-1): for k in range(1, len(labels)-1):
label = labels[k-1] label = labels[k-1]
if labels[k-1] != label and label == labels[k+1]: if labels[k] != label and label == labels[k+1]:
labels[k] = label labels[k] = label
elif post_filter == 'ABC->AAC':
# modify sequentially
for k in range(1, len(labels)-1):
if labels[k-1] != labels[k] and labels[k] != labels[k+1]:
labels[k] = labels[k-1]
else: else:
raise ValueError(f"filter not supported: {post_filter}") raise ValueError(f"filter not supported: {post_filter}")
return labels return labels
......
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