Following up on this for clarification:
>Your fix:
>
>> Change self.dataSource = peakList.dataSource to
>> self.dataSource = self.peakList.dataSource
>> is a workaround, but I am not sure whether it is the right answer.
>
>Is definitely correct - the 'self.' must've been dropped accidentally at
>one stage. Sorry about that.
In looking through DataFormat.py in analysis1.03 for similar lines, I find
a number of places that look similar to the above code. The following is
all lines where the text, "peakList.dataSource", appears in DataFormat.py
from analysis1.03:
1601: self.dataSource = self.peakList.dataSource
1946: self.dataSource = peakList.dataSource
2140: self.dataSource = peakList.dataSource
3009: measurementList.addExperiment(peakList.dataSource.experiment)
5866: self.numPeakDim = len(peakList.dataSource.dataDims)
5883: tempDataDimRefs = self.peakList.dataSource.numDim * [None]
8524: if self.peakList.dataSource.numDim != self.peakAssignmentsFile.numDim:
Lines 1601, 5883, and 8524 I believe to be correct. I note that the version of
FormatConverter in analysis1.03 is earlier than v.1.0.5 and line number 2140
in this might correspond to 2141 in v.1.0.5. From the statement quoted above,
I presume that both lines 1946 and 2140 should be corrected to add the 'self.'?
Should lines 3009 and 5866 also be so corrected?
>The next error then:
>
>> Done above, I tried to run the same exporting again, without exporting
>> sequence, shifts and peaks first, I tried to export peakAssignments
>> directly after opening the project I get the following error message:
>>
>> Exception in thread Thread-1:
>> Traceback (most recent call last):
>> File "/usr/local/lib/python2.3/threading.py", line 436, in __bootstrap
>> self.run()
>> File "/home/tong/ccpn/ccpnmr/ccpnmr1.0/python/ccpnmr/format/gui/ImportExportFormatPopup.py", line 91, in run
>> self.returnValue = self.__target(*self.__args, **self.__kwargs)
>> File "/home/tong/ccpn/ccpnmr/ccpnmr1.0/python/ccpnmr/format/converters/DataFormat.py", line 2133, in writePeakAssignments
>> if not self.peakListAssignmentCheck(self.peakLists):
>> AttributeError: XEasyFormat instance has no attribute 'peakLists'
>
>Change the line:
>
> if not self.peakListAssignmentCheck(self.peakLists):
>
>to:
>
> if not self.peakListAssignmentCheck([self.peakList]):
>
>The peak assignments export only supports one peak list at a time - the
>code I was using came from peak list export (where multiple lists per file
>are possible for Ansig).
Again, I find a number of similar lines for the pattern "self.peakLists" as
given below:
1858: if type(self.peakLists) != type([]):
1868: if len(self.peakLists) == 0:
1877: if not self.peakListAssignmentCheck(self.peakLists):
1886: if self.dataDimRefs and len(self.peakLists) == 1:
1956: if not self.dataDimRefs:# or (len(self.peakLists) > 1 and self.minimalPrompts):
2133: if not self.peakListAssignmentCheck(self.peakLists):
Here line 2133 seems to correspond to line 2133 in Format Converter v.1.0.5.
I presume that both lines 1877 and 2133 should be corrected to add the square
brackets, and that the other lines should not have square brackets added?
However, is the name 'self.peakList', dropping the 's' as in the reply quoted
above, or should the 's' have remained? If the 's' is to be dropped, should
it be dropped in the other cases above as well?
Line 7259 reads:
def peakListAssignmentCheck(self,peakLists):
If the 's' is to be dropped above, should the 's' be dropped in this
line as well?
Sincerely,
--
Bruce D. Ray, Ph.D.
Associate Scientist, and Operations Director
NMR Center
IUPUI
Physics Dept.
402 N. Blackford St.
Indianapolis, IN 46202-3273
|