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

Author Topic: List only base pairs in output  (Read 20442 times)

Offline Llewellyn

  • with-posts
  • *
  • Posts: 2
    • View Profile
List only base pairs in output
« on: July 26, 2018, 12:41:16 pm »
Is there a command to fetch only the base pairs in the output?

bp name
G-C WC
G-C WC
G-C WC
A-U WC
G-C WC
C-A --   
C-C --   
C-G WC
C-G WC
C-G WC
U-A WC
U-A WC
C-G WC
C-G WC
G-C WC
A-U WC       

Offline xiangjun

  • Administrator
  • with-posts
  • *****
  • Posts: 1650
    • View Profile
    • 3DNA homepage
Re: List only base pairs in output
« Reply #1 on: July 26, 2018, 01:32:12 pm »
Try:

x3dna-dssr -i=1ehz.pdb --json | jq -c '.pairs[] | [.bp, .name]'

You would get:

Code: [Select]
["G-C","WC"]
["C-G","WC"]
["G-C","WC"]
["G-U","Wobble"]
["A-U","WC"]
["U-A","WC"]
["U-A","WC"]
["U-A","rHoogsteen"]
["U+A","--"]
["A+A","--"]
["g-C","WC"]
["g+G","--"]
["C-G","WC"]
["U-A","WC"]
["C-G","WC"]
["G+C","rWC"]
["u+U","--"]
["G+P","--"]
["G-C","WC"]
["G-g","--"]
["g-A","Imino"]
["C-G","WC"]
["C-G","WC"]
["A-U","WC"]
["G-c","WC"]
["A-P","--"]
["c-A","--"]
["U-A","--"]
["c-G","WC"]
["U-A","WC"]
["G-C","WC"]
["U-A","WC"]
["G-C","WC"]
["t-a","rHoogsteen"]

The jq utility program can be found on https://stedolan.github.io/jq/.

HTH,

Xiang-Jun

Offline Llewellyn

  • with-posts
  • *
  • Posts: 2
    • View Profile
Re: List only base pairs in output
« Reply #2 on: July 26, 2018, 01:41:41 pm »
Thanks. It worked!

 

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