-
-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Seq: add ENTRNA - a framework to predict RNA foldability
- Loading branch information
Showing
2 changed files
with
263 additions
and
2 deletions.
There are no files selected for viewing
198 changes: 198 additions & 0 deletions
198
notes/ENTRNA - a framework to predict RNA foldability.ipynb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,198 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"# ENTRNA - a framework to predict RNA foldability" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"Su, C., Weir, J. D., Zhang, F., Yan, H., & Wu, T. (2019). \n", | ||
"**ENTRNA: a framework to predict RNA foldability.** \n", | ||
"BMC Bioinformatics, 20(1), 1–11. http://doi.org/10.1186/s12859-019-2948-5" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 1, | ||
"metadata": { | ||
"collapsed": false | ||
}, | ||
"outputs": [], | ||
"source": [ | ||
"from rna_tools.Seq import RNASequence" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 2, | ||
"metadata": { | ||
"collapsed": false | ||
}, | ||
"outputs": [ | ||
{ | ||
"name": "stdout", | ||
"output_type": "stream", | ||
"text": [ | ||
"free energy: -27.200000\n", | ||
"foldability: 0.828365\n" | ||
] | ||
} | ||
], | ||
"source": [ | ||
"seq = 'acucggcuaggcgaguauaaauagccgucaggccuagcgcguccaagccuagccccuucuggggcugggcgaagggucggg'\n", | ||
"ss = '((((........)))).......((((..............(((((((((((((((....)))))))))))))))..))))'\n", | ||
"\n", | ||
"seq = RNASequence(seq)\n", | ||
"seq.ss = ss\n", | ||
"fe = seq.eval()\n", | ||
"print('free energy: %f' % fe)\n", | ||
"fa = seq.get_foldability()\n", | ||
"print('foldability: %f' % fa)" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 3, | ||
"metadata": { | ||
"collapsed": false | ||
}, | ||
"outputs": [ | ||
{ | ||
"name": "stdout", | ||
"output_type": "stream", | ||
"text": [ | ||
"free energy: -11.800000\n", | ||
"[17, 16, 15, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 0, 81, 80, 79, 78, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 75, 74, 73, 72, 71, 70, 69, 68, 67, 66, 65, 64, 63, 62, 61, 0, 0, 0, 0, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 0, 0, 28, 27, 26, 25]\n", | ||
"cd /Users/magnus/work/evoClustRNA/rna-foldability/ENTRNA/ && python -W ignore ENTRNA_predict.py --seq_file /var/folders/yc/ssr9692s5fzf7k165grnhpk80000gp/T/tmpIARsa2 --str_file /var/folders/yc/ssr9692s5fzf7k165grnhpk80000gp/T/tmpfGmLP4\n", | ||
"\n", | ||
"\n", | ||
"\n", | ||
"\n", | ||
"===============================================================\n", | ||
"\n", | ||
"\n", | ||
"RNA sequence:\n", | ||
"acucggcuaggcgaguauaaauagccgucaggccuagcgcguccaagccuagccccuucuggggcugggcgaagggucggg\n", | ||
"RNA secondary structure:\n", | ||
"[17, 16, 15, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 0, 81, 80, 79, 78, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 75, 74, 73, 72, 71, 70, 69, 68, 67, 66, 65, 64, 63, 62, 61, 0, 0, 0, 0, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 0, 0, 28, 27, 26, 25]\n", | ||
"This is pseudoknot-free RNA\n", | ||
"Foldability: 0.8283652197473068\n", | ||
"\n", | ||
"\n", | ||
"===============================================================\n", | ||
"\n", | ||
"\n", | ||
"\n", | ||
"foldability: 0.828365\n" | ||
] | ||
} | ||
], | ||
"source": [ | ||
"seq = 'acucggcuaggcgaguauaaauagccgucaggccuagcgcguccaagccuagccccuucuggggcugggcgaagggucggg'\n", | ||
"ss = '((((..[[[[[..)))).......((((....]]]]]....(((((((((((((((....)))))))))))))))..))))'\n", | ||
"\n", | ||
"seq = RNASequence(seq)\n", | ||
"seq.ss = ss\n", | ||
"fe = seq.eval()\n", | ||
"print('free energy: %f' % fe)\n", | ||
"fa = seq.get_foldability(verbose=True)\n", | ||
"print('foldability: %f' % fa)" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 4, | ||
"metadata": { | ||
"collapsed": false | ||
}, | ||
"outputs": [ | ||
{ | ||
"name": "stdout", | ||
"output_type": "stream", | ||
"text": [ | ||
"free energy: -13.500000\n", | ||
"foldability: 0.055185\n" | ||
] | ||
} | ||
], | ||
"source": [ | ||
"seq = RNASequence(\"GGCAGGGGCGCUUCGGCCCCCUAUGCC\")\n", | ||
"seq.ss = \"((((((((.((....)).)))).))))\"\n", | ||
"\n", | ||
"fe = seq.eval()\n", | ||
"print('free energy: %f' % fe)\n", | ||
"fa = seq.get_foldability()\n", | ||
"print('foldability: %f' % fa)" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 7, | ||
"metadata": { | ||
"collapsed": false | ||
}, | ||
"outputs": [ | ||
{ | ||
"name": "stdout", | ||
"output_type": "stream", | ||
"text": [ | ||
"free energy: 100000.500000\n" | ||
] | ||
} | ||
], | ||
"source": [ | ||
"seq = RNASequence(\"GGCAGGGGCGCUUCGGCCCCCUAUGCC\")\n", | ||
"ss = \"..............()...........\"\n", | ||
"fe = seq.eval(ss=ss)\n", | ||
"print('free energy: %f' % fe)" | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"hide_input": false, | ||
"kernelspec": { | ||
"display_name": "Python 2", | ||
"language": "python", | ||
"name": "python2" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 2 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython2", | ||
"version": "2.7.15" | ||
}, | ||
"toc": { | ||
"colors": { | ||
"hover_highlight": "#DAA520", | ||
"running_highlight": "#FF0000", | ||
"selected_highlight": "#FFD700" | ||
}, | ||
"moveMenuLeft": true, | ||
"nav_menu": { | ||
"height": "30px", | ||
"width": "252px" | ||
}, | ||
"navigate_menu": true, | ||
"number_sections": true, | ||
"sideBar": true, | ||
"threshold": 4, | ||
"toc_cell": false, | ||
"toc_section_display": "block", | ||
"toc_window_display": false, | ||
"widenNotebook": false | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 2 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters