File tree 2 files changed +3
-3
lines changed
2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ def nexus_matrix(seqdict):
67
67
Takes a dictionary containing sequences and returns the NEXUS MATRIX block.
68
68
"""
69
69
nexus_matrix_block = "MATRIX\n \n "
70
- maxseqlen = max (len (seq ) for seq in seqdict )
70
+ maxseqlen = max (len (seqdict [ seq ] ) for seq in seqdict )
71
71
72
72
for seq in seqdict :
73
73
if len (seqdict [seq ]) < maxseqlen :
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ def test_nexus_matrix():
47
47
"""
48
48
Unit test that determines if a Leave NEXUS MATRIX block can be determined from a sequence dictionary.
49
49
"""
50
- known_input = {"Seq1" : "atgc " , "Seq2" : "atg-" }
51
- expected_output = "MATRIX\n \n Seq1 atgc \n Seq2 atg-\n ;\n \n END;"
50
+ known_input = {"Seq1" : "atgcatg " , "Seq2" : "atg--- -" }
51
+ expected_output = "MATRIX\n \n Seq1 atgcatg \n Seq2 atg--- -\n ;\n \n END;"
52
52
53
53
assert fastonex .nexus_matrix (known_input ) == expected_output
You can’t perform that action at this time.
0 commit comments