File tree Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Expand file tree Collapse file tree 2 files changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -23,15 +23,15 @@ function (m::Recombination)(parents::AbstractVector{Vector{Char}})
23
23
@assert DESilico. same_length_sequences (parents)
24
24
length (parents) == 0 && return Vector {Vector{Char}} ([])
25
25
alphabets = m. alphabet_extractor (parents)
26
- mutant_library = _recombine_symbols (alphabets, parents[ 1 ] )
26
+ _recombine_symbols (alphabets)
27
27
end
28
28
29
29
function _recombine_symbols (
30
30
alphabets:: Vector{Set{Char}} ,
31
- first_parent:: AbstractVector{Char} ,
32
31
)
33
- mutant_library = Vector {Vector{Char}} ([copy (first_parent)])
34
- for position in 1 : length (first_parent)
32
+ sequence = map (alphabet -> [symbol for symbol in alphabet][1 ], alphabets)
33
+ mutant_library = Vector {Vector{Char}} ([sequence])
34
+ for position in 1 : length (alphabets)
35
35
new_mutants = Vector {Vector{Char}} ([])
36
36
for mutant in mutant_library
37
37
for symbol in alphabets[position]
Original file line number Diff line number Diff line change 5
5
Set ([' A' ]),
6
6
Set ([' B' , ' D' ]),
7
7
]
8
- first_parent = [' A' , ' A' , ' B' ]
9
- mutants = DESilico. _recombine_symbols (alphabets, first_parent)
8
+ mutants = DESilico. _recombine_symbols (alphabets)
10
9
@test length (mutants) == 4
11
10
@test Set (mutants) == Set ([
12
11
[' A' , ' A' , ' B' ],
13
12
[' A' , ' A' , ' D' ],
14
13
[' C' , ' A' , ' B' ],
15
14
[' C' , ' A' , ' D' ],
16
15
])
17
- @test first_parent == [' A' , ' A' , ' B' ]
18
16
end
19
17
20
18
@testset " Constructors" begin
You can’t perform that action at this time.
0 commit comments