Notice: The 3DNA Forum is now a read-only archive. See the announcement.
All active support and discussions have moved to GitHub Discussions!

Author Topic: List only base pairs in output  (Read 111533 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: 1746
    • 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: https://x3dna.org
wDSSR: https://web.x3dna-dssr.org
GitHub: https://github.com/x3dna-dssr

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!

 

This forum is archived. Please post new questions on GitHub Discussions!