Hi Bruce,
Thanks for that thorough examination of my code! The changes then:
> 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:
2140 has to be changed to:
self.dataSource = self.peakList.dataSource
The rest is OK... bear in mind that these variables occur in different
functions, where 'peakList' could be a variable local to the function (and
not part of the class).
> 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):
From these only line 2133 has to be changed to:
if not self.peakListAssignmentCheck([self.peakList]):
> 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?
No - here again peakLists is a local variable which is passed in, so it
doesn't matter (it could be called 'bananas' or whatever).
By the way as a matter of style we try to use the plural of a word to
signify a list within the ccpNmr code, so for example:
number = 1
numbers = [1,2,3,4,5]
Hope that helps and thanks for the reply,
Wim
----------------------------------------------------------------------
Wim Vranken [log in to unmask]
Macromolecular Structure Database (MSD) group
European Bioinformatics Institute (EMBL outstation)
Wellcome Trust Genome Campus
Cambridge CB10 1SD, UK
Tel: +44-1223-494682 Fax: +44-1223-494487
----------------------------------------------------------------------
|