Loading ...
Sorry, an error occurred while loading the content.

Re: extracting spectral regions from 2D spectra

Expand Messages
  • aswanikumar
    Many thanks to Nicholas and Frank. I tried out the steps posted by Frank and they worked perfectly fine with me. By applying minor variations, I could get the
    Message 1 of 10 , May 12 5:32 AM
    • 0 Attachment
      Many thanks to Nicholas and Frank. I tried out the steps posted by Frank and they worked perfectly fine with me.

      By applying minor variations, I could get the strip-plots for the HN-HA region of the DQF-COSY, 2D-TOCSY and 2D-NOESY spectra, which could be overlaid to present
      the sequence specific assignments using the sequential connectivity. The steps are briefly mentioned below.

      1. I extracted the HN-HA region of the spectrum while processing the data.

      2. Converted the 2D spectrum into a pseudo 3D spectrum by using "series.com".

      3. I manually typed down the ".tab" file so that the input chemical shifts are in the order of amino acid sequence. This is necessary for presenting the sequence specific assignments. One the input tab files (for residues 32 to 41) which I used is pasted below. It has only three columns and are required as the input arguments for "stripPlot.tcl". The first column INDEX is the residue number, second column X_PPM is the amide proton chemical shift. The third column Z_PPM is the fake location of 2D plane in the third dimension.

      VARS   INDEX X_PPM Z_PPM
      FORMAT %5d %8.3f %9.3f

              32      8.437   1.000
              33      9.040   1.000
              34      8.819   1.000
              35      8.862   1.000
              36      8.516   1.000
              37      7.672   1.000
              38      7.074   1.000
              39      8.627   1.000
              40      7.245   1.000
              41      8.376   1.000
              42      9.323   1.000
              43      8.623   1.000


      4. Next I used the "stripPlot.tcl" with all the arguments as posted by Frank and with a few more additional arguments. The resulting strip-plots were good!!

      stripPlot.tcl -tab strip.32.43.tab -in test.ft2 -hi 3.0e+5 -plev 20 -nlev 20 -xw 0.09ppm -zw 0 -x X_AXIS -y ID -z Y_AXIS -xVar X_PPM -yVar Z_PPM



      Here "strip.32.43.tab" is the input tab file. "test.ft2" is the input file for extracted 2D spectrum.
      I varied the value of input argument "-hi 3.0e+5 " appropriately depending on the signal to noise in a given spectrum. I adjusted the the number of positive and negative contour levels using "-plev 20" and "-nlev 20". The width of the strip could be adjusted using "-xw 0.09ppm".

      with best wishes,
      K.Aswani Kumar



      --- In nmrpipe@yahoogroups.com, Frank Delaglio <delaglio@...> wrote:
      >
      >
      >
      > Working with strips from 2D data would indeed be handy, I'll keep it
      > in mind, and adjust the strip scripts accordingly. In the mean time,
      > Nick's suggested work-around is a good idea, and not too hard (thanks
      > Nick!) ... I just tried it, and it seems to work.
      >
      > Here are the steps:
      >
      > 1. Use nmrDraw to build a peak table which contains the PPM positions at
      > which you would like to extract strips from the 2D. For my test,
      > I created a 1D projection of a 2D COSY with "proj2D.tcl" and peak-picked
      > the 1D result in nmrDraw.
      >
      > 2. Take the peak table above, and add an extra column with the value "1.0" ...
      > this will represent the location in the fake 3rd dimension. I added
      > the value this way:
      >
      > addTabVar.tcl -in test.tab -out scroll.tab -var Z_PPM -float -fmt
      > %9.3f -val 1.0
      >
      > 3. Use "series.com" to give the 2D spectrum a 3D header. The new "fake"
      > 3rd dimension will be called "ID" by default, and the 2D plane will
      > have a "fake" location of 1.0ppm in this third dimension:
      >
      > series.com test.ft2
      >
      > 4. Now you can use the script "scroll.tcl" to extract and display
      > strips from the 2D. This script expects locations from 2D HN/15N
      > data, so for this case, we have to explicitly tell it the axis names
      > from the spectrum, and the column names from the peak table.
      > Here's my example:
      >
      > scroll.tcl -tab strip.tab -in test.ft2 -hi 5.0e+5 -zw 0 \
      > -x X_AXIS -y ID -z Y_AXIS \
      > -xVar X_PPM -yVar Z_PPM
      >
      > try it, it's Nice!
      >
      > 5. There is a companion script "stripPlot.tcl" which takes
      > similar arguments, but creates a series of PostScript plots
      > instead of drawing on the screen:
      >
      > stripPlot.tcl -tab strip.tab -in test.ft2 -hi 5.0e+5 -zw 0 \
      > -x X_AXIS -y ID -z Y_AXIS \
      > -xVar X_PPM -yVar Z_PPM
      >
      > HUZZAH!!!
      >
      > cheerful regards,
      >
      > big fd
      >
      > Quoting Nicholas Fitzkee nfitzkee@...:
      >
      > > Hi Aswani,
      > >
      > > I was thinking that one way to solve your problem may be to turn your
      > > spectrum into a pseudo 3D using something like series.com. Then, you may be
      > > able to get the standard stripPlot.tcl to do what you want without
      > > modification.
      > >
      > > Alternatively, if you know TCL/TK (or any programming language),
      > > stripPlot.tcl is one of the simpler scripts in the NMRPipe package, and it
      > > may be straightforward (and educational) to make the modifications yourself.
      > > You might be surprised at how simple it is.
      > >
      > > I'm not sure if that helps you, hopefully it does. Frank may chime in here
      > > with a magic bullet to solve your problem, but if the pseudo-3D suggestion
      > > works, it may save you (and him) some time.
      > >
      > > Regards,
      > > Nick
      > >
      > > --
      > > Nicholas Fitzkee, Ph.D.
      > > National Institutes of Health
      > > Laboratory of Chemical Physics, NIDDK
      > >
      > > e: nfitzkee@...
      > > w: (301) 451-7233
      > > f: (301) 496-0825
      > >
      > > -----Original Message-----
      > > From: nmrpipe@yahoogroups.com [mailto:nmrpipe@yahoogroups.com] On Behalf Of
      > > aswanikumar
      > > Sent: Friday, April 15, 2011 1:59 AM
      > > To: nmrpipe@yahoogroups.com
      > > Subject: [nmrpipe] Re: extracting spectral regions from 2D spectra
      > >
      > >
      > >
      > >
      > > Dear Frank,
      > > Many thanks for your e-mail and the script.
      > > But I am sorry that I could not convey what I wanted to do. Here it is...
      > >
      > > 1. I have 1H,1H NOESY spectrum.
      > >
      > > 2. I need to extract vertical strips of the spectrum centered about
      > > particular chemical shift (say 8.5ppm, 8.0ppm and so on); width of the strip
      > > being about 0.1ppm.
      > >
      > > 3. If there is a script which needs input as
      > > i) the spectrum file name (say noesy.ft),
      > > ii) the peak positions (list of chemical shifts 8.5ppm, 8.0ppm so on)
      > > iii) the chemical shift range in the y dimension (say 6ppm to 3ppm)
      > >
      > > 4. The output should be vertical strips (in *.ps format) of width 0.1ppm
      > > centered around 8.5ppm, 8.0ppm and so on, with the vertical chemical shift
      > > range being 6ppm to 3ppm.
      > >
      > > This is very analogous to the strip plots that we get in 3D data using
      > > stripPlot.tcl, where each strip is centered about an amide proton chemical
      > > shift in a given nitrogen plane and with appropriate chemical shift range
      > > along the y axis.
      > >
      > > The vertical strips extracted from 2D 1H,1H NOESY and TOCSY will be useful
      > > to represent the sequence specific walk of the assignments.
      > >
      > > thanking you in advance,
      > >
      > > K.Aswani Kumar
      > >
      > > --- In nmrpipe@yahoogroups.com <mailto:nmrpipe%40yahoogroups.com> , Frank
      > > Delaglio delaglio@ wrote:
      > >>
      > >>
      > >>
      > >> oops! sorry ... in the script below:
      > >>
      > >> "-in test.fid" should be "-in $dirName/test.fid"
      > >> "-out test.ft2" should be "-out $outName"
      > >>
      > >> the corrected script follows ...
      > >>
      > >> ---
      > >> #!/bin/csh
      > >>
      > >>
      > >> if (!(-d ft)) then
      > >> mkdir ft
      > >> endif
      > >>
      > >>
      > >> set tauList = (0.01 0.01 0.05 0.1 0.2 0.4 0.8 1.2)
      > >> set dirList = (10 24 11 12 13 14 15 16)
      > >>
      > >> set i = 1
      > >>
      > >> foreach dirName ($dirList)
      > >> set outName = (`printf ft/relax%03d.ft2 $i`)
      > >>
      > >> bruk2pipe -tau $tauList[$i] \
      > >> -in $dirName/ser -bad 0.0 -noaswap -AMX -decim 16 -dspfvs 12
      > >> -grpdly -1 \
      > >> -xN 2048 -yN 256 \
      > >> -xT 1024 -yT 128 \
      > >> -xMODE DQD -yMODE Echo-AntiEcho \
      > >> -xSW 9615.385 -ySW 2579.979 \
      > >> -xOBS 800.134 -yOBS 81.086 \
      > >> -xCAR 4.773 -yCAR 118.093 \
      > >> -xLAB HN -yLAB 15N \
      > >> -ndim 2 -aq2D States \
      > >> -out $dirName/test.fid -verb -ov
      > >>
      > >> echo $outName $tauList[$i]
      > >>
      > >> nmrPipe -in $dirName/test.fid \
      > >> | nmrPipe -fn SOL \
      > >> | nmrPipe -fn SP -off 0.5 -end 0.98 -pow 2 -c 0.5 \
      > >> | nmrPipe -fn ZF -auto \
      > >> | nmrPipe -fn FT \
      > >> | nmrPipe -fn PS -p0 -9.60 -p1 0.00 -di -verb \
      > >> | nmrPipe -fn EXT -x1 10.0ppm -xn 5.0ppm -sw \
      > >> | nmrPipe -fn TP \
      > >> | nmrPipe -fn SP -off 0.5 -end 0.98 -pow 1 -c 0.5 \
      > >> | nmrPipe -fn ZF -auto \
      > >> | nmrPipe -fn FT \
      > >> | nmrPipe -fn PS -p0 89.00 -p1 0.00 -di -verb \
      > >> | nmrPipe -fn TP \
      > >> | nmrPipe -fn POLY -auto \
      > >> -ov -out $outName
      > >>
      > >> @ i++
      > >> end
      > >>
      > >> series.com ft/*
      > >> Quoting Frank Delaglio delaglio@:
      > >>
      > >> >
      > >> > oo!
      > >> >
      > >> > There are more than a few problems in the script. For one thing,
      > >> > it seems that many lines have a backslash "\" character at the end
      > >> > when they shouldn't, although this might just be an artifact of
      > >> > how the script was inserted into the email message.
      > >> >
      > >> > One key problem is the fact that "inName" is defined as a list of files,
      > >> > but then used as what should be a single file name. This is what
      > >> > generates the error message.
      > >> >
      > >> > It also seems like this script was modified from an example
      > >> > which processes interleaved 2D series data with COADD. But this
      > >> > data is not interleaved in a single file, instead it is a series of
      > >> > separate 2D experiments ... so, COADD is not needed. In any case,
      > >> > the "cList" option is supposed to be a list of scaling
      > >> > coefficients, but in this example, it seems to be a list of
      > >> > directory names, which would definitely be a problem.
      > >> >
      > >> > Finally, there are some non-ideal processing parameters,
      > >> > and also use of LP, which should probably be avoided when
      > >> > quantifying intensities. When quantifying intensities, use window
      > > functions
      > >> > which start at 1.0 (i.e. SP -off 0.5). Also, to avoid baseline
      > >> > offsets, always scale the first point of the time-domain data
      > >> > by 0.5 (SP -c 0.5) whenever the first order phase is zero.
      > >> >
      > >> > An alternate version of the script follows, hope it helps.
      > >> >
      > >> > cheerful regards,
      > >> >
      > >> > big fd
      > >> >
      > >> >
      > >> > ---
      > >> > #!/bin/csh
      > >> >
      > >> >
      > >> > if (!(-d ft)) then
      > >> > mkdir ft
      > >> > endif
      > >> >
      > >> >
      > >> > set tauList = (0.01 0.01 0.05 0.1 0.2 0.4 0.8 1.2)
      > >> > set dirList = (10 24 11 12 13 14 15 16)
      > >> >
      > >> > set i = 1
      > >> >
      > >> > foreach dirName ($dirList)
      > >> > set outName = (`printf ft/relax%03d.ft2 $i`)
      > >> >
      > >> > bruk2pipe -tau $tauList[$i] \
      > >> > -in $dirName/ser -bad 0.0 -noaswap -AMX -decim 16 -dspfvs 12
      > >> > -grpdly -1 \
      > >> > -xN 2048 -yN 256 \
      > >> > -xT 1024 -yT 128 \
      > >> > -xMODE DQD -yMODE Echo-AntiEcho \
      > >> > -xSW 9615.385 -ySW 2579.979 \
      > >> > -xOBS 800.134 -yOBS 81.086 \
      > >> > -xCAR 4.773 -yCAR 118.093 \
      > >> > -xLAB HN -yLAB 15N \
      > >> > -ndim 2 -aq2D States \
      > >> > -out $dirName/test.fid -verb -ov
      > >> >
      > >> > echo $outName $tauList[$i]
      > >> >
      > >> > nmrPipe -in test.fid \
      > >> > | nmrPipe -fn SOL \
      > >> > | nmrPipe -fn SP -off 0.5 -end 0.98 -pow 2 -c 0.5 \
      > >> > | nmrPipe -fn ZF -auto \
      > >> > | nmrPipe -fn FT \
      > >> > | nmrPipe -fn PS -p0 -9.60 -p1 0.00 -di -verb \
      > >> > | nmrPipe -fn EXT -x1 10.0ppm -xn 5.0ppm -sw \
      > >> > | nmrPipe -fn TP \
      > >> > | nmrPipe -fn SP -off 0.5 -end 0.98 -pow 1 -c 0.5 \
      > >> > | nmrPipe -fn ZF -auto \
      > >> > | nmrPipe -fn FT \
      > >> > | nmrPipe -fn PS -p0 89.00 -p1 0.00 -di -verb \
      > >> > | nmrPipe -fn TP \
      > >> > | nmrPipe -fn POLY -auto \
      > >> > -ov -out test.ft2
      > >> >
      > >> > @ i++
      > >> > end
      > >> >
      > >> > series.com ft/*
      > >> >
      > >> > Quoting aswanikumar ashwin2952@:
      > >> >
      > >> >> Hello,
      > >> >>
      > >> >> I have H,H homo-nuclear and hetero-nuclear 2D spectra. I wish to
      > >> >> extract regions from these spectra (similar to how we extract
      > >> >> strip-plots in 3D data). I need to do so, for eg., when I want to
      > >> >> show the sequential walk using the overlay of TOCSY and NOESY.
      > >> >>
      > >> >>
      > >> >> If I try to use the zoom function and then make a hard copy plot,
      > >> >> the aspect ratio is messed up and the peaks look stretched along the
      > >> >> x axis.
      > >> >>
      > >> >> Does anyone have a script to get the strip plots from 2D data?
      > >> >>
      > >> >> Thanking you,
      > >> >>
      > >> >> K.Aswani Kumar
      > >> >> Molecular Biophysics Unit
      > >> >> Indian Institute of Science
      > >> >> Bangalore
      > >> >> India
      > >> >>
      > >> >>
      > >> >
      > >> >
      > >> >
      > >> >
      > >>
      > >
      > >
      > >
      > >
      > >
      > >
      >
    • Nadukkudy Eldho
      Dear Friends I processed 3D edited NOESY in the nmrpipe and try to convert to sparky format. I used following command line to make all ft3 files into one
      Message 2 of 10 , Jul 1, 2011
      • 0 Attachment
        Dear Friends

        I processed 3D edited NOESY in the nmrpipe and try to convert to sparky format. I used following command line to make all ft3 files into one single ft file. when i do this I get an error message. Does anyone can help how can I convert the processed individual ft3 file into one ft file

        The command
        xyz2pipe -in/diectory/test%03d.ft3 -x > ./test03d.ft

        Then I get following error
        xyz2pipe error in command parameter
        xyz2pipe aborting with null header
        xyz2pipe status:1

        Could anyone help with what this error and how can I do the processing.

        Sincerely
        Eldho
      • Ji, Peng
        there should be a space after -in ? ... -- Peng Ji
        Message 3 of 10 , Jul 2, 2011
        • 0 Attachment
          there should be a space after '-in' ?

          On Fri, Jul 1, 2011 at 10:12 PM, Nadukkudy Eldho <eldho_nv@...> wrote:
           

          Dear Friends

          I processed 3D edited NOESY in the nmrpipe and try to convert to sparky format. I used following command line to make all ft3 files into one single ft file. when i do this I get an error message. Does anyone can help how can I convert the processed individual ft3 file into one ft file

          The command
          xyz2pipe -in/diectory/test%03d.ft3 -x > ./test03d.ft

          Then I get following error
          xyz2pipe error in command parameter
          xyz2pipe aborting with null header
          xyz2pipe status:1

          Could anyone help with what this error and how can I do the processing.

          Sincerely
          Eldho




          --
          Peng Ji

        • Andrew
          Hi Eldho, I m not sure that a simple redirect will work. Here s the three line script I ve been using for the same thing. Cheers, Andrew #!/bin/csh xyz2pipe
          Message 4 of 10 , Jul 5, 2011
          • 0 Attachment
            Hi Eldho,

            I'm not sure that a simple redirect will work. Here's the three line script I've been using for the same thing.

            Cheers,
            Andrew

            #!/bin/csh

            xyz2pipe -in fid/reproc%03d.ft3 -x -verb \
            | nmrPipe -out reproc_3d.DAT -ov


            --- In nmrpipe@yahoogroups.com, Nadukkudy Eldho <eldho_nv@...> wrote:
            >>
            > The command
            > xyz2pipe -in/diectory/test%03d.ft3 -x > ./test03d.ft
            >
            > Then I get following error
            > xyz2pipe error in command parameter
            > xyz2pipe aborting with null header
            > xyz2pipe status:1
            >
            > Could anyone help with what this error and how can I do the processing.
            >
            > Sincerely
            > Eldho
            >
          Your message has been successfully submitted and would be delivered to recipients shortly.