3DNA Forum

Questions and answers => RNA structures (DSSR) => Topic started by: Llewellyn on July 26, 2018, 12:41:16 pm

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

Title: List only base pairs in output
Post by: Llewellyn 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       
Title: Re: List only base pairs in output
Post by: xiangjun 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 (https://stedolan.github.io/jq/) utility program can be found on https://stedolan.github.io/jq/.

HTH,

Xiang-Jun
Title: Re: List only base pairs in output
Post by: Llewellyn on July 26, 2018, 01:41:41 pm
Thanks. It worked!

Created and maintained by Dr. Xiang-Jun Lu [律祥俊] (xiangjun@x3dna.org)
The Bussemaker Laboratory at the Department of Biological Sciences, Columbia University.