Sequence display error

29 views
Skip to first unread message

Maz S. Ardejani

unread,
Sep 27, 2017, 5:25:43 PM9/27/17
to NMRViewJ
I load a fasta file (>molecule>read/write topology>sequence file) and then >Assign>Sequence and I get a blank .Seq window with this error:

can't use non-numeric string as operand of "%"
    ("if" test expression)
    invoked from within
"if {($iRes % 5) == 0} {
                $canvas create text $x $y -text $iRes -fill black -anchor s -font "Courier $pars(fontSize)"
                $c..."
    ("foreach" body line 89)
    invoked from within
"foreach "iRes rname"  $residues($entity) {
            incr resIndex
            incr j
            if {$iRes == "."} {
                break
        ..."
    ("foreach" body line 2)
    invoked from within
"foreach entity [mol entities $molName] {
        foreach "iRes rname"  $residues($entity) {
            incr resIndex
            incr j
            i..."
    (procedure "::nv::seq::makeCanvas" line 257)
    invoked from within
"::nv::seq::makeCanvas"
    (procedure "::nv::seq::makeGUI" line 105)
    invoked from within
"::nv::seq::makeGUI .seq"
    ("binding" script)

How can I fix this? Re-istalling NMRViewJ didn't help.

Cheers,

Maz. 

brucej

unread,
Sep 28, 2017, 12:08:56 PM9/28/17
to NMRViewJ
Reading a sequence from a file only works with the format where each residue is specified with three-letter code (for proteins) on single line of the file.  You can have an optional residue number on the line as well:

met 3
ala
gly
phe

If you want to use a single letter code description of the sequence you need to use the Sequence GUI (and check the single letter checkbox).

Hope this helps

Bruce

Maz S. Ardejani

unread,
Sep 28, 2017, 2:31:15 PM9/28/17
to NMRViewJ
Thanks a lot Bruce! I couldn't find this in the documentation. If this explanation is not in the documentation, it would be really helpful to have it there.

brucej

unread,
Sep 29, 2017, 2:52:32 PM9/29/17
to NMRViewJ
There's some discussion in the section on Molecular Topology, but it doesn't explicitly say that you can't read the FASTA format from a file.  Also, the formatting of that documentation is messed up so it's hard to read the file format section.  I'll try to fix that.

Bruce
Reply all
Reply to author
Forward
0 new messages