Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
Optimized Nussinov Algorithm
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
Container 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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mika04
Optimized Nussinov Algorithm
Commits
3dfc55e8
Commit
3dfc55e8
authored
2 months ago
by
Mika Cankosyan
Browse files
Options
Downloads
Patches
Plain Diff
output in sorted order of number of times occured
parent
61028b6b
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
nussinov.py
+2
-2
2 additions, 2 deletions
nussinov.py
with
2 additions
and
2 deletions
nussinov.py
+
2
−
2
View file @
3dfc55e8
'''
notes
maybe output them in order by how many times occured or make some kind of graph
also maybe run loop to give option to try multiple diff things w/ same rna sequence w/o rerunning
also maybe give option for them to choose the scores_to_weights
'''
...
...
@@ -276,7 +275,8 @@ if (probabilistic):
coded_list_strs
=
[
result
[
0
]
for
result
in
results
]
coded_list_strs_and_counts
=
Counter
(
coded_list_strs
)
for
coded_list_str
,
count
in
coded_list_strs_and_counts
.
items
():
sorted_coded_list_strs_and_counts
=
sorted
(
coded_list_strs_and_counts
.
items
(),
key
=
lambda
x
:
x
[
1
],
reverse
=
True
)
for
coded_list_str
,
count
in
sorted_coded_list_strs_and_counts
:
print
(
coded_list_str
)
print
(
results
[
coded_list_strs
.
index
(
coded_list_str
)][
1
])
...
...
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