Skip to content
Snippets Groups Projects
Commit 9b2d7915 authored by Samuel Mondal's avatar Samuel Mondal
Browse files

restructuring the function

parent 7e29e0dd
No related branches found
No related tags found
1 merge request!14restructuring the function
def exon_concatenation:
fa = open("fasta.fa",'r')
def exon_concatenation(filename):
fa = open(filename,'r')
lines = fa.readlines()
to_write_to_file = []
for x in range(int(len(lines)/2)):
if x == 0:
annotation = lines[0]
......@@ -9,5 +10,10 @@ def exon_concatenation:
if lines[2*x] == lines[2*(x-1)]:
read+= lines[(2*x)+1]
else:
to_write_to_file.append(annotation)
to_write_to_file.append(read)
annotation = lines[2*x]
read = lines[(2*x)+1]
to_write_to_file.append(annotation)
to_write_to_file.append(read)
return to_write_to_file
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment