jakesylvestre / cing

Automatically exported from code.google.com/p/cing
0 stars 0 forks source link

Pretty long names in NMR-STAR not allowed in CCPN #284

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Wim, what should we do to correct these really long names in BMRB? I'm ok 
calling them A or whatever where they violate CCPN limits.
The input is straight up DOCR and BMRB CS.

What is the expected output? What do you see instead?

Done reading shiftPresetDict.py
Reading relation : newMany2OneTable
Found 3435 matches from PDB to BMRB
Read pdbe.adatah.localConstants.py version 4.5.6
Doing 2kka...
DEBUG: curDir: /Library/WebServer/Documents/devNRG-CING/prep/S/kk/2kka
Moving CCPN directory from [linkNmrStarData] to [2kka]
==> Importing data from Ccpn project "2kka"
Limiting the number of imported models to: 1
Non-standard (residues and their) atoms added:
DA  : [ 1]
DI  : C1'  C2   C2'  C3'  C4   C4'  C5   C5'  C6   C8   H1'  H2'  H2'' H3'  H4' 
 H5'  H5'' H8   N1   N3   N7   N9   O3'  O4'  O5'  O6   OP1  OP2  P    [ 14]
DT  : [ 23]
==> Calculating rmsd's (ranges: 1-23, models: 0-0)
==> Ccpn molecule '2kka' imported
<ccp.nmr.NmrConstraint.DistanceConstraint [1, 1, 316]> without atom pairs will 
be skipped
<ccp.nmr.NmrConstraint.DistanceConstraint [1, 1, 317]> without atom pairs will 
be skipped
<ccp.nmr.NmrConstraint.DistanceConstraint [1, 1, 320]> without atom pairs will 
be skipped
<ccp.nmr.NmrConstraint.DistanceConstraint [1, 1, 323]> without atom pairs will 
be skipped
==> Ccpn project imported
DEBUG: Start readNmrStarFile
Reading NmrStar project from file 
/Users/jd/wattosTestingPlatform/bmrb/rsync/bmr16356/bmr16356_21.str
Python nmrStar reader courtesy of Jurgen Doreleijers (BMRB) - with 
modifications added.
Parsing STAR file: 
/Users/jd/wattosTestingPlatform/bmrb/rsync/bmr16356/bmr16356_21.str
Done [90] subs with comment at beginning of line
Done [242] subs with comment not at beginning of line
Parsed: [14] datanodes (top level count only)
  Warning: setting nmrStar version to 2.1.1 for reading.

###############################################
# FormatConverter: executing readMeasurements #
###############################################

#########################################
# FormatConverter: executing readShifts #
#########################################

  Created during import: 1 Shift list(s) (with 196 Shift values)

DEBUG: Start setBmrbNmrStarMapping
# Matching NMR-STAR file to molSystem... 
Python nmrStar reader courtesy of Jurgen Doreleijers (BMRB) - with 
modifications added.
Parsing STAR file: 
/Users/jd/wattosTestingPlatform/bmrb/rsync/bmr16356/bmr16356_21.str
Done [90] subs with comment at beginning of line
Done [242] subs with comment not at beginning of line
Parsed: [14] datanodes (top level count only)

*** Setting chain mapping automatically to: [['A', 
"DNA(5'-D(*AP*GP*GP*GP*TP*TP*AP*GP*GP*GP*TP*TP*AP*(INO)P*GP*GP*TP*TP*AP*GP*GP*GP
*T)-3')", 19, -18]] ***

DEBUG: Start runLinkResonances

###########################
# Starting linkResonances #
###########################

  ###################################################################
  # Stage 1: Determining input format and setting up reference data #
  ###################################################################

  ################################################################################
  # Stage 2: Determining chain/residue mapping between format data and CCPN data #
  ################################################################################

ERROR in ccpnmr.NameMapping.ChainMapping.__init__
WARNING Error in clean-up of incorrectly created object. 
        Data may be left in an illegal state
Traceback (most recent call last):
  File "/Users/jd/workspace35/cingStable/python/cing/Scripts/FC/mergeNrgBmrbShifts.py", line 144, in <module>
    MergeNrgBmrbShifts(sys.argv)
  File "/Users/jd/workspace35/ccpn/python/pdbe/adatah/Generic.py", line 89, in __init__
    self.catchError(raiseError,timeFlag)
  File "/Users/jd/workspace35/ccpn/python/pdbe/adatah/Generic.py", line 82, in __init__
    self.runSpecific()
  File "/Users/jd/workspace35/cingStable/python/cing/Scripts/FC/mergeNrgBmrbShifts.py", line 104, in runSpecific
    self.runLinkResonances(resonanceType='nmr')
  File "/Users/jd/workspace35/ccpn/python/pdbe/adatah/Generic.py", line 591, in runLinkResonances
    self.formatObjectDict[formatName].linkResonances(**keywds)
  File "/Users/jd/workspace35/ccpn/python/ccpnmr/format/converters/DataFormat.py", line 4131, in linkResonances
    self.linkResonancesClass = linkResonances(self.project,guiParent = self.guiParent, **kw)
  File "/Users/jd/workspace35/ccpn/python/ccpnmr/format/process/linkResonances.py", line 556, in __init__
    self.run(proj,keywds)
  File "/Users/jd/workspace35/ccpn/python/ccpnmr/format/process/linkResonances.py", line 713, in run
    if not self.setChainLinks(forceChainMappings = self.forceChainMappings):
  File "/Users/jd/workspace35/ccpn/python/ccpnmr/format/general/TopShared.py", line 306, in setChainLinks
    self.setChainMappingDicts(chain,formatChainCode,firstSeqId = firstSeqId, offset = offset, seqInsertCode = seqInsertCode)
  File "/Users/jd/workspace35/ccpn/python/ccpnmr/format/general/TopShared.py", line 653, in setChainMappingDicts
    chainMapping = NameMapping.ChainMapping(self.nameMapping, **keywds)
  File "/Users/jd/workspace35/ccpn/python/ccpnmr/api/NameMapping.py", line 1619, in __init__
    func(self, value)
  File "/Users/jd/workspace35/ccpn/python/ccpnmr/api/NameMapping.py", line 2423, in setFormatChainCode
    + ": %s" % (value,)
memops.general.Implementation.ApiError: 
ccpnmr.NameMapping.ChainMapping.setFormatChainCode:
       memops.Implementation.Line maximum length is 80 violated by value: DNA(5'-D(*AP*GP*GP*GP*TP*TP*AP*GP*GP*GP*TP*TP*AP*(INO)P*GP*GP*TP*TP*AP*GP*GP*GP*T)-3')

Original issue reported on code.google.com by jurge...@gmail.com on 9 Feb 2011 at 9:51

GoogleCodeExporter commented 9 years ago

Original comment by jurge...@gmail.com on 9 Feb 2011 at 9:52

GoogleCodeExporter commented 9 years ago
I will modify the code so it makes the string compatible with the 'Line' 
requirements in CCPN... any other ones like this, let me know.

Original comment by wfvran...@gmail.com on 9 Feb 2011 at 9:54

GoogleCodeExporter commented 9 years ago
Done, will check it in when SF back online (end of this week they are saying). 
Note that this change might create problems further down the line, something to 
doublecheck.

Original comment by wfvran...@gmail.com on 9 Feb 2011 at 10:00

GoogleCodeExporter commented 9 years ago
Is now in SF CVS

Original comment by wfvran...@gmail.com on 22 Feb 2011 at 1:47

GoogleCodeExporter commented 9 years ago
Problem shifted downfield I think.

Done reading shiftPresetDict.py
Read pdbe.adatah.localConstants.py version 4.5.7
Doing 2kka...
DEBUG: curDir: /Library/WebServer/Documents/NRG-CING/prep/S/kk/2kka
Moving CCPN directory from [linkNmrStarData] to [2kka]
==> Importing data from Ccpn project "2kka"
Limiting the number of imported models to: 1
Non-standard (residues and their) atoms added:
DA  : [ 1]
DI  : C1'  C2   C2'  C3'  C4   C4'  C5   C5'  C6   C8   H1'  H2'  H2'' H3'  H4' 
 H5'  H5'' H8   N1   N3   N7   N9   O3'  O4'  O5'  O6   OP1  OP2  P    [ 14]
DT  : [ 23]
==> Calculating rmsd's (ranges: 1-23, models: 0-0)
==> Ccpn molecule '2kka' imported
<ccp.nmr.NmrConstraint.DistanceConstraint [1, 1, 316]> without atom pairs will 
be skipped
<ccp.nmr.NmrConstraint.DistanceConstraint [1, 1, 317]> without atom pairs will 
be skipped
<ccp.nmr.NmrConstraint.DistanceConstraint [1, 1, 320]> without atom pairs will 
be skipped
<ccp.nmr.NmrConstraint.DistanceConstraint [1, 1, 323]> without atom pairs will 
be skipped
==> Ccpn project imported
DEBUG: Start readNmrStarFile
Reading NmrStar project from file 
/Users/jd/wattosTestingPlatform/bmrb/rsync/bmr16356/bmr16356_21.str
Python nmrStar reader courtesy of Jurgen Doreleijers (BMRB) - with 
modifications added.
Parsing STAR file: 
/Users/jd/wattosTestingPlatform/bmrb/rsync/bmr16356/bmr16356_21.str
Done [90] subs with comment at beginning of line
Done [242] subs with comment not at beginning of line
Parsed: [14] datanodes (top level count only)
  Warning: setting nmrStar version to 2.1.1 for reading.

###############################################
# FormatConverter: executing readMeasurements #
###############################################

#########################################
# FormatConverter: executing readShifts #
#########################################

  Created during import: 1 Shift list(s) (with 196 Shift values)

DEBUG: Start setBmrbNmrStarMapping
# Matching NMR-STAR file to molSystem... 
Python nmrStar reader courtesy of Jurgen Doreleijers (BMRB) - with 
modifications added.
Parsing STAR file: 
/Users/jd/wattosTestingPlatform/bmrb/rsync/bmr16356/bmr16356_21.str
Done [90] subs with comment at beginning of line
Done [242] subs with comment not at beginning of line
Parsed: [14] datanodes (top level count only)

*** Setting chain mapping automatically to: [['A', 
"DNA(5'-D(*AP*GP*GP*GP*TP*TP*AP*GP*GP*GP*TP*TP*AP*(INO)P*GP*GP*TP*TP*AP*GP*GP*GP
*T)-3')", 1, 0]] ***

      WARNING: Mismatches in sequence mapping between CCPN chain 'A' and BMRB chain 'DNA(5'-D(*AP*GP*GP*GP*TP*TP*AP*GP*GP*GP*TP*TP*AP*(INO)P*GP*GP*TP*TP*AP*GP*GP*GP*T)-3')':
          - 14.I  <-> 14.Ino

*** Ignoring residues that do not match between PDB and BMRB files ***

DEBUG: Start runLinkResonances
keyword/value allowPopups/False
keyword/value useAmbiguity/True
keyword/value forceChainMappings/[['A', 
"DNA(5'-D(*AP*GP*GP*GP*TP*TP*AP*GP*GP*GP*TP*TP*AP*(INO)P*GP*GP*TP*TP*AP*GP*GP*GP
*T)-3')", 1, 0]]
keyword/value setSingleProchiral/True
keyword/value minimalPrompts/True
keyword/value setSinglePossEquiv/True
keyword/value useEmptyNamingSystems/False
keyword/value globalStereoAssign/False
keyword/value ignoreResidues/[<ccp.molecule.MolSystem.Residue ['2kka', 'A', 
14]>]
keyword/value useCommonNames/False
keyword/value assignFormat/nmrStar
keyword/value guiParent/None
keyword/value useLinkResonancePopup/False

###########################
# Starting linkResonances #
###########################

  ###################################################################
  # Stage 1: Determining input format and setting up reference data #
  ###################################################################

  ################################################################################
  # Stage 2: Determining chain/residue mapping between format data and CCPN data #
  ################################################################################

  ################################################################
  # Stage 3: Determining atom naming system and creating mapping #
  ################################################################

  Error: ignoring file resonance 'DNA(5'-D(*AP*GP*GP*GP*TP*TP*AP*GP*GP*GP*TP*TP*AP*(INO)P*GP*GP*TP*TP*AP*GP*GP*GP*T)-3').14.H1''... it is linked to a residue that is listed as not valid.
  Naming system IUPAC selected

  Warning: set namingSystem for nameMapping from 'Unknown' to IUPAC.
ERROR in ccpnmr.NameMapping.ResonanceStatusMapping.__init__
WARNING Error in clean-up of incorrectly created object. 
        Data may be left in an illegal state
Traceback (most recent call last):
  File "/Users/jd/workspace35/cing/python/cing/Scripts/FC/mergeNrgBmrbShifts.py", line 144, in <module>
    MergeNrgBmrbShifts(sys.argv)
  File "/Users/jd/workspace35/ccpn/python/pdbe/adatah/Generic.py", line 89, in __init__
    self.catchError(raiseError,timeFlag)
  File "/Users/jd/workspace35/ccpn/python/pdbe/adatah/Generic.py", line 82, in __init__
    self.runSpecific()
  File "/Users/jd/workspace35/cing/python/cing/Scripts/FC/mergeNrgBmrbShifts.py", line 104, in runSpecific
    self.runLinkResonances(resonanceType='nmr')
  File "/Users/jd/workspace35/ccpn/python/pdbe/adatah/Generic.py", line 591, in runLinkResonances
    self.formatObjectDict[formatName].linkResonances(**keywds)
  File "/Users/jd/workspace35/ccpn/python/ccpnmr/format/converters/DataFormat.py", line 4131, in linkResonances
    self.linkResonancesClass = linkResonances(self.project,guiParent = self.guiParent, **kw)
  File "/Users/jd/workspace35/ccpn/python/ccpnmr/format/process/linkResonances.py", line 556, in __init__
    self.run(proj,keywds)
  File "/Users/jd/workspace35/ccpn/python/ccpnmr/format/process/linkResonances.py", line 758, in run
    self.setupAtomToResName()
  File "/Users/jd/workspace35/ccpn/python/ccpnmr/format/process/linkResonances.py", line 1931, in setupAtomToResName
    self.checkStereoStatus()
  File "/Users/jd/workspace35/ccpn/python/ccpnmr/format/process/linkResonances.py", line 1689, in checkStereoStatus
    resStatusMapping = NameMapping.ResonanceStatusMapping(self.nameMapping,resonanceName = self.resName,isStereo = True)
  File "/Users/jd/workspace35/ccpn/python/ccpnmr/api/NameMapping.py", line 7712, in __init__
    func(self, value)
  File "/Users/jd/workspace35/ccpn/python/ccpnmr/api/NameMapping.py", line 8463, in setResonanceName
    + ": %s" % (value,)
memops.general.Implementation.ApiError: 
ccpnmr.NameMapping.ResonanceStatusMapping.setResonanceName:
       memops.Implementation.Line maximum length is 80 violated by value: DNA(5'-D(*AP*GP*GP*GP*TP*TP*AP*GP*GP*GP*TP*TP*AP*(INO)P*GP*GP*TP*TP*AP*GP*GP*GP*T)-3').1.H1'

Original comment by jurge...@gmail.com on 23 Feb 2011 at 3:29

GoogleCodeExporter commented 9 years ago
This is fixed at source now, works for me. 

Check out from SF CVS:

python/ccp/format/nmrStar/sequenceIO.py

for fix.

Original comment by wfvran...@gmail.com on 28 Feb 2011 at 9:34

GoogleCodeExporter commented 9 years ago
When testing with 
jd:nmr/ccpn/ cvs -d:ext:jurgenfd@ccpn.cvs.sourceforge.net:/cvsroot/ccpn status 

python/ccp/format/nmrStar/sequenceIO.py=========================================
==========================
File: sequenceIO.py     Status: Up-to-date

   Working revision:    1.22.4.25
   Repository revision: 1.22.4.25   /cvsroot/ccpn/ccpn/python/ccp/format/nmrStar/sequenceIO.py,v

I still get the same problem. Am I on the right version? It's a quite complex 
procedure for me to check these so I'll check again if you're sure it should be 
fixed.

Original comment by jurge...@gmail.com on 28 Feb 2011 at 10:16

GoogleCodeExporter commented 9 years ago
I still get the same problem from comment 5 with all new CCPN code. Wim can you 
take a look please?

http://nmr.cmbi.ru.nl/NRG-CING/prep/S/kk/2kka/2kka_starCS2Ccpn.log

Original comment by jurge...@gmail.com on 29 Mar 2011 at 11:41

GoogleCodeExporter commented 9 years ago
I wasn't truncating enough apparently... checked in a new version, try again!

Original comment by wfvran...@gmail.com on 29 Mar 2011 at 1:12

GoogleCodeExporter commented 9 years ago
From:
  def formatMoleculeName(self,molName):    
    # Have to make sure that this is not too long, only 255 chars allowed in CCPN. Truncating to
    # 250 so some extra place for adding chars in sequence read pipeline
    return molName[:240]

I see you're now proposing 240 i.s.o. the 250 you had before. The message above 
however says 80 is the limit. What do you say?

Original comment by jurge...@gmail.com on 29 Mar 2011 at 1:18

GoogleCodeExporter commented 9 years ago
Ah yes of course, you're correct. Usually these things are allowed to be 255 
long. Anyway truncated it to 65, to leave enough room for extra stuff at the 
end. Checked in.

Original comment by wfvran...@gmail.com on 29 Mar 2011 at 1:28

GoogleCodeExporter commented 9 years ago
I just tested again quickly but still get the same message. Before I check 
carefully, are you sure?
Thanks

Original comment by jurge...@gmail.com on 29 Mar 2011 at 2:34

GoogleCodeExporter commented 9 years ago
Do you get exactly the same message at the end? With the very long molecule 
name?

Original comment by wfvran...@gmail.com on 29 Mar 2011 at 2:45

GoogleCodeExporter commented 9 years ago
I think so, look at the updated:
http://nmr.cmbi.ru.nl/NRG-CING/prep/S/kk/2kka/2kka_starCS2Ccpn.log

It has:
memops.general.Implementation.ApiError: 
ccpnmr.NameMapping.ResonanceStatusMapping.setResonanceName:
       memops.Implementation.Line maximum length is 80 violated by value: DNA(5'-D(*AP*GP*GP*GP*TP*TP*AP*GP*GP*GP*TP*TP*AP*(INO)P*GP*GP*TP*TP*AP*GP*GP*GP*T)-3').1.H1'

which is the same. So either I need to ensure I have the right versions of code 
and input throughout or your mod wasn't effective. I should check.

Original comment by jurge...@gmail.com on 30 Mar 2011 at 7:21

GoogleCodeExporter commented 9 years ago
Ok, thinking about it. This bug is not dependent on the NRG processing at BMRB. 
The bug appears when reading in the NMR-STAR file regardless of molecule names 
in the NRG CCPN project right.

Then with current CCPN code, just updated again. I still get the same bug so 
your update must have not been enough. How can I test? Do you read in the 
NMR-STAR file onto the DOCR CCPN file too?

Original comment by jurge...@gmail.com on 30 Mar 2011 at 7:54

GoogleCodeExporter commented 9 years ago
Yes, I'm looking into it now...

Original comment by wfvran...@gmail.com on 30 Mar 2011 at 8:02

GoogleCodeExporter commented 9 years ago
OK there were different levels at play here, one was fixed but not the one 
lower down (at the chemical shift level)... check out from SF CVS:

ccp/format/nmrStar/chemShiftsIO.py

and I think it'll work...

Original comment by wfvran...@gmail.com on 30 Mar 2011 at 8:17

GoogleCodeExporter commented 9 years ago
Cool, this is working now.

Thanks Wim!

Original comment by jurge...@gmail.com on 30 Mar 2011 at 9:01