Skip to content

Commit

Permalink
normal update
Browse files Browse the repository at this point in the history
modify a minor bug
  • Loading branch information
HaolingZHANG committed Dec 1, 2021
1 parent 2307f8f commit 2372447
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
16 changes: 7 additions & 9 deletions methods/flowed.py
Original file line number Diff line number Diff line change
Expand Up @@ -378,31 +378,29 @@ def normal_encode(self, bit_segments):
+ "We recommend you to re-select the rule or take a new run.")

if len(bad_data) == 0 and len(bit_segments) == 0:
return [], []
return []
elif len(bad_data) == 0:
good_data = []
good_data, band_data = [], []
for row in range(len(bit_segments)):
if self.need_logs:
self.monitor.output(row + 1, len(bit_segments))
good_data.append(bit_segments[row])
return good_data, []
elif len(bad_data) == len(bit_segments):
bad_data = []
good_data, bad_data = [], []
for row in range(len(bit_segments)):
if self.need_logs:
self.monitor.output(row + 1, len(bit_segments))
bad_data.append(bit_segments[row])
return [], bad_data
else:
good_data = []
bad_data = []
x, y = [], []
for row in range(len(bit_segments)):
if self.need_logs:
self.monitor.output(row + 1, len(bit_segments))
if row in bad_data:
bad_data.append(bit_segments[row])
y.append(bit_segments[row])
else:
good_data.append(bit_segments[row])
x.append(bit_segments[row])
good_data, bad_data = x, y

if self.need_logs:
print("Encode based on random pair iteration.")
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

setup(
name="Chamaeleo",
version="1.33",
version="1.34",
description="library for the well accepted coding schemes of DNA storage",
long_description="Chamaeleo is currently the only collection focused on different codec methods for DNA storage. "
"This kit is mainly developed and operated by BGI-Research (Shenzhen). "
Expand Down

0 comments on commit 2372447

Please sign in to comment.