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

Author Topic: Option not to display calculation status to screen.  (Read 17697 times)

Offline mauricio esguerra

  • with-posts
  • *
  • Posts: 48
    • View Profile
    • http://mesguerra.org
Option not to display calculation status to screen.
« on: September 02, 2009, 12:33:37 pm »
Hi Xiang-Jun,

I am running a script for rebuilding a large amount of random dsRNA conformations and then I run find_pair and analyze on the resulting pdb output.
Since I am generating a lot of data I would like to suppress the output to screen because I am sending this to a cluster which generates a bulky error log with the data that find_pair and analyze send to screen.
What I mean more precisely is that if I run find_pair, say:

Code: [Select]
bash# find_pair rna1.pdb stdout | analyze
I get some 3DNA information (output to screen) telling me how the calculation is doing, that is, something like:

Code: [Select]
...... /home/esguerra/NFSsoft/X3DNA2/config/ ......
 ...... reading file: misc_3dna.par ......

 ...... /home/esguerra/NFSsoft/X3DNA2/config/ ......
 ...... reading file: baselist.dat ......

 ...... /home/esguerra/NFSsoft/X3DNA2/config/ ......

Time used: 00:00:00:01

 ...... /home/esguerra/NFSsoft/X3DNA2/config/ ......
 ...... reading file: misc_3dna.par ......

 ...... /home/esguerra/NFSsoft/X3DNA2/config/ ......
 ...... reading file: baselist.dat ......

 ...... /home/esguerra/NFSsoft/X3DNA2/config/ ......
 ...... reading file: baselist.dat ......

 ...... /home/esguerra/NFSsoft/X3DNA2/config/ ......

 ...... /home/esguerra/NFSsoft/X3DNA2/config/ ......
 ...... reading file: misc_3dna.par ......

 ...... /home/esguerra/NFSsoft/X3DNA2/config/ ......
 ...... reading file: misc_3dna.par ......

 ...... /home/esguerra/NFSsoft/X3DNA2/config/ ......
 ...... reading file: misc_3dna.par ......

 ...... /home/esguerra/NFSsoft/X3DNA2/config/ ......
 ...... reading file: misc_3dna.par ......

 ...... /home/esguerra/NFSsoft/X3DNA2/config/ ......
 ...... reading file: raster3d.par ......

Time used: 00:00:00:02

Since I have already checked to see that my output files are right, I don't need this output. I am wondering if there is an internal command to suppress such output.

Thank you,

Mauricio

Offline xiangjun

  • Administrator
  • with-posts
  • *****
  • Posts: 1650
    • View Profile
    • 3DNA homepage
Re: Option not to display calculation status to screen.
« Reply #1 on: September 02, 2009, 11:28:37 pm »
Hi Mauricio,

Thanks for formulating your question so clearly, especially for providing an example. Browsing the forum, one would find how many times I have asked for clarifications so I can understand what a question is about, exactly.

Okay, now back to your question.

Ideally, I could have provided a -q option (for quiet, or something similar) so the output message can be suppressed. As current is with 3DNA, however, the diagnostic information is directed to stderr. This should not be a problem in real life, with the help of Unix/Linux file redirection.

Again, an example would make the point clear. So let's use 'bdl084.pdb', you need to do the following:
Code: [Select]
find_pair bdl084.pdb bp_info 2> msg1
analyze bp_info 2> msg2

# or by combining them as this
find_pair bdl084.pdb stdout 2> msg1 | analyze 2> msg2
Note I am using bash shell. For other shells, you may need to use something different. Of course, you could also play with some variants along the line.

HTH,

Xiang-Jun

Offline mauricio esguerra

  • with-posts
  • *
  • Posts: 48
    • View Profile
    • http://mesguerra.org
Re: Option not to display calculation status to screen.
« Reply #2 on: September 03, 2009, 03:52:19 pm »
Wow!
Thank you very much. That's great.
I should have checked in my Linux/Unix book about redirectioning first.

Thanks again,

Mauricio

 

Funded by X3DNA-DSSR, an NIGMS National Resource for Structural Bioinformatics of Nucleic Acids (R24GM153869)

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