Hi Brian,
Well first of all it's not necessary to read in the same sequence twice
(with different numbering) - just click 'YES' when it asks you to create
another chain... you can link it up to the correct sequence codes (and
renumber the chain) when running linkResonances.
This is actually better because otherwise it will automatically look for
sequence codes 1224, ... in the names in the peak file, and won't be able
to handle the 'z' sequence insert codes the first time round. You'll have
to rerun linkResonances a second time (and maybe third time if you need to
handle 'd' insert codes). I've fixed it in the new version so it
recognizes when a chain doesn't match at all but too complicated to patch
into your current code.
As for the 'chainState' stuff, you will be able to set cis/trans soon when
importing (it already works for CYANA import/export, still have to write
something that allows you to set it in when importing a sequence).
It's a pain I can't give you the new FC distribution which is working much
better, and has an all new readSequence that allows you to set a lot more
information... but it's working with the new API and chemComp stuff so it
will mess up Analysis straight away. I hope the new Analysis distribution
will be out soon (next week Tim?).
Anyway the fixes (for b15):
1) python/ccpnmr/format/general/Util.py
in function getNameInfo(...)
change:
if string.strip(atomName) == "":
atomName = None
else:
atomName = string.upper(atomName)
to:
if seqCode:
if string.strip(atomName) == "":
atomName = None
else:
atomName = string.upper(atomName)
else:
if verbose:
print " Error: getNameInfo Can't decompose resonance name '%s'." % (resName)
(chainCode,seqCode,seqInsertCode,atomName) = (None,None,defaultSeqInsertCode,None)
2) python/ccp/format/general/Util.py
in function getSeqAndInsertCode(...)
to the following:
if searchObj:
try:
seqCode = int(searchObj.group(2))
if searchObj.group(1) or searchObj.group(3):
seqInsertCode = searchObj.group(1) + searchObj.group(3)
except:
seqCode = None
add this else statement:
else:
seqCode = None
That should get things working. The problem was that you had a 'ligz'
sequence code in there - that I cannot handle (currently there has to be
some kind of number in the sequence code).
Bye,
Wim.
|