From 5f630a15c3ff7f58e6d1dedf6010483e96fd93bd Mon Sep 17 00:00:00 2001 From: Samuel Mondal <samuel.mondal@unibas.ch> Date: Sat, 26 Nov 2022 20:28:28 +0100 Subject: [PATCH] working code --- sequence_extractor/exon_concatenation.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sequence_extractor/exon_concatenation.py b/sequence_extractor/exon_concatenation.py index 5bfd28d..909a741 100644 --- a/sequence_extractor/exon_concatenation.py +++ b/sequence_extractor/exon_concatenation.py @@ -14,16 +14,16 @@ def exon_concatenation( to_write_to_file = [] for x in range(int(len(lines)/2)): if x == 0: - annotation = lines[0] - read = lines[1] + annotation = lines[0][0:16] + read = lines[1][:-1] if x >= 1: - if lines[2*x] == lines[2*(x-1)]: - read+= lines[(2*x)+1] + if lines[2*x][1:16] == lines[2*(x-1)][1:16]: + read+= lines[(2*x)+1][:-1] else: to_write_to_file.append(annotation) to_write_to_file.append(read) - annotation = lines[2*x] - read = lines[(2*x)+1] + annotation = lines[2*x][0:16] + read = lines[(2*x)+1][:-1] to_write_to_file.append(annotation) to_write_to_file.append(read) - return to_write_to_file \ No newline at end of file + return to_write_to_file -- GitLab