Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
python_one_week_4_biologists_solutions
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
Show more breadcrumbs
hub-courses
python_one_week_4_biologists_solutions
Commits
f732f95e
Unverified
Commit
f732f95e
authored
4 years ago
by
Bertrand NÉRON
Browse files
Options
Downloads
Patches
Plain Diff
fix docstrings in restriction.py
parent
0e7a0e61
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#57965
passed
4 years ago
Stage: build
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
source/_static/code/restriction.py
+7
-6
7 additions, 6 deletions
source/_static/code/restriction.py
with
7 additions
and
6 deletions
source/_static/code/restriction.py
+
7
−
6
View file @
f732f95e
from
operator
import
itemgetter
# we decide to implement enzyme as tuple with the following structure
# ("name", "comment", "sequence", "cut", "end")
# 0 1 2 3 4
# (name, comment, sequence, cut, end)
# 0 1 2 3 4
def
one_enz_one_binding_site
(
dna
,
enzyme
):
"""
...
...
@@ -19,7 +20,7 @@ def one_enz_all_binding_sites(dna, enzyme):
:param dna: the dna sequence to search enzyme binding sites
:type dna: str
:param enzyme: the enzyme to looking for
:type enzyme: a
named
tuple
RestrictEnzyme
:type enzyme: a tuple
(str name, str comment, str sequence, int cut, str end)
:return: all positions of enzyme binding sites in dna
:rtype: list of int
"""
...
...
@@ -36,7 +37,7 @@ def one_enz_all_binding_sites2(dna, enzyme):
:param dna: the dna sequence to search enzyme binding sites
:type dna: str
:param enzyme: the enzyme to looking for
:type enzyme: a
named
tuple
RestrictEnzyme
:type enzyme: a tuple
(str name, str comment, str sequence, int cut, str end)
:return: all positions of enzyme binding sites in dna
:rtype: list of int
"""
...
...
@@ -60,8 +61,8 @@ def binding_sites(dna, enzymes):
:param dna: the dna sequence to search enzyme binding sites
:type dna: str
:param enzyme: the enzyme to looking for
:type enzyme:
a
namedtuple RestrictEnzym
e
:param enzyme
s
: the enzyme
s
to looking for
:type enzyme
s
: a
sequence of enzyme tupl
e
:return: all positions of each enzyme binding sites in dna
:rtype: list of int
"""
...
...
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