Netiquette · Download · News · Gallery · Homepage · DSSR Manual · G-quadruplexes · DSSR-Jmol · DSSR-PyMOL · DSSR Licensing · Video Overview· RNA Covers

Author Topic: 3dna.pl - A Perl Script for Parsing 3DNA Output  (Read 35378 times)

Offline slaw

  • with-posts
  • *
  • Posts: 19
    • View Profile
3dna.pl - A Perl Script for Parsing 3DNA Output
« on: February 03, 2011, 05:34:03 pm »
Hi All,

Please see the attached Perl script that can be used in conjunction with 3DNA (assuming that it is already installed).

# 3dna.pl -h

Usage:   3dna.pl [-options] <PDBfile>
Options: [-show all|none|out|inp|key1:keyn]
         [-inp name]
         [-setinp name]
         [-type]
         [-ref name [offset]]
         [-madbend]
         [-axis]
         [-groove minor|major|all]
         [-par shear|stretch|stagger|buckle|propel|open|all]
         [-step shift|slide|rise|tilt|roll|twist|all]
         [-helix x|y|hrise|incl|tip|htwist|all]
         [-pucker ampl|phase|both|pucker|all]
         [-torsion alpha|beta|gamma|delta|epsilon|zeta|chi|all]

To use this script, simply provide a valid PDB file.  For example:

$ 3dna.pl -groove major 1bna.pdb

major --- --- --- 17.3 17.3 16.3 17.4 18.4 --- --- ---

The hyphens correspond to parts of the structure where measurements could not be performed.  The order of the output is according to the base pairs from 3DNA and can be extracted by using the "-ref name" option.  Using "-ref" will produce a reference file that tells you what the base pair order is:

$ 3dna.pl -groove major -ref ref.out 1bna.pdb

Looking at the reference file we see:

major(1) BP1:1-24(2) BP2:2-23(3) BP3:3-22(4) BP4:4-21(5) BP5:5-20(6) BP6:6-19(7) BP7:7-18(8) BP8:8-17(9) BP9:9-16(10) BP10:10-15(11) BP11:11-14(12)

The brackets corresponds to the column from the major groove output.  Thus, the first column tells you that the original output is for the major groove, the second column is base pair 1 (BP1) which is formed between base 1 and base 4, the third column is base pair 2 (BP2) which is formed between base 2 and base 23, and so on.  

$ 3dna.pl -groove all -ref ref.out 1bna.pdb

This gives you both the major and minor grooves:

minor major --- --- --- --- --- --- 12.0 17.3 10.5 17.3 9.9 16.3 9.3 17.4 9.9 18.4 --- --- --- --- --- ---

However, now both grooves are listed with the reference file looking like:

minor(1) major(2) BP1:1-24(3) BP1:1-24(4) BP2:2-23(5) BP2:2-23(6) BP3:3-22(7) BP3:3-22(8) BP4:4-21(9) BP4:4-21(10) BP5:5-20(11) BP5:5-20(12) BP6:6-19(13) BP6:6-19(14) BP7:7-18(15) BP7:7-18(16) BP8:8-17(17) BP8:8-17(18) BP9:9-16(19) BP9:9-16(20) BP10:10-15(21) BP10:10-15(22) BP11:11-14(23) BP11:11-14(24)

The other measurements are done the same way and multiple measurements can be combined and parsed at the same time:

$ 3dna.pl -groove major -torsion alpha 1bna.pdb

major --- --- --- 17.3 17.3 16.3 17.4 18.4 --- --- --- alpha --- -65.6 -62.6 -62.9 -43.0 -73.3 -56.6 -59.2 -58.5 -67.3 -73.9 -81.5 -65.0 -72.2 -66.8 -59.1 -58.6 -58.3 -57.1 -56.6 -69.2 -63.0 -51.3 ---

Here the major grooves are displayed first followed by the alpha values in order.

More documentation can be found in the header section as comments in the script itself.  Please feel free to e-mail me at slaw@msu.edu if you have any questions, comments, or concerns.

Sean

Offline slaw

  • with-posts
  • *
  • Posts: 19
    • View Profile
Re: 3dna.pl - A Perl Script for Parsing 3DNA Output
« Reply #1 on: February 03, 2011, 05:36:49 pm »
In order to use this with the MMTSB Tool Set and to process a CHARMM/NAMD trajectory file, use "processDCD.pl"

processDCD.pl -apply "3dna.pl -groove major" template.pdb trajectory.dcd

This will apply the command "3dna.pl -groove major" to each simulation frame of trajectory.dcd.  It is important that the template.pdb matches the trajectory.dcd!

Offline xiangjun

  • Administrator
  • with-posts
  • *****
  • Posts: 1652
    • View Profile
    • 3DNA homepage
Re: 3dna.pl - A Perl Script for Parsing 3DNA Output
« Reply #2 on: February 03, 2011, 11:47:12 pm »
Hi Sean,

Thanks for contributing your Perl script for parsing 3DNA output! I've downloaded and played around with it a bit, and found it well-formatted and documented. I am impressed that your script parses 3DNA output in such a flexible way, and integrates nicely with the MMTSB Tool Set for handling MD simulation trajectories. Well-done!

I am sure the 3DNA user community will benefit from your effort; I am hopefully more would follow your lead to share their scripts or experiences.

Xiang-Jun

Offline slaw

  • with-posts
  • *
  • Posts: 19
    • View Profile
Re: 3dna.pl - A Perl Script for Parsing 3DNA Output
« Reply #3 on: February 04, 2011, 09:29:05 pm »
Xiang-jun,

Thank you for your kind words.  A little side note, the MMTSB Tool Set is developed (in collaboration with other labs) by members of my lab (Feig Lab @ Michigan State University) and hence, I am an active user of this useful toolset.  The 3dna.pl script was written by me to (hopefully) accurately decipher the verbose 3DNA output.  I make a special effort to document most/all of my code because it is helpful and also because I am forgetful.  I too hope that this script will aid others in their applications using 3DNA.

Sean

Offline slaw

  • with-posts
  • *
  • Posts: 19
    • View Profile
Re: 3dna.pl - A Perl Script for Parsing 3DNA Output
« Reply #4 on: February 10, 2011, 06:27:05 pm »
As requested, an example of the DCD file (note that it is in binary format!) is attached along with a PDB template.

The data was generated by running 1,000 steps of MD using implicit solvent.

Using the MMTSB Toolset:

processDCD.pl -apply "3dna.pl -groove major" template.pdb dna.dcd > output

The typical 3DNA output will print to the screen while the major groove information will be written to the output file and should look like:

1 0.0750 major --- --- --- 17.2 17.4 16.4 17.4 18.7 --- --- ---
2 0.1500 major --- --- --- 17.1 17.3 16.4 17.4 18.9 --- --- ---
3 0.2250 major --- --- --- 17.2 17.6 16.2 17.4 19.1 --- --- ---
4 0.3000 major --- --- --- 17.4 17.5 15.9 17.3 19.1 --- --- ---
5 0.3750 major --- --- --- 17.8 17.7 15.6 17.1 19.0 --- --- ---
6 0.4500 major --- --- --- 18.0 18.0 15.4 17.2 19.0 --- --- ---
7 0.5250 major --- --- --- 18.1 18.1 15.3 17.2 19.1 --- --- ---
8 0.6000 major --- --- --- 18.0 18.3 15.4 17.3 19.2 --- --- ---
9 0.6750 major --- --- --- 18.1 18.8 15.4 17.4 19.3 --- --- ---
10 0.7500 major --- --- --- 18.2 19.0 15.3 17.5 19.4 --- --- ---
11 0.8250 major --- --- --- 18.2 19.3 15.4 17.4 19.4 --- --- ---
12 0.9000 major --- --- --- 18.1 19.1 15.6 17.3 19.3 --- --- ---
13 0.9750 major --- --- --- 18.2 19.0 15.5 17.2 19.3 --- --- ---
14 1.0500 major --- --- --- 18.3 18.6 15.2 17.4 19.1 --- --- ---
15 1.1250 major --- --- --- 18.4 18.4 15.1 17.6 19.1 --- --- ---
16 1.2000 major --- --- --- 18.5 18.2 15.3 17.6 19.2 --- --- ---
17 1.2750 major --- --- --- 18.6 18.2 15.3 17.7 19.3 --- --- ---
18 1.3500 major --- --- --- 18.8 18.0 15.1 17.8 19.5 --- --- ---
19 1.4250 major --- --- --- 18.7 18.1 15.1 17.8 19.8 --- --- ---
20 1.5000 major --- --- --- 18.7 18.0 15.1 17.8 19.7 --- --- ---


The first column is just the row number, the second column is the simulation time and the remaining columns is output as per 3dna.pl (see above).

Hope this helps.

Seam

Offline xiangjun

  • Administrator
  • with-posts
  • *****
  • Posts: 1652
    • View Profile
    • 3DNA homepage
Re: 3dna.pl - A Perl Script for Parsing 3DNA Output
« Reply #5 on: February 10, 2011, 10:29:25 pm »
Quote from: "Sean"
As requested, an example of the DCD file (note that it is in binary format!) is attached along with a PDB template.

The data was generated by running 1,000 steps of MD using implicit solvent.
Thank you so much for sharing a sample CHARMM DCD file, and providing an example to illustrate how to use it. Honestly, I am surprised that you did not forget my "request" –– if only more 3DNA users could be as generous and responsive! Active participations from enthusiastic users like you and Alpay certainly help make a difference.

Xiang-Jun

 

Funded by the NIH R24GM153869 grant on X3DNA-DSSR, an NIGMS National Resource for Structural Bioinformatics of Nucleic Acids

Created and maintained by Dr. Xiang-Jun Lu, Department of Biological Sciences, Columbia University