Netiquette · Download · News · Gallery · Homepage · DSSR · Web-DSSR · DSSR Manual · Reproduce DSSR · DSSR-Jmol · DSSR-PyMOL · Web-SNAP

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

Offline Llewellyn

  • regular
  • *
  • 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
  • regular
  • *****
  • Posts: 1328
    • 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
Dr. Xiang-Jun Lu [律祥俊]
Email: xiangjun@x3dna.org
Homepage: http://x3dna.org/
Forum: http://forum.x3dna.org/

Offline Llewellyn

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

 

Created and maintained by Dr. Xiang-Jun Lu [律祥俊], Principal Investigator of the NIH grant R01GM096889
Dr. Lu is currently affiliated with the Bussemaker Laboratory at the Department of Biological Sciences, Columbia University.