Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Source_Encoding
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
GitLab upgrade completed. Current version is 17.11.3.
Show more breadcrumbs
dnarXiv
Source_Encoding
Commits
a8f0f9e1
Commit
a8f0f9e1
authored
7 months ago
by
BOULLE Olivier
Browse files
Options
Downloads
Patches
Plain Diff
updated correct typing
parent
34e64b35
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
binary_dna_conversion.py
+3
-3
3 additions, 3 deletions
binary_dna_conversion.py
with
3 additions
and
3 deletions
binary_dna_conversion.py
+
3
−
3
View file @
a8f0f9e1
...
...
@@ -29,7 +29,7 @@ def bit_to_dna_balance_GC(bit_char: str, reference_base: str):
return
bit_to_dna_AT
[
bit_char
]
def
forbidden_rest_abaab
(
binary_string_size
:
str
)
->
bool
:
def
forbidden_rest_abaab
(
binary_string_size
:
int
)
->
bool
:
"""
return True if the binary is of a length that cannot be converted by the abaab method
"""
...
...
@@ -45,7 +45,7 @@ def binary_to_dna_abaab(binary_string: str) -> str:
4th 5th bits are normally converted into dna
6th 7th bits are normally converted into dna
8th bit is converted depending on previous conversion : if previous in {AT}, then (0:G, 1:C), elif in {GC}, then (0:A, 1:T)
this ensure that the total sequence cannot contain homopolymers > 3,
this ensure
s
that the total sequence cannot contain homopolymers > 3,
the GC% is in [40%, 60%] in a window of 5 and the conversion rate is 1.6 bit/base
warning : need the binary string to be a multiple of 2, or rest is inconsistent with decoding
...
...
@@ -238,7 +238,7 @@ def size_binary_from_dna_len_abaab(dna_length):
return
base_length
+
7
def
forbidden_rest_baa
(
binary_string_size
:
str
)
->
bool
:
def
forbidden_rest_baa
(
binary_string_size
:
int
)
->
bool
:
"""
return True if the binary is of a length that cannot be converted by the baa method
"""
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment