Recent Releases of rna-tools

rna-tools - 3.24 Update of PDB icons

🚀 Improved PDB File Previews! 🧬

I just revamped an old function to give your PDB files previews/icons, making it much easier to visually browse and find what you need in a folder full of structures. No more guessing filenames—just glance and go! 👀🔬

sc 2025-02-21 at 18 49 49

- Jupyter Notebook
Published by mmagnus about 1 year ago

rna-tools - 3.23 rna_pdb_tools.py: add conect for rpr file

A new option --rpr --conect to make a RNA-Puzzle Ready formatted structure now with also CONECT (very useful if your structure it's very clashed and you don't want to depend on built-in way to calculate connections with e.g. PyMOL.

 PyMOL>set connect_mode, 1

sc 2025-02-09 at 16 05 39

https://pymolwiki.org/index.php/Connect_mode

Connect mode

Sets how bonds are made when loading a file.

Values:

0 = distance-based (excluding HETATM to HETATM) and CONECT records (default) 1 = CONECT records 2 = distance-based, ignores CONECT records 3 = distance-based (including HETATM to HETATM) and CONECT records 4 = for loading mmCIF: use the chemical components dictionary to look up bonds (in PyMOL 1.7.4, components.cif needs to be present in the current directory, later versions have a subset of the dictionary bundled with PyMOL, and look up unknown residues from a web service)

Syntax

use CONECT and ignore distances

set connect_mode, 1

ignore CONECT records

set connect_mode, 2

show current setting

get connect_mode

- Jupyter Notebook
Published by mmagnus about 1 year ago

rna-tools - 3.22 cif2pdb - convert mmCIF to PDB if a given tool takes only PDBs (smart way)

There are many issues when working with PDB files these days, largely due to the increasing complexity of biological structures. One of the first challenges is the number of chains in a structure, which can be very large.

To accommodate this, double-letter chain identifiers were introduced at some point for the mmCIF format. However, the PDB format can only have one char chain name. foo (plus this auth-ors naming… just to make it even more complicated…, for the code here I use auth values, A5 here)

The second problem is that the number of atoms for one structure is so huge that it doesn't fit the character limit for the PDB format. If I put all the chains (even after renaming to single-code the number of atoms is crashing the format, some parsers might be OK, but you can also see that XYZ is off, etc).

sc 2024-09-25 at 22 32 00

MY SOLUTION

Install rna-tools

$ pip install --upgrade rna-tools

For now, the solution in rna-tools is to parse the CIF file save each RNA chain into a separate file, and set the chain name to a capital letter. `` $ rna_pdb_tools.py --cif2pdb input/4v6x.cif # or a separate toolrna_cif2pdb.py 4v6x.cif`

Warning: some of the chains in this mmCIF file have chain names with more chars than 1, e.g. AB, and the PDB format needs single-letter code, e.g. A. rna chain B2 -> A # of atoms: 38377 4v6xB2nAfCIF.pdb rna chain BC -> B # of atoms: 1604 4v6xBCnBfCIF.pdb rna chain A5 -> C # of atoms: 84946 4v6xA5nCfCIF.pdb rna chain A7 -> D # of atoms: 2578 4v6xA7nDfCIF.pdb rna chain A8 -> E # of atoms: 3334 4v6xA8nE_fCIF.pdb ``` for each RNA chain, a new file is created in the PDB format:

4v6x_B2_nA_fCIF.pdb# auth B2 chain is renamed to (new chain) A and saved into this file. [actually, maybe it would be more convenient if this chain was always simply ‚A’, I can change that easily, so the file would be 4v6xB2fCIF.pdb, and you know that the chain inside is simply A].

There is no single chain in the ribosome to exceed the atom limit, so we should be fine, Ninh let me know if the tools crash at any of the structures.

In PYMOL you can load all the files at once to see them as if there were one file.

sc 2024-09-25 at 22 05 48

- Jupyter Notebook
Published by mmagnus over 1 year ago

rna-tools - Add calculation of RNA GDT

- Jupyter Notebook
Published by mmagnus almost 2 years ago

rna-tools - PyMOL4RNA.py: improve pdb

sc 2023-11-22 at 17 37 49

- Jupyter Notebook
Published by mmagnus over 2 years ago

rna-tools - 3.18 PyMOL4RNA: better Sugar edge

Connect atoms to C1' instead of O2'. x

- Jupyter Notebook
Published by mmagnus over 2 years ago

rna-tools - 3.17 Torsion angle analysis

Examples:

$ rna_torsions.py ./input/4GXY_min.pdb
f, alphaprime, beta
input ./input/4GXY_min.pdb <Residue G het=  resseq=2 icode= >, -64.20924484900823, -143.18546007904766
input ./input/4GXY_min.pdb <Residue C het=  resseq=3 icode= >, 2.3394112025736815, 70.4052871669199

Comparison:

$ rna_x3dna.py input/4GXY_min.pdb -s
input: input/4GXY_min.pdb
   nt id   res  alpha   beta  gamma  delta  epsilon  zeta      e-z           chi     phase-angle sugar-type  ssZp    Dp  splay     paired
0   1  G  A.G2    NaN -143.2  153.7   82.5    -92.3 -31.9  -60(..)  -179.0(anti)  19.5(C3'-endo)  ~C3'-endo  4.39  4.56  18.32  no paired
1   2  C  A.C3 -111.4   70.4  160.0   80.6      NaN   NaN      NaN  -177.6(anti)  11.1(C3'-endo)  ~C3'-endo   NaN   NaN    NaN  no paired

231022-162118-0400_v2_56K_s-1

- Jupyter Notebook
Published by mmagnus over 2 years ago

rna-tools - rna_pdb_tools.py add --save-single-res --ref-frame-only

rna_pdb_tools.py --rpr input/4GXY_min.pdb --save-single-res --ref-frame-only

atoms presets:

--backbone-only used only with --get-rnapuzzle-ready, keep only backbone (= remove bases) --ref-frame-only used only with --get-rnapuzzle-ready, keep only reference frames, OP1 OP2 P --no-backbone used only with --get-rnapuzzle-ready, remove atoms of backbone (define as P OP1 OP2 O5') --bases-only used only with --get-rnapuzzle-ready, keep only atoms of bases

to extract specific atoms for each residue and write them to separate PDB file

sc 2023-10-18 at 17 35 33

- Jupyter Notebook
Published by mmagnus over 2 years ago

rna-tools - 3.15 rna_pdb_tools.py --fetch-fasta 4gxy

``` rnapdbtools.py --fetch-fasta 4gxy.pdb

4GXY_1|Chain A|Adenosylcobalamin riboswitch|null GGCGGCAGGUGCUCCCGACCCUGCGGUCGGGAGUUAAAAGGGAAGCCGGUGCAAGU[...]

or

rnapdbtools.py --fetch-fasta 4gxy

4GXY_1|Chain A|Adenosylcobalamin riboswitch|null GGCGGCAGGUGCUCCCGACCCUGCGGUCGGGAGUUAAAAGGGAAGCCGGUGCAAGU[...] ``` 384540661_874032624280161_6703094826681556784_n

- Jupyter Notebook
Published by mmagnus over 2 years ago

rna-tools - 3.14.x build RNAStructure from lines/scratch

Build an RNAStructure object from parsing a text input.

```python rna = RNAStructure()

l = rna.getemptyline()

l = rna.setrescode(l, ) l = rna.setatomcode(l, ) l = rna.setresindex(l, ) l = rna.setatomcoords(l, )

rna.add_line(l)

rna.write(args.output) ```

sc_2023-10-10_at_20_19_24

  • still not the most pretty, but works...

- Jupyter Notebook
Published by mmagnus over 2 years ago

rna-tools - 3.13.x Refactor --get-rnapuzzle-ready into rna_standardize.py

``` $ rnastandardize.py rnatools/input/comparison/* Output: rnatools/input/comparison/4GXYmin_std.pdb

A:2-3 GC Output: rnatools/input/comparison/4GXYminreconstructionstd.pdb A:1-2 GC ```

- Jupyter Notebook
Published by mmagnus over 2 years ago

rna-tools - 3.12.x Rename rna_pdb_toolsx.py to rna_pdb_tools.py!

This will break some compatibility, but I think this was needed. This "x" was there to avoid previous problems with importing files when the package name was rnapdbtools. Since the package was renamed to rna-tools (and the main folder to rna_tools), this "x" should have been removed years ago ;-)

- Jupyter Notebook
Published by mmagnus over 3 years ago

rna-tools - 3.11.x Fix missing docs compilation

Replace sphinx-argparse with sphinxcontrib-autoprogram: docs: passing

sc 2022-08-26 at 12 40 35

- Jupyter Notebook
Published by mmagnus over 3 years ago

rna-tools - 3.10.x Benasque 2022 edition ;-)

IMG_6226 jpeg

Some new tests in Colab: https://colab.research.google.com/drive/1rcPz7ZLWpn-hbfJo8hpz6ZuMGiGGmKeW?usp=sharing

Trx: is back to make a nice interface to play around

opt: rasp in x86

- Jupyter Notebook
Published by mmagnus over 3 years ago

rna-tools - 3.8.13

rnacalcinf: refactor, fix multiprocessing + tqdm (replace progressbar2) gUUuDxZqrH

- Jupyter Notebook
Published by mmagnus over 3 years ago

rna-tools - 3.8.12 Fix pip

Fix pip, include files that should be included Fix #130 #126

- Jupyter Notebook
Published by mmagnus over 3 years ago

rna-tools - 3.8.11 Remove triplexiblity (for now) + bonus

triplexiblity: remove, for now, it's messing up the repo (https://github.com/mmagnus/rna-tools/commit/61c738bf0f65c3da83166000257bbb04231f7c32) bonus, 10y old plugin for RASP in PYMOL ;-) [coloring according to RASP predicted quality of RNA] sc 2022-07-21 at 13 56 43

- Jupyter Notebook
Published by mmagnus over 3 years ago

rna-tools - 3.8.10

Lots of changes for (revision) of https://rna-tools.online in NAR

01c plus stdout changes: - rnacalcrmsd.py: remove # from prints - rnax3dna.py: comment out p.getsecstruc()

df (dataframe)

  • refactor and and add rnadfmerge.csv
  • misc/rnamergetwo_dfs.py: remove id (if exists)

mq (mqapRNA)

  • ClashScore: small update
  • FARFAR2/FARFAR2.py: refactor
  • Dfire/Dfire.py: up doc

trx (triplexibility)

refactor, small changes - trx-mutget-t1-1.py - add x4 mode for MD/min of t1-1 - add trxdb for scoring - trx.py & trxscore.py - triplexibility/db/gendb.py - trxscore_growth.py: add

shell_rc.sh

Init a script to share some shell hacks among my machines.

rnapdbtoolsx.py

  • some fix on extr
  • add --here fun to --rpr
  • mutate also works with lower case chain names, a,b,c
  • config for PYMOL, fix it at aws
  • prototype --here option, for quick actions

rna_rosetta/ refactor

  • rnarosettan.py: add -0 (for missing file show 0), used in scripts
  • rnarosettaget_score.py: collect and sort score
  • rnarosettasilent_split.py: add
  • rnarosettasilent_random.py: add
  • rnarosettasilentfilesortandselect.py: fix naming, rna_rosetta* / THIS IS NO MY CODE, I FIXED SO IT WORKS ON MY MAC @MMAGNUS +IT'S A PART OF ROSETTA RNA-TOOL
  • rnarosettaextract.py: add lazy shortcut

rna_clarna2graph.py

add and improve

- Jupyter Notebook
Published by mmagnus over 3 years ago

rna-tools -

Minior updates on triplexibility, PyMOL4Spliceosome.py, PyMOL4RNA.py, pymolpreviewgenerator.py

- Jupyter Notebook
Published by mmagnus almost 4 years ago

rna-tools - 3.8.5

  • e142af9 2022-02-21 pymolpreviewgenerator.py: diff modes for pdb and pse, for pdb check size
  • 593abbe 2022-02-11 PyMOL4RNA.py: fix edge with orient
  • aa998b7 2022-02-08 fix trx_score.py

Full Changelog: https://github.com/mmagnus/rna-tools/compare/3.8.4...3.8.5

- Jupyter Notebook
Published by mmagnus about 4 years ago

rna-tools - 3.8.4

Fix readme at pypi

- Jupyter Notebook
Published by mmagnus about 4 years ago

rna-tools - 3.8.3

Fix (upload) to pypi

- Jupyter Notebook
Published by mmagnus about 4 years ago

rna-tools - 3.8.2

Triplexiblity fixed (?) full atom works.

Full Changelog: https://github.com/mmagnus/rna-tools/compare/3.8.1...3.8.2

- Jupyter Notebook
Published by mmagnus about 4 years ago

rna-tools - 3.8.1

Fix (?)* triplexibility

  • ok, not fixed by then

Full Changelog: https://github.com/mmagnus/rna-tools/compare/3.8...3.8.1

- Jupyter Notebook
Published by mmagnus about 4 years ago

rna-tools - 3.8 rna-tools.online

Add a new interface to the rna-tools http://rna-tools.online to help in your modeling workflow. #124 Screenshot 2022-01-20 at 15 39 30

Lots of small fixes for that. Other areas of development: md / mq / web.

Full Changelog: https://github.com/mmagnus/rna-tools/compare/3.7.22...3.8

- Jupyter Notebook
Published by mmagnus about 4 years ago

rna-tools - 3.7.22

rnatoolslib: super fast --un-nmr! (not based on BioPython but on text processing) perfect for molecular dynamics ;-) quick and dirty analyses

    rna_pdb_toolsx.py --un-nmr AF-Q5TCX8-F1-model_v1_core_Ctrim_mdr_MD.pdb
    cat *MD_* > md.pdb

for benchmarks of MD

2lkrshortmdr.pdb.zip

- Jupyter Notebook
Published by mmagnus about 4 years ago

rna-tools -

sc 2021-11-20 at 19 37 00

  • mq/rnamqcollect.py: --list-of-files for one script for all!
  • mq/rnamqwxcollect.py: massive mqcollect.py

- Jupyter Notebook
Published by mmagnus over 4 years ago

rna-tools - 3.7.20

  • mq (mqapRNA):

    • farfar2 up tests
    • rnamqcollect.py: if in ignored files error, run again
    • FARNA: fix headers, add -min for lores, add constant_seed, add system
    • FARNA: fix tests, on mac keep two rosettas!
  • md (molecule dynamics)

    • rename for rna_md.py

- Jupyter Notebook
Published by mmagnus over 4 years ago

rna-tools - 3.7.19

  • df: utils, merge sets of dfs widewise
  • rnacalcrmsd.py: add --name-rmsd-column
  • plotting/rnaplotboxplotlike.py: add

- Jupyter Notebook
Published by mmagnus over 4 years ago

rna-tools -

  • Update setup.py fix missing rnatools/tools/md/rnaminimize.py

- Jupyter Notebook
Published by mmagnus over 4 years ago

rna-tools - 3.7.17

  • rnacalcrmsd.py: --way fix backbone etc.

- Jupyter Notebook
Published by mmagnus over 4 years ago

rna-tools - 3.7.16

  • mqapRNA (mq):
    • add SimRNA
    • eSCORE fix, change baRNAbaPATH to baRNAbadata_PATH
    • FARFAR2: own config FARFAR2PATH, FARFAR2DBPATH, FARFAR2LORES #118
    • add farfar2 wrapper #118
    • change: rnamqcollect.py & rnamqpredict.py
  • rnacalcrmsd.py: --way, backbone+sugar, c1p, backbone, no_backbone, bases, all

  • molecular dynamics (md)

    • add --mdr #117
  • wx (pipeline)

    • change pefx.py

- Jupyter Notebook
Published by mmagnus over 4 years ago

rna-tools - 3.7.15

  • triplexibilty:
    • re-born splix :-)
    • --folder-prefix
  • rnacalchbonds: add a sandbox with tests for this
  • rnacalcrmsd_biopython.py: add --sort
  • pymolpreviewgenerator.py: add show lines/sticks for files with # of lines slower than

Full Changelog: https://github.com/mmagnus/rna-tools/compare/3.7.14...3.7.15

- Jupyter Notebook
Published by mmagnus over 4 years ago

rna-tools - 3.7.7 Fix: Missing rna_clashscore.py #115

Missing rna_clashscore.py #115

BTW, this fixed the documentation building:

copying and adjusting rna_tools/tools/mq/rna_mq_plot.py -> build/scripts-2.7 copying and adjusting rna_tools/tools/mq/RNA3DCNN/rna_mq_rna3dcnn.py -> build/scripts-2.7 copying and adjusting rna_tools/tools/mq/Dfire/rna_mq_dfire.py -> build/scripts-2.7 error: file '/home/docs/checkouts/readthedocs.org/user_builds/rna-tools/checkouts/latest/rna_tools/tools/mq/ClashScore/rna_clashscore.py' does not exist

https://readthedocs.org/projects/rna-tools/builds/14530429/

- Jupyter Notebook
Published by mmagnus over 4 years ago

rna-tools - 3.7.4

  • Add PyMOL4RNA.py: seq * and seqsel (redundant function)

sc 2021-07-27 at 15 42 05

- Jupyter Notebook
Published by mmagnus over 4 years ago