File format:
>ackg_2341
ACGATACGACGACATCA
>ackg_7865
GCACTACGCAGAAACGAA
>...
I want to skip the line with '>' each time. I proposed doing this and it isn't working.
f = open("data.txt","r")
lcs = ''
if f.read(1)=='>':
str1 = f.readline[1:]
for line in f:
if line.read(1)=='>'
temp = ''.join(f.readline[1:])
res = len(lcs_matrix(str1,temp))
if len(lcs)<res:
lcs = lcs_matrix(str1, temp)
print(lcs)
What am I doing wrong?
Traceback (most recent call last):
File "shared_substr.py", line 83, in <module>
print(DNA_multi_lcs())
File "shared_substr.py", line 68, in DNA_multi_lcs
str1 = f.readline[1:]
TypeError: 'builtin_function_or_method' object is not subscriptable