CARA Forum
CARA Forum
 | Forums | Register | Reply | Search | Statistics |
Support Questions CARA Forum / Support Questions /  

GetLineWidthsFromPeakLists.lua

Author shubhadra
Registered 

#1 | Posted: 25 Apr 2016 18:55 
Hi,

Im trying to calculate the error in my peaks ( for RDC). And I tried using this script to extract the line widths from the peaklist. But this message keeps popping up in the terminal window:

Lua> [executing "GetLineWidthsFromPeakLists"]
Selected PeakList I13F_iso_A
[string "GetLineWidthsFromPeakLists"]:275: attempt to index global 't' (a nil value)

And I get no peaklist generated. Could you please advise how I could extract the line widths or calculate the error of the peaks. I have a lot of spectra to work on, and doing it peak by peak is not possible.

Thank you.

Author rkeller
Registered 

#2 | Posted: 25 Apr 2016 19:47 | Edited by: rkeller 
Hi Shubhadra
Welcome to the forum. I had a look at the script version at wiki.cara.nmr.ch/ScriptsToGenerateReports. There seems to be a bug on line 275. Just uncomment the whole line (i.e. it should read "-- t.SliceBuffer = {}") and try again please.
Regards
Rochus

Author rkeller
Registered 

#3 | Posted: 25 Apr 2016 19:52 
Ok, I see that there are some other issues too. I will ask Fred if there is a newer version.
Regards
Rochus

Author rkeller
Registered 

#4 | Posted: 25 Apr 2016 21:40 
Hi Shubhadra
Fred was so kind to fix the script. Please find it attached. I will also upload it to the wiki.
Regards
Rochus
GetLineWidthsFromPea.luaAttached file: Fixed script
 

Author shubhadra
Registered 

#5 | Posted: 25 Apr 2016 23:19 
Hi,

Thanks for the new script. It kind of works now, it generates a list of peak number, but no line widths.

Selected PeakList I13F_iso_A
PeakNumber;PeakWidth
1
2
3
4
5

What am I doing wrong? My pearliest is generated using monoscope. And I have updated the script only at the user defined section.

ProjectName="I13F"
SpecId=3 -- enter SpectrumId of Spectrum with PeakList that has BatchList defined (also works with no BatchList)
PeakListId=2 -- edit to be equal to ID of PeakList with BatchList defined
DimTrace=2 -- 1= F1(direct dim), 2= F2 (indirect dim) -- direction of traces whose linewidths are evaluated
DimOrthogonalToTrace=1 -- see above, should be OTHER dimension if DimTrace=1, DimOrthogonalToTrace=2
DeltaPpm = 0.1 -- this is the range of chemical shift around the selected peak to use for lineshape determination
Unit = "Hz" -- unit of the horizontal scale: Hz or ppm

MaxAssymetry = 0.2 -- this parameter excludes residues if their Lineshape is too nonsymmetric at halfheight
-- Assymetry is 2*(LeftHalfWidth-RightHalfWidth/FullWidth)
-- If a reference residue is excluded then this is reported by the script in the Terminal window

--Formatting
sp=";" -- spacer symbol used between datapoints in outputfile

FileSuffix=".csv" -- for output file


Rgds,
Shubhadra

Author rkeller
Registered 

#6 | Posted: 26 Apr 2016 23:01 
Hi Shubhadra
I forwarded your feedback to Fred who sent me the attached version of the script. Hope this helps.
Regards
Rochus
GetLineWidthsFromPea.luaAttached file: Fixed script
 

Author shubhadra
Registered 

#7 | Posted: 26 Apr 2016 23:40 
rkeller
Hi Rochus,

It works perfectly now! thank you very much, and please convey my thanks to Fred as well.

Best Regards,
Shubhadra

Author shubhadra
Registered 

#8 | Posted: 4 May 2016 23:38 
rkeller
Hi,

The script works fine. I have a small glitch- spectra with negative peaks. I have a few spectra that were processed such that the peaks are all in the negative phase. Could you help? When i run the script, the values reported for peakwidth are all 0.

Thanxs very much!

Rgds,
Shubhadra

Author damberger
Registered 

#9 | Posted: 5 May 2016 11:02 
The script would need the function for finding maxima modified to search for minima ('<' operator instead of '>' operator) but I suggest that it is much easier to reprocess spectra with 180deg added to zero order phase.
Best, Fred

Author shubhadra
Registered 

#10 | Posted: 9 May 2016 12:50 
damberger
Hi,

I re-processed all the spectra. It was indeed much easier. Thanks!

Best Regards,
Shubhadra

Author shiv
Registered 

#11 | Posted: 1 Dec 2016 17:09 
Hello,
I am new to cara software, is there any way to generate peak list (nnoesy and cnoesy) from .prot file

Thanks in advance

Support Questions CARA Forum / Support Questions / GetLineWidthsFromPeakLists.lua Top
Your Reply Click this icon to move up to the quoted message
 

 ?
Only registered users are allowed to post here. Please, enter your username/password details upon posting a message, or register first.
 
  CARA Forum Powered by Bulletin Board Script miniBB ®