I spent a few minutes cleaning up some of the earlier solutions such as building the DNA complement. I also started gathering the statistics to build solution to the consensus problem. I'm still not using python comprehensions as must as I probably will in the future. More small steps.
def consensus(filename):
clearBioDb()
loadFASTA(filename)
clist=[0 for x in namedSeq[list(namedSeq.keys())[1]]]
counts={x:list(clist) for x in 'ACGT'}
for x in list(namedSeq):
seq=namedSeq[x]
for y in range(seq):
counts[seq[y]][y] +=1
I'm not happy with this temporary solution to building a code block. The ragged right edge doesn't look very pretty. Still it's better than nothing.
You might wonder about why I changed the name of my blog a few weeks ago.
I've started several blogs over the years but, as I said when I change the name, I have a hard time keeping focused on one issue for any length of time. I decided to choose a name that gave me freedom to switch topic as I saw fit. A few years back I got an advertisement saying "Gary Forbis" was a rare name. I found the web page http://gary-forbis.nameanalyzer.net/ that says there were only ten people with that name in the 1990 US census. Since the 1990 census hasn't been released I wonder how they got that information. In 1990 there were two of us working for Washington State. The other one was working as a computer programmer for the transportation department. I was a computer programmer working in Seattle. I saw an obituary for a Gary Forbis who owned a limousine service in Texas. About a year ago I saw another Gary Forbis on google+. That makes two of us on Google+. I don't know how google keeps us separate since we appear to have the same account name. Both of us are programmers and neither of us are the Gary Forbis who worked for the Washington State transportation department. So I know something about 4 of the 10 Gary Forbises in the 1990 census. At least three are computer programmers and two were living in Washington state.
No comments:
Post a Comment