Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
27 lines (20 sloc) 531 Bytes
#!/usr/bin/python
import math
from collections import OrderedDict
value,key="",""
s=OrderedDict({})
with open("rosalind_pmch.txt","rU") as f:
for x in f:
if x[0]!=">":
value=value+x.strip()
else:
if key!="": s[key]=value
key=x[1:].strip()
value=""
s[key]=value
for key,value in s.items():
bases={'A':0,'U':0,'G':0,'C':0}
for x in value:
bases[x]+=1
print key
print (math.factorial(bases['A'])*math.factorial(bases['C']))
You can’t perform that action at this time.