From 72e5fc32379e9c905645366648851c0d5ca7ae4e Mon Sep 17 00:00:00 2001 From: Tony Wu Date: Mon, 15 Jul 2019 14:55:56 -0400 Subject: [PATCH 1/2] add_global_test1 --- coordinates_conversion/bin/fasta_diff.py | 1 + 1 file changed, 1 insertion(+) diff --git a/coordinates_conversion/bin/fasta_diff.py b/coordinates_conversion/bin/fasta_diff.py index ed3e7b9..605a0c8 100644 --- a/coordinates_conversion/bin/fasta_diff.py +++ b/coordinates_conversion/bin/fasta_diff.py @@ -322,6 +322,7 @@ def one_to_multiple_match(): del new_fasta_dict[new] if onetomultiple: + global stage_four_result alignment_list.extend(stage_four_result) # add empty to final result From 3e14eb17021cc1a71fb48bc43c9e89e0d0932218 Mon Sep 17 00:00:00 2001 From: Chia-Tung Wu Date: Mon, 15 Jul 2019 16:29:29 -0400 Subject: [PATCH 2/2] solve_variable_problem --- coordinates_conversion/bin/fasta_diff.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/coordinates_conversion/bin/fasta_diff.py b/coordinates_conversion/bin/fasta_diff.py index 605a0c8..c68cf79 100644 --- a/coordinates_conversion/bin/fasta_diff.py +++ b/coordinates_conversion/bin/fasta_diff.py @@ -274,6 +274,7 @@ def match_split_subsequence(): def one_to_multiple_match(): stagelist=list() + stage_four_result=list() for match in onetomultiple: # one to mutiple if len(onetomultiple[match]['matches']) > 1: @@ -308,7 +309,6 @@ def one_to_multiple_match(): delete_pairs.update((pair1,pair2)) # add overlap pair to delete_pairs - stage_four_result=list() for delete in stagelist: if (delete[0],delete[3]) not in delete_pairs: stage_four_result.append(delete) @@ -322,7 +322,6 @@ def one_to_multiple_match(): del new_fasta_dict[new] if onetomultiple: - global stage_four_result alignment_list.extend(stage_four_result) # add empty to final result