Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
MIT_MAHE
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
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
2022 Competition
Software Tools
MIT_MAHE
Commits
50d41dd6
Commit
50d41dd6
authored
2 years ago
by
Ashrith Sagar Yedlapalli
Browse files
Options
Downloads
Patches
Plain Diff
c0.15.27
parent
269606df
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pep_mod.py
+14
-20
14 additions, 20 deletions
pep_mod.py
with
14 additions
and
20 deletions
pep_mod.py
+
14
−
20
View file @
50d41dd6
...
...
@@ -44,29 +44,23 @@ class BAlaS:
return
df_ddg
def
replot_filter
(
self
,
threshold
):
def
replot_filter
(
self
,
mutation_lock
=
[]
):
"""
Filter out based on ddG thresholds
"""
df
=
self
.
df_ddg
# ddg_pos = df[df['ddGs'] > 0]
# print("Positive DDG values:\n", ddg_pos.sort_values('ddGs', ascending=False))
df_remove_lock
=
df
# .filter(like=)
# print(df_remove_lock)
print
(
"
=
"
*
50
)
self
.
df_filtered
=
df_remove_lock
print
(
"
Filtered ddG thresholds:
\n
"
,
df_remove_lock
.
sort_values
(
'
ddGs
'
,
ascending
=
True
))
return
df_remove_lock
# ddg_neg = df[df['ddGs'] < 0]
# print("Negative DDG values:\n", ddg_neg.sort_values('ddGs', ascending=True))
# print("Ascending DDG values:\n", df.sort_values('ddGs', ascending=True))
ddg_threshold
=
df
[
df
[
'
ddGs
'
]
<
threshold
]
print
(
"
DDG values for less than threshold
"
,
threshold
,
"
kCal/mol:
\n
"
,
ddg_threshold
.
sort_values
(
'
ddGs
'
,
ascending
=
True
))
self
.
ddg_threshold
=
ddg_threshold
return
ddg_threshold
def
replot_get_positions
(
self
,
count
=
5
,
mutation_lock
=
[]):
def
replot_get_positions
(
self
,
count
=
5
):
"""
Get positions from filtered ddG thresholds
"""
d
dg_threshold
_sorted
=
self
.
d
dg_threshol
d
.
sort_values
(
'
ddGs
'
,
ascending
=
Tru
e
)
df_ResNumber
=
d
dg_threshold
_sorted
[[
'
ResNumber
'
]]
d
f_remove_lock
_sorted
=
self
.
d
f_filtere
d
.
sort_values
(
'
ddGs
'
,
ascending
=
Fals
e
)
df_ResNumber
=
d
f_remove_lock
_sorted
[[
'
ResNumber
'
]]
df_ResNumber_clipped
=
df_ResNumber
.
head
(
count
)
positions
=
[]
...
...
@@ -407,8 +401,8 @@ def main():
if
args
.
alaninescan
:
bude
=
BAlaS
()
df_ddg
=
bude
.
replot_read
(
args
.
alaninescan
)
ddg_preferences
=
bude
.
replot_filter
(
1
)
# Threshold in kCal/mol
positions
=
bude
.
replot_get_positions
(
args
.
mutation_count
,
mutations_obj
.
mutation_lock
)
ddg_preferences
=
bude
.
replot_filter
(
mutations_obj
.
mutation_lock
)
positions
=
bude
.
replot_get_positions
(
args
.
mutation_count
)
muts
=
to_mut_obj
(
sequence
,
positions
)
mutations_obj
=
mutater
(
sequence
=
sequence
,
mutations
=
muts
,
mutation_lock
=
[])
...
...
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