Right, I am amazed somewhat that the NmrPipe referencing is ok (since
point 1 is a more natural reference point, I would have thought) but since
this is what NmrDraw says let us definitely take that as correct.
And the UCSF referencing can easily be fixed in the code, and I've done so
now and put the fix on the update server. For those who want to fix it
directly, it is in the file
ccpnmr1.0/python/ccpnmr/analysis/UcsfParams.py. On line 116 change
self.refpt[i] = 0.5 * float(self.npts[i])
to
self.refpt[i] = 1.0 + 0.5 * float(self.npts[i])
Wayne
On Thu, 26 Oct 2006, Justin Douglas wrote:
> >
> > This is important to sort out.
>
>
> I agree.
>
>
> > I think it's quite possible both the
> > NmrPipe and UCSF referencing are out, or the former but not the latter or
> > the latter but not the former. (Or the other conversion programme is also
> > making a mistake but that is not so likely I would have though.)
>
>
> I tend to trust nmrDraw to read nmrPipe format files. So if we use that as
> our "gold standard" we may be able to figure out where the problem is.
>
> So open and nmrPipe format file using nmrDraw and I pick a peak.
>
> Then I open a sparky format file (*.ucsf) using sparky and pick that same
> peak. Viola, the peaks have the same chemical shift. The sparky people
> did things correctly.
>
> Here is where things get interesting. I open the sparky format file in
> Analysis and let analysis do the referencing. I pick the same peak. I find
> the chemical shift is NOT the same as I got in sparky. However it is easy
> to see that the problem is that when I let analysis set the reference it
> chose the reference point as 128 (out of 256 points) in the direct dimension
> and 64 (out of 128 points) in the indirect dimension. If I change this to
> 129 and 65 the chemical shifts line up. This was predicted by Wayne in his
> response below.
>
> Note that this is in contrast to my last message. I was looking
> qualitatively before, this time I quantitated the chemical shifts and found
> that Analysis does not set the reference correctly for sparky type files.
>
> I can put some screenshots on the web if this isn't clear.
>
> ***
>
> But this doesn't get back to the original problem which was the nmrPipe and
> Sparky files weren't lining up.
>
> So here is the funny part. I open the nmrPipe format file in Analysis and
> let Analysis do the referencing. Then I pick the same peak I was using
> above. The chemical shifts are the same as I got using nmrDraw.
>
> So I've come full circle. I now think that Analysis is making a mistake
> with Sparky Format files. If I set the reference point to the (number of
> original points)/2 + 1 I get the expected results. So Wayne is 100%
> correct in his assement that you should add 1 to the reference point for
> Sparky format files if you open them in analysis. I have to ask though,
> could we make Analysis do this for us?
>
> In conclusion, 1) if you open sparky and nmrPipe format files in Analysis
> and let Analysis do the referencing for you the spectra will not line up.
> 2) The problem is with the Sparky format file. You must add 1 to the
> reference point.
>
> regards,
>
> Justin
>
>
>
> > Equally, if you leave the NmrPipe referencing alone and add +1 to the UCSF
> > reference point (in both dimensions) then that should also align the
> > spectra. That sounds like a more plausible change, but if Sparky and
> > Analysis are showing UCSF spectra at the same ppm then this option must be
> > wrong. (Well, assuming Sparky shows UCSF spectra correctly, which must be
> > true.)
> >
> > But if I really had to guess then I would have thought that the reference
> > point in both cases should be +1 from what it says! And the only way
> > that can be correct is if the other conversion program is also out by a
> > point.
> >
> > Wayne
> >
> > On Tue, 24 Oct 2006, Justin Douglas wrote:
> >
> > > Hi,
> > >
> > > I'm having a little problem that could reflect bug so I thought that I'd
> > > report it.
> > >
> > > If I open a spectrum in sparky file format (*.ucsf) everything is fine.
> > > Analysis calculates the reference and it is correct. Even if I have
> > > extracted the left half of the spectrum Analysis puts the reference in
> > the
> > > middle and calculates
> > > the ppm value correctly.
> > >
> > > No problem so far.
> > >
> > > However, for reason too lengthy to go into, I cannot always convert my
> > > spectra into sparky format. One powerful feature of analysis is that I
> > can
> > > open nmrPipe format files. I noticed thought that sometimes things
> > weren't
> > > lining up. After an exhausitive search I think the culprit is
> > Analysis. It
> > > seems somehow get the reference wrong for nmrPipe files.
> > >
> > > I put some screen shots on the web to demonstrate:
> > >
> > >
> > http://www.andrew.cmu.edu/user/douglas3/research/CCPN/sparky_v_pipe/sparky_v_pipe.html
> > >
> > > Now that I know what the problem is I can fix it. I can calculate the
> > > references by hand and change it manually. However, it could be that
> > > Analysis has a bug, so I thought I'd make Wayne and Tim aware.
> > >
> > > Thanks,
> > >
> > > Justin
> > >
> >
>
|