Skip to content

Commit

Permalink
fragment fix (#101)
Browse files Browse the repository at this point in the history
fixes a small bug in the recursive fragmenter
  • Loading branch information
Koeng101 authored Oct 6, 2024
1 parent 0b725d7 commit ebe8596
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 7 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
- Fixes add flank bug, releases new version of python lib [#101](https://github.com/Koeng101/dnadesign/pull/101)
- Adds feature for adding flanks to RecursiveFragment. [#100](https://github.com/Koeng101/dnadesign/pull/100)
- Adds cloning and recursion functions to python. [#96](https://github.com/Koeng101/dnadesign/pull/96)
- Adds recursive fragmentation. [#92](https://github.com/Koeng101/dnadesign/pull/92)
Expand Down
6 changes: 1 addition & 5 deletions lib/synthesis/fragment/fragment.go
Original file line number Diff line number Diff line change
Expand Up @@ -291,11 +291,7 @@ func RecursiveFragment(sequence string, maxCodingSizeOligo int, assemblyPattern
if err != nil {
return assembly, err
}
var fragmentsAppended []string
for _, fragment := range fragments {
fragmentsAppended = append(fragmentsAppended, forwardFlank+fragment+reverseFlank)
}
return Assembly{Sequence: sequence, Fragments: fragmentsAppended, Efficiency: efficiency}, nil
return Assembly{Sequence: sequence, Fragments: fragments, Efficiency: efficiency}, nil
}
// After the smallest possible block, begin iterating for each size.
for i, size := range sizes[1:] {
Expand Down
2 changes: 1 addition & 1 deletion py/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def get_shared_lib_ext():

setup(
name='dnadesign',
version='0.1.7',
version='0.1.8',
packages=find_packages(),
package_data={'dnadesign': ['definitions.h', 'libdnadesign.h', "libdnadesign" + get_shared_lib_ext()]},
install_requires=[
Expand Down
2 changes: 1 addition & 1 deletion py/tests/test_fragment.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ def test_recursive_fragment():
result = recursive_fragment(gene, max_oligo_len, assembly_pattern, exclude_overhangs, default_overhangs, "GTCTCT", "CGAG")
assert result is not None, "RecursiveFragment failed"
# Add more specific assertions based on the expected structure of the result
assert result.fragments == ['GTCTCTGTCTCTATGACCATGATTACGCCAAGCTTGCATGCCTGCAGGTCGACTCTAGAGGATCCCCGGGTACCGAGCTCGAATTCACTGGCCGTCGTTTTACAACGTCGTGACTGGGAAAACCCTGGCGTTACCCAACTTAATCGCCTTGCAGCACATCCCCCTTTCGCCAGCGAG', 'GTCTCTCCAGCTGGCGTAATAGCGAAGAGGCCCGCACCGATCGCCCTTCCCAACAGTTGCGCAGCCTGAATGGCGAATGGCGCCTGATGCGGTATTTTCTCCTTACGCATCTGTGCGGTATTTCACACCGCATATGGTGCACTCTCAGTACAATCTGCTCTGATGCCGCATAGCGAGCGAG']
assert result.fragments == ['GTCTCTATGACCATGATTACGCCAAGCTTGCATGCCTGCAGGTCGACTCTAGAGGATCCCCGGGTACCGAGCTCGAATTCACTGGCCGTCGTTTTACAACGTCGTGACTGGGAAAACCCTGGCGTTACCCAACTTAATCGCCTTGCAGCACATCCCCCTTTCGCCAG', 'CCAGCTGGCGTAATAGCGAAGAGGCCCGCACCGATCGCCCTTCCCAACAGTTGCGCAGCCTGAATGGCGAATGGCGCCTGATGCGGTATTTTCTCCTTACGCATCTGTGCGGTATTTCACACCGCATATGGTGCACTCTCAGTACAATCTGCTCTGATGCCGCATAGCGAG']

0 comments on commit ebe8596

Please sign in to comment.