Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
caretta
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
Container registry
Model registry
Operate
Environments
Monitor
Incidents
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
Durairaj, Janani
caretta
Commits
8738305b
Commit
8738305b
authored
5 years ago
by
Akdel
Browse files
Options
Downloads
Patches
Plain Diff
Added app.py and caretta/pfam.py
parent
88786f37
Branches
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
bin/carettapp-demo
+16
-17
16 additions, 17 deletions
bin/carettapp-demo
with
16 additions
and
17 deletions
bin/carettapp-demo
+
16
−
17
View file @
8738305b
...
...
@@ -319,23 +319,22 @@ def download_alignment(clicked, data, pfam_data):
return
""
# @app.callback(dash.dependencies.Output('structure-selection', 'options'),
# [dash.dependencies.Input('load-button', 'n_clicks')],
# [dash.dependencies.State("pfam-class", "children"),
# dash.dependencies.State("pfam-ids", "value"),
# dash.dependencies.State("custom-folder", "value")])
# def show_selected_atoms(clicked, pfam_class, pfam_id, custom_folder):
# if clicked and pfam_class and pfam_id:
# pfam_class = decompress_object(pfam_class)
# pfam_structures = pfam_class.get_entries_for_pfam(pfam_id)
# print(pfam_structures)
# return [{"label": x.PDB_ID, "value": compress_object(x)} for x in pfam_structures]
# elif clicked and pfam_class and custom_folder:
# pdb_files = get_pdbs_from_folder(custom_folder)
# print(pdb_files)
# return [{"label": x.PDB_ID.split("/")[-1], "value": compress_object(x)} for x in pdb_files]
# else:
# return [{"label": "no selection", "value": "None"}]
@app.callback
(
dash
.
dependencies
.
Output
(
'
structure-selection
'
,
'
options
'
),
[
dash
.
dependencies
.
Input
(
'
load-button
'
,
'
n_clicks
'
)],
[
dash
.
dependencies
.
State
(
"
pfam-class
"
,
"
children
"
),
dash
.
dependencies
.
State
(
"
pfam-ids
"
,
"
value
"
)])
def
show_selected_atoms
(
clicked
,
pfam_class
,
pfam_id
):
if
clicked
and
pfam_class
and
pfam_id
:
pfam_class
=
decompress_object
(
pfam_class
)
pfam_structures
=
pfam_class
.
get_entries_for_pfam
(
pfam_id
)
print
(
pfam_structures
)
return
[{
"
label
"
:
x
.
PDB_ID
,
"
value
"
:
compress_object
(
x
)}
for
x
in
pfam_structures
]
# elif clicked and pfam_class and custom_folder:
# pdb_files = get_pdbs_from_folder(custom_folder)
# print(pdb_files)
# return [{"label": x.PDB_ID.split("/")[-1], "value": compress_object(x)} for x in pdb_files]
else
:
return
[{
"
label
"
:
"
no selection
"
,
"
value
"
:
"
None
"
}]
@app.callback
([
dash
.
dependencies
.
Output
(
"
alignment
"
,
"
children
"
),
...
...
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