Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Pampa Valentin
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hottlet Valentin
Pampa Valentin
Commits
23e5ef2a
Unverified
Commit
23e5ef2a
authored
4 months ago
by
touzet
Committed by
GitHub
4 months ago
Browse files
Options
Downloads
Patches
Plain Diff
Bug on helical position fixed
parent
260e6b0b
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/homology.py
+8
-12
8 additions, 12 deletions
src/homology.py
with
8 additions
and
12 deletions
src/homology.py
+
8
−
12
View file @
23e5ef2a
...
...
@@ -20,15 +20,10 @@ def Pmask_distance(seq1, seq2):
return
-
1
r
=
0
for
c1
,
c2
in
zip
(
seq1
,
seq2
):
match
(
c1
,
c2
):
case
(
'
P
'
,
'
P
'
):
if
c1
==
'
P
'
and
c2
==
'
P
'
:
None
case
(
'
P
'
,
_
)
:
elif
c1
==
'
P
'
or
c2
==
'
P
'
:
r
=
r
+
1
case
(
_
,
'
P
'
):
r
=
r
+
1
case
_
:
None
return
r
def
find_markers_single_sequence
(
seq
,
set_of_digested_peptides
,
dict_of_model_markers
,
set_of_markers
):
...
...
@@ -40,7 +35,6 @@ def find_markers_single_sequence(seq, set_of_digested_peptides, dict_of_model_ma
# for each marker of dict_of_model_markers (characterized by a *code*) find the best location in the sequence seq.
# output: set of markers
helical_start
=
sequences
.
helical_region
(
seq
)[
0
]
set_of_found_codes
=
set
()
# contains the set of codes for model markers found in the current sequence
set_of_raw_digested_peptides
=
{
pep
.
sequence
()
for
pep
in
set_of_digested_peptides
}
...
...
@@ -97,7 +91,6 @@ def find_markers_single_sequence(seq, set_of_digested_peptides, dict_of_model_ma
elif
d
<
found_markers
[
code
][
1
]
or
(
d
==
found_markers
[
code
][
1
]
and
d2
<
found_markers
[
code
][
2
]):
found_markers
[
code
]
=
(
pos
,
d
,
d2
,
marker_seq
)
for
code
in
found_markers
:
(
pos
,
d
,
d2
,
marker_seq
)
=
found_markers
[
code
]
l
=
len
(
marker_seq
)
...
...
@@ -114,6 +107,7 @@ def find_markers_single_sequence(seq, set_of_digested_peptides, dict_of_model_ma
dict
[
"
Sequence
"
]
=
new_sequence
dict
[
"
Begin
"
]
=
pos
+
1
dict
[
"
Length
"
]
=
l
print
(
"
Helical start
"
+
str
(
helical_start
)
+
"
/ start
"
+
str
(
pos
)
)
if
helical_start
is
not
None
and
pos
>
helical_start
:
dict
[
"
Hel
"
]
=
pos
-
helical_start
+
2
dict
[
"
End
"
]
=
pos
+
l
...
...
@@ -162,6 +156,8 @@ def check_helix_position(set_of_markers, set_of_new_markers):
for
m
in
set_of_new_markers
:
if
m
.
helical
()
is
None
:
set_of_dubious_markers
.
add
(
m
)
elif
m
.
code
()
not
in
dict_codes
:
continue
elif
m
.
helical
()
==
dict_codes
[
m
.
code
()]:
m
=
markers
.
post_comment
(
m
,
"
Expected position in helical region.
"
)
set_of_correct_sequences
.
add
(
m
.
sequence
())
...
...
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