Skip to content

Commit

Permalink
#84 passed test, which is a fluke, since I haven't written code yet
Browse files Browse the repository at this point in the history
  • Loading branch information
weka511 committed Jan 12, 2021
1 parent d56ec49 commit c22586a
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
15 changes: 13 additions & 2 deletions BA10F.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,27 @@
import os
import time
from helpers import read_strings

from hmm import ConstructProfileHMM,formatEmission,formatTransition

if __name__=='__main__':
start = time.time()
parser = argparse.ArgumentParser('BA10F Construct a Profile HMM with Pseudocounts ')
parser.add_argument('--sample', default=False, action='store_true', help='process sample dataset')
parser.add_argument('--rosalind', default=False, action='store_true', help='process Rosalind dataset')
parser.add_argument('--precision', default=3, help='Controls display of probabilities')

args = parser.parse_args()
if args.sample:
pass
States,Transition,Emission = ConstructProfileHMM(0.358,
['A', 'B', 'C', 'D', 'E'],
['ADA', 'ADA', 'AAA', 'ADC', '-DA', 'D-A'],
sigma=0.01)

for row in formatTransition(Transition,States,precision=args.precision):
print (row)
print ('--------')
for row in formatEmission(Emission,States,['A', 'B', 'C', 'D', 'E'],precision=args.precision):
print (row)



Expand Down
11 changes: 11 additions & 0 deletions data/rosalind_ba10f.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
0.221 0.01
--------
A B C D E
--------
DDDE-BBDA
BD--EBDDA
DDDCEB-DA
D-D-EBD-A
--DCEBDDA
-D-CEBDDA
DDD-E-DCA

0 comments on commit c22586a

Please sign in to comment.