Print

Print


Hello,

On the readXmlProjectFile() and loadXmlProjectFile() front, note that the
calling signature (and perhaps even the names) will be different in the
1.1 API (there is no separate project file in 1.1, it lives in the project
directory like everything else).

On the code issue below, it looks like ok code to me.  (Of course
self.existingPeaks will be a list of deleted peaks after the loop, but
presumably you then set it to [] or something.)  And I don't quite
understand the question about the appData.  If that appData says something
useful to identify the peak (beyond the information in peakName) then by
all means add it into the message.

Wayne

On Thu, 9 Aug 2007, Gary S. Thompson wrote:

> Wim Vranken wrote:
>
> > Hi Gary,
> >
> > Try readXmlProjectFile() instead of loadXmlProjectFile() - safer
> > because it resets the paths if required (though in your case since
> > the project hasn't moved that shouldn't be necessary?).
> >
> > Anyway, as Wayne said, it should be looking for an absolute path... .
> >
> > Wim
> >
> > .
> >
> Thanks I will try that and also have a look for where my relative paths
> are coming from
>
>
> one side comment/patch would this be a good idea:
>
>
>
>   def deleteRemainingPeaks(self):
>
>     """
>
>     If overwrite mode is on, delete remaining existing peaks that were
>     not in new list.
>
>     """
>
>     for existingPeak in self.existingPeaks:
>       applData = existingPeak.findFirstApplicationData(application =
> self.format, keyword = peakNum_kw)
>       peakName = "%s:%d[%d]" %
> (existingPeak.peakList.dataSource.name,existingPeak.peakList.serial,
> existingPeak.serial)
>       if applData:
>         addString = "%s, app data: (number %d)" % (peakName,applData.value)
>       else:
>         addString = peakName
>       print "  Warning: Deleting original peak %s" % addString
>
>       existingPeak.delete()
>
> as otherwise if there is no app data you have no idea what is being deleted
>
>
> regards
> gary
>
> nb there  are several patches to the codre to follow
>
> --
> -------------------------------------------------------------------
> Dr Gary Thompson
> Astbury Centre for Structural Molecular Biology,
> University of Leeds, Astbury Building,
> Leeds, LS2 9JT, West-Yorkshire, UK             Tel. +44-113-3433024
> email: [log in to unmask]                   Fax  +44-113-2331407
> -------------------------------------------------------------------
>