Skip to content
Snippets Groups Projects
Commit 4953312d authored by Ashrith Sagar Yedlapalli's avatar Ashrith Sagar Yedlapalli :speech_balloon:
Browse files

c0.15.24

parent c8e2d069
No related branches found
No related tags found
No related merge requests found
......@@ -199,10 +199,11 @@ class mutater:
check_dipeptide = lambda seq: re.search(r"(.)\1", str(seq))
get_all_dipeptides = lambda seq: re.finditer(r"(.)\1", seq)
for sequence in map("".join, self.sequences):
for match in map(check_dipeptide, [sequence]):
if not match:
print(sequence)
sequences = itertools.filterfalse(check_dipeptide, map("".join, self.sequences))
print("S| Removed dipeptides from sequences")
self.sequences = sequences
return sequences
def by_intein_sequences(self):
......@@ -416,6 +417,7 @@ def main():
if args.dipeptide:
mutations_obj.remove_dipeptides()
mutations_obj.save_sequences(output_file.replace(".txt", "_BAlsAllSeqsDiPep.txt"))
get_unique = lambda seqs: list(dict.fromkeys(seqs))
sequences = get_unique(sequences)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment