Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 34e64b35 authored by BOULLE Olivier's avatar BOULLE Olivier
Browse files

func to set new block size

parent f10225b0
Branches
No related tags found
No related merge requests found
......@@ -28,11 +28,21 @@ bsaI_size = 7
extern_extremity_size = primer_size + overhang_size + bsaI_size + buffer_size # size of non-payload dna part at the extern extremities (start of first block and end of last block)
intern_extremity_size = overhang_size + bsaI_size + buffer_size # size of non-payload dna part at the extremities between blocks
max_total_block_size = 500 # maximum allowed size for a complete block
min_total_block_size = 500 # minimum allowed size for a complete block
max_total_block_size = 300 # maximum allowed size for a complete block
min_total_block_size = 300 # minimum allowed size for a complete block
n_block_max = 10 # maximum assembled number of blocks
def set_block_size(new_size: int):
"""
change the value of the blocks size
"""
global max_total_block_size
global min_total_block_size
max_total_block_size, min_total_block_size = new_size, new_size
def compute_check_sum(binary_string: str) -> str:
"""
calculate the check_sum binary value associated with the binary string
......@@ -111,7 +121,6 @@ def encode_file(input_path: str, output_path: str) -> None:
objective is to fit the payload in the lowest number of blocks, but all blocks must be the same size after addition of non coding stuff (primer/buffer/overhang/bsaI)
"""
#TODO
binary_string = convert_file_to_bits(input_path) # get the binary string representing the file content
#binary_string = input_path #TODO REMOVE
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment