Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
20 lines (16 sloc) 408 Bytes
#!/usr/bin/python
from collections import OrderedDict
def readFASTA(name):
value,key="",""
s=OrderedDict({})
with open(name,"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
return(s)
You can’t perform that action at this time.