Skip to content

Commit fd8f16d

Browse files
add more information about consensus strings
1 parent 4c87925 commit fd8f16d

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

docs/src/rosalind/10-cons.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,3 +185,24 @@ we first scan for 'A', 'C', then 'G' and 'T',
185185
so the final consensus string will be biased towards more A's, then C's, G's and T's.
186186
This simply based on which nucleotide counts it will encounter first in the profile matrix.
187187

188+
In the example below, there are equal number of reads indicating that the consensus string could be either `AAAAAAAA` or `GGGGGGGG`. However, because our solution scans for `A` first, the consensus string returned will be `AAAAAAAA`.
189+
190+
```julia
191+
fake_file2 = IOBuffer("""
192+
>Rosalind_1
193+
AAAAAAAA
194+
>Rosalind_2
195+
AAAAAAAA
196+
>Rosalind_3
197+
AAAAAAAA
198+
>Rosalind_4
199+
GGGGGGGG
200+
>Rosalind_5
201+
GGGGGGGG
202+
>Rosalind_6
203+
GGGGGGGG
204+
"""
205+
)
206+
207+
consensus(fake_file2)
208+
```

0 commit comments

Comments
 (0)