Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
30 lines (22 sloc) 530 Bytes
from fasta import readFASTA
f=open("rosalind_cstr (1).txt","rU")
dna=[x.strip() for x in f.readlines()]
base=dna[0]
chartable=[]
for i,x in enumerate(base):
row=''
count_0,count_1=0,0
for y in dna:
if x==y[i]:
row+='1'
count_1+=1
else:
row+='0'
count_0+=1
if count_0>1 and count_1>1:
chartable.append(row)
f.close()
f=open("cstr_out.txt","w")
for x in chartable:
f.write(x+'\n')
f.close()
You can’t perform that action at this time.