Edit detail for AllCaluaScripts revision 1 of 69

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
Editor: damberger
Time: 2009/08/14 12:09:54 GMT+0
Note: added WriteSparkyPeakList.lua

changed:
-
Return to "Main CALUA page":CALUA

Scripts to write Analysis Reports to Script Window or to File:

 * <a href="AssignmentReport.lua">AssignmentReport.lua</a> : Writes out a report of chemical shift assignments to either terminal window or to a file. Identifies unusual shifts. It is possible to filter for only missing assignments (H atoms only or also heteroatoms).

  * **UPDATE** 20.May 05: Fixed a bug which occured if NOT all residues were assigned. Error message was: "line 83: attempt to index field 'Sys' (a nil value)".

  * **UPDATE** 4.6.06: Includes a nice user-interface which remembers settings. Gives average offsets from random coil values. Allows user to set minimum SD to report outlier shifts. This is the version included in the latest template Start1.2.cara.

  * **UPDATE** 19.6.07: Fixed a bug which occured when there is only one project Error message was "No projects found in repository". Added a summary of pseudoatom conflicts (assignment of both the real atom HB2 and pseudoatom HB is reported in a warning).

 *  <a href="CalcMassOfLabeledMolecule.lua">CalcMassOfLabeledMolecule.lua</a> : Calculates the molecular weight of a sequence in a project assuming the isotope-enrichment and percent d2o entered by the user. 2H, 13C, and 15N are available by default. Other nuclei can be accessed by commenting in an option at the top of the script.

  * **UPDATED** It now includes a checkbox to calculate the expected mass for mass-spectrometry and can also calculate the mass in solution for a given pH.


 * <a href="ChemShiftDeviationsFile.lua">ChemShiftDeviationsFile.lua</a> : Writes a file containing Chemical Shift Deviations from the average values stored in the repository library. See also *!ChemShiftDeviationsPlot.lua*

 * <a href="ExportAllSpins.lua">ExportAllSpins.lua</a> : Writes a file containing an atom list in XEASY format. All spins in the selected project are included (also CA-1 etc)


 * <a href="HetNoe.lua">HetNoe.lua</a> : Uses a batchlist consisting of two spectra (noe & ref) to calculate the heteronuclear nOe (ratio of peaks) and stores the result in the Peak attribute *!HetNoe*. It also writes the results to a file in format suitable for excel. See the beginning of the script for instructions.

 * <a href="ReportSpinsWithColorNinPeakList.lua">ReportSpinsWithColorNinPeakList.lua</a> : Writes out a text file containing spins which occur more than N times in a peak with color C in peaklist P. (User enters N,C & P).

 * <a href="SideChainDeviations.lua">SideChainDeviations.lua</a> : Writes out a report of average deviation of chemical shifts from each residue normalized to the standard deviation of the database versus residue number (H atoms only or also heteroatoms).

 * <a href="WriteShiftsInColumns.lua">WriteShiftsInColumns.lua</a> : Writes out shifts for selected atoms into columns, one line per residue. The user can edit a table at the beginning of the script to define which atoms shifts are written out. Currently: "H", "HA", "CA", "CB".

Scripts to Plot Data:

 * <a href="graphDemo.lua">graphDemo.lua</a> : plots amide exchange data for a given peak and peaklist. It assumes a batchlist setup as described in BatchIntegration.
Basically reproduces the function *Show Peakcurve* in MonoScope Integrator menu.

 * <a href="ChemShiftDeviationsPlot.lua">ChemShiftDeviationsPlot.lua</a> : Plots deviations from random coil shifts for a particular atom (like CA). See ChemShiftDeviationsPlot for details and some screenshots.

 * <a href="multiplespectrumview.lua">multiplespectrumview.lua</a> : overlay contour plots for any number of 2D spectra and a peaklist, colors are fully customizable. Use *Shift-Ctrl Click drag* to Zoom and *Home* key to restore to full ppm range.

  **NOTE**: It is now possible to overlay contours in different colors in PolyScope (and to plot them in PrintPreview). See "Release 1.1.4":Release1.1.4. This script is kept here as a demonstration of how to use LUA to build custom scopes.

  * **UPDATE:** Some new features like customizable contour parameters, background color, ...
    See MultipleSpectrumView for details and some screenshots.

  * **UPDATE**: Modified to work with several projects, autocontour or constant threshhold mode, peak label display (not spin numbers)
    <a href="multiplespectrumview2.lua">multiplespectrumview2.lua</a>

  * **UPDATE**: Increased functions to navigate and expand contract view, included cursor display, a peaklist bug fix.
    <a href="multiplespectrumview3.lua">multiplespectrumview3.lua</a>

   * Fixed a bug which read the peaklist indexes incorrectly (versions 1 & 2 displayed the wrong peaklist if the peakID numbers where not consecutively numbered).

   * Added navigation functions: *Ctrl-click-drag* to shift plot region, *!PageUp*, *!PageDown* to go up/down one region, *Ctrl-!PageUp*/*Ctrl-!PageDown* to go left/right one region.

   * Added Expand/Contract 2X functions: *Shift-Ctrl-!UpArrow* to expand displayed region vertically, *Shift-Ctrl-!DownArrow* to contract displayed region vertically, *Shift-Ctrl-!LeftArrow* to expand horizontally, *Shift-Ctrl-!RightArrow* to contract horizontally.

 * <a href="Display1DSlice.lua">Display1DSlice.lua</a> : Generates a 1D slice plot of Dim2 from a 3D for a given residue with HN(Dim1) and N(Dim3). Makes use of Slice Buffers.

 * <a href="GetSliceFrom1D.lua">GetSliceFrom1D.lua</a> : Gets a slice from a 1D spectrum. You can plot the slice, send the ppm,intensity values to the terminal, or send the ppm,intensity values to a file for plotting in external programs.

Scripts to Export Data:

 * Analysis Reports to Script Window or to File:

  * <a href="AssignmentReport.lua">AssignmentReport.lua</a> : Writes out a report of chemical shift assignments to either terminal window or to a file. Identifies unusual shifts. It is possible to filter for only missing assignments (H atoms only or also heteroatoms).

   * **UPDATE** 20.May 05: Fixed a bug which occured if NOT all residues were assigned. Error message was: "line 83: attempt to index field 'Sys' (a nil value)".

   * **UPDATE** 4.6.06: Includes a nice user-interface which remembers settings. Gives average offsets from random coil values. Allows user to set minimum SD to report outlier shifts. This is the version included in the latest template Start1.2.cara.

  * <a href="CalcMassOfLabeledMolecule.lua">CalcMassOfLabeledMolecule.lua</a> : Calculates the molecular weight of a sequence in a project assuming the isotope-enrichment and percent d2o entered by the user. 2H, 13C, and 15N are available by default. Other nuclei can be accessed by commenting in an option at the top of the script. 

   * **UPDATED** 8.11.07: It now includes a checkbox to calculate the expected mass for mass-spectrometry and can also calculate the mass in solution for a given pH.

  * <a href="ChemShiftDeviationsFile.lua">ChemShiftDeviationsFile.lua</a> : Writes a file containing Chemical Shift Deviations from the average values stored in the repository library. See also *!ChemShiftDeviationsPlot.lua*

  * <a href="ExportAllSpins.lua">ExportAllSpins.lua</a> : Writes a file containing an atom list in XEASY format. All spins in the selected project are included (also CA-1 etc)

  * <a href="ReportSpinsWithColorNinPeakList.lua">ReportSpinsWithColorNinPeakList.lua</a> : Writes out a text file containing spins which occur more than N times in a peak with color C in peaklist P. (User enters N,C & P).

  * <a href="SideChainDeviations.lua">SideChainDeviations.lua</a> : Writes out a report of average deviation of chemical shifts from each residue normalized to the standard deviation of the database versus residue number (H atoms only or also heteroatoms).

  * <a href="WriteAssignments.lua">WriteAssignments.lua</a> : Writes out assignments for BMRB, DYANA, CYANA or XEASY (see "Export File for a Program" for details)

  * <a href="WriteShiftsInColumns.lua">WriteShiftsInColumns.lua</a> : Writes out shifts for selected atoms into columns, one line per residue. The user can edit a table at the beginning of the script to define which atoms shifts are written out. Currently: "H", "HA", "CA", "CB".

 * Export File for a Program:

  * ATNOS/CANDID & DYANA or CYANA2.0

   * <a href="ExportSpinLinksToUpls.lua">ExportSpinLinksToUpls.lua</a> : Writes a UPL file in CYANA format containing one UPL for each spinlink connecting the atoms corresponding to the linked spins. The upper distance limits are all set to 5.0 Angstroms. This script can be used together with !UplsToSpinLinks.lua in order to transfer spinlinks from one project to another. Thanks to D. Frueh for this contribution.

   * <a href="WriteAssignments.lua">WriteAssignments.lua</a> : Writes out assignments in a nomenclature consistent for structure calculations using ATNOS/CANDID together with DYANA or CYANA2.0 (seq and prot files). Can also write out assignments for submission to BMRB. This is the successor to !WriteAssignmentsInFormatX.lua. The main new feature is that !WriteAssignments.lua can write out alias shifts for a selected spectrum. 

    * **UPDATED** 30.10.07: BMRB format now writes out one line for each atom with a degenerate shift.

   * <a href="WriteAssignmentsInFormatX.lua">WriteAssignmentsInFormatX.lua</a> : Writes out assignments in a nomenclature consistent for structure calculations using ATNOS/CANDID together with DYANA or CYANA2.0 (seq and prot files). Can also write out assignments for submission to BMRB.

  * EXCEL

   * <a href="WriteBatchTable.lua">WriteBatchTable.lua</a> : Write out a table from a batch integration into a text file (for EXCEL).

   * <a href="HetNoe.lua">HetNoe.lua</a>: Uses a batchlist consisting of two spectra (noe & ref) to calculate the heteronuclear nOe (ratio of peaks) and stores the result in the Peak attribute *!HetNoe*. It also writes the results to a file in format suitable for excel. See the beginning of the script for instructions. See the beginning of the script for instructions.

    * **UPDATE**: Improved User interface, output format and introduced the option to write out the spectrum-dependent parameter (e.g. !MixTime, !ExchTime)

   * <a href="WriteTitrationCurveDataToFile.lua">WriteTitrationCurveDataToFile.lua</a> : Writes chemical shift values of spins with a user-selected label for a series of spectra into a spreadsheet file. (shifts are taken from the alias values in each spectrum). See header for details.

    * **UPDATE** 2.Jan.05: Fixed an error in line "t.Line = !LineTable..." and added dialog for Project selection and entry of !ProtonListName

  * MARS

   * **NEW** <a href="WriteInputForMars.lua">WriteInputForMars.lua</a> : Writes out input file for <a href="http://www.mpibpc.mpg.de/abteilungen/030/zweckstetter/_links/software_mars.htm">MARS</a> (a program for backbone assignment)

  * MOLMOL

   * <a href="ShowNoesInMolmol.lua">ShowNoesInMolmol.lua</a> : Writes out a molmol macro which highlights a selected target atom in cyan and all candidate atoms within a tolerance range of a user-determined chemical shift. Useful for NOE assignment during structure refinement. See header for details

  * PACES

   * <a href="ExportToPaces.lua">ExportToPaces.lua</a> : Writes out a comma-separated list of HN,N,CA,CB chemical shifts for import into Excel and use with PACES.

    * **UPDATE** 20. May 05: Adjusted formatting to more closely adhere to PACES. Included CO, CO-1, HA, HA-1.

  * SPARKY

   * <a href="WriteSparkyPeakList.lua">WriteSparkyPeakList.lua</a> : Writes out a peaklist in sparky format from a Peaklist in a CARA project.

  * XEASY

   * <a href="WriteProtonList.lua">WriteProtonList.lua</a>
 : Writes out an xeasy-formatted proton list for a project (no unassigned "999.000" atoms included)

   * <a href="PeakListNumberedByResidue.lua">PeakListNumberedByResidue.lua</a> : Write out a peaklist where the peaknumber corresponds to the residue number for a specific atom in each dimension. E.g. you want to write out a peaklist for an HSQC15N where each residue gives rise to a peak (HN/N) whose peaknumber corresponds to the residue number. This is useful for plotting the results of NH dynamics or exchange vs. sequence.

  * X-PLOR

   * <a href="ExportToXplor.lua">ExportToXplor.lua</a> :  Converts spinlinks from a project into upper distance limits with the maximum distance (5.5A) Thanks to <a href="mailto:IlinSchS@mskcc.org">S. Ilin</a> for this contribution.

* Write out spectral data: 

 * <a href="Display1DSlice.lua">Display1DSlice.lua</a> : Writes out a report to terminal window or to a file containing **ppm, intensity** values for a 1D slice along Dim2 of a 3D spectrum with HN in Dim1 and N in Dim3. *See also Scripts to plot data.*

 * <a href="GetSliceFrom1D.lua">GetSliceFrom1D.lua</a> : Gets a slice from a 1D spectrum. You can plot the slice, send the **ppm,intensity** values to the terminal, or send the **ppm,intensity** values to a file for plotting in external programs.

Scripts to convert external files:

 * <a href="OneLetterFileToSeqFile.lua">OneLetterFileToSeqFile.lua</a> : Converts a file containing an amino acid sequence in one letter code to an XEASY seq file for easy read in to CARA. It ignores case and all characters which do not code for one of the 20 standard amino acids. Copy-paste from <a href="http://www.expasy.org">ExPASy</a> or <a href="http://www.ncbi.nlm.nih.gov/">NCBI</a> website directly into a .aa file and convert to .seq file!

  * **UPDATE** 8.Apr.05: Modified so that last line of seq file is not empty.

Scripts to modify Projects (always back-up Repository before running these scripts - there is no undo!)

 * Aliases:

  * <a href="CopyAliases.lua">CopyAliases.lua</a> : Copies Spin Aliases from one spectrum to another.

   * **UPDATE** 17.Oct.05: Fixed a bug and added a flag to keep existing aliases. (t.Overwrite)

  * <a href="IsotopeShiftAliases.lua">IsotopeShiftAliases.lua</a> : Creates spin aliases for heavy atoms in a selected spectrum which are adjusted for the secondary isotope shift of the attatched deuterium atoms. This is useful for including spectra measured with perdeuterated and nondeuterated protein in the same project. Thanks to N. Keller for entering values into isotope shifts table.

  * <a href="PeakListToAliases.lua">PeakListToAliases.lua</a> : Creates Spin Aliases for a selected spectrum based on an external peaklist. Intended as a workaround for the "Peaks-Import Alias Shifts" in MonoScope when the error message "Cannot import: There are ambiguous shifts" appears. See header for details.

  * <a href="RemoveAliases.lua">RemoveAliases.lua</a> : Removes Spin Aliases from one spectrum or from all spectra of a project. (This updated version includes a menu interface so that editing the script is no longer necessary. It replaces !RemoveAllAlliases.lua (see below).

  * <a href="RemoveAllAliases.lua">RemoveAllAliases.lua</a> : Removes all Spin Aliases from a project (This script is replaced by !RemoveAliases.lua (see above).

  * <a href="ShiftSpinsAndAliases.lua">ShiftSpinsAndAliases.lua</a> : Shift a subset of selected spins and their aliases by a fixed ppm value. Can also be applied to all spins. You must edit the script header to define which project, which spins, and what the size of the ppm shift is.

 * Atoms:

  * **NEW** <a href="CorrectAtomMagnitudes.lua">CorrectAtomMagnitudes.lua</a> : Adjusts all methyl group atom magnitudes to 3 (this fixes an error in the standard template Start1.2.cara)

 * Residues:

  * <a href="LoadProtonListOntoResidues.lua">LoadProtonListOntoResidues.lua</a> : Defines expected shifts for each residue in a sequence from the proton list. User can enter the deviation from expected 1H shift (H or Q) and deviation from expected !HeteroAtom shift (C or N). This is meant to support the assignment of homologous proteins or proteins where predicted assignments are available.

 * !ResidueTypes:

  * <a href="LoadBmrbStats.lua">LoadBmrbStats.lua</a> : Updates !ResidueType Ave,Dev values from a BMRB statistics file. See header of script for details.

 * Peaks:

  * <a href="ChangePeakColorCodes.lua">ChangePeakColorCodes.lua</a> : changes the color code of a range of peak ids.

  * <a href="CopyPeakAmpToVol.lua">CopyPeakAmpToVol.lua</a> : Copies Peak Amplitudes to Volumes.

  * <a href="DeleteAssignedPeaks.lua">DeleteAssignedPeaks.lua</a> : Deletes all Assigned Peaks from a chosen Peaklist (peaks with label "?" in one or more dimensions remain)

  * <a href="HetNoe.lua">HetNoe.lua</a> : Uses a batchlist consisting of two spectra (noe & ref) to calculate the heteronuclear nOe (ratio of peaks) and stores the result in the Peak attribute *!HetNoe*. It also writes the results to a file in format suitable for excel. See the beginning of the script for instructions.

 * Spectra:

  * <a href="RecalibrateSpectra.lua">RecalibrateSpectra.lua</a> : Recalibrates all spectrum dimensions with a shift range and atom type matching the selected values by a fixed amount. E.g. To shift all alpihatic carbon dimensions by 2.5 ppm. Often used in combination with !ShiftSpinsInCatagory.lua or !ShiftSpinsAndAliases.lua.

  * <a href="ReportAllSpectrumParameters.lua">ReportAllSpectrumParameters.lua</a> : Reports all spectrum parameters for every spectrum in a project in a table written to the CARA Terminal window.

 * Systems:

  * <a href="ChangeSystemTypes.lua">ChangeSystemTypes.lua</a> : Change the System Type for a selected range of Systems. Uses a nice Menu dialog.

  * <a href="CreateOriginSystemsFromProjectedSpins-v3.lua">CreateOriginSystemsFromProjectedSpins-v3.lua</a> : Creates new spin systems using the projected spins of existing spin-systems in a selected project. E.g. you picked the spins in the (H)CCONH experiment like CA-1, CB-1, CG-1 etc. in systems i and want to create the predecessor systems i-1 containing these spins with label CA, CB, CG etc. This script will create the new spin systems i-1, fill them with spins from system i but with zero offset, and link systems i-1 as predecessors to systems i. There is an option to create only new spin-systems if they are Prolines. If the origin spin system has spins with tentative labels (?CA), these will be renamed to "?" and before copying projected spins with final labels (e.g. CA-1).

   * NOTE: *Version 3 fixes a couple of bugs in the first two releases. This one works.


  * <a href="ImportUnassignedPeaksToNewSystems.lua">ImportUnassignedPeaksToNewSystems.lua</a> : Import unassigned peaks from a 3D peaklist (two H dimensions and one !HeteroAtom dimension) to new Systems. This script creates a spinsystem for each unassigned peak with a spinlink between the 1H spins. Intended for use during Structure Refinement to inspect unassigned NOESY peaks from structure calculations.
 
  * <a href="RemoveSelectedSystems.lua">RemoveSelectedSystems.lua</a> : Removes selected spin systems from project.

 * Spins:

  * <a href="CorrectShiftsForFoldErrorInCaraBelow155.lua">CorrectShiftsForFoldErrorInCaraBelow155.lua</a> : Corrects an error in the position of folded spins resulting from an error in the contour display for CARA versions < 1.5.5. After running this script, spins should have correct shifts in folded regions using CARA versions 1.5.5 or higher. This script should be used before exporting shifts from projects for structure calculations if the assignment were obtained using CARA versions prior to 1.5.5. See the script header for details.

  * <a href="CreateProjectedSpins.lua">CreateProjectedSpins.lua</a> : Creates spins with nonzero offset (e.g CA-1 in res.2 from CA in res.1).

   * Updated June 29, 2004. Fixed a mistake & removed Project Selection if only one Project in repository.

  * <a href="CopyProjectedSpinsToOriginalSystem.lua">CopyProjectedSpinsToOriginalSystem.lua</a> : Creates spins with zero offset from offset spins (e.g. CA in res.1 from CA-1 in res.2)

  * <a href="Pick_2D_Peaks.lua">Pick_2D_Peaks.lua</a> : Finds local maxima in an HSQC15N and creates H/N spins with unique labels obtained from SpectrumType (usually "H"/"N") with the corresponding chemical shifts (contributed by Jimm Masse 3.29.2005)

  * <a href="Pick_3D_Peaks.lua">Pick_3D_Peaks.lua</a> : Finds local maxima along the strip axis of a 3D at the anchor positions H/N derived from an HSQC15N (see Pick_2D_Peaks.lua above) and creates spins with the corresponding chemical shifts (contributed by Jimm Masse 3.29.2005)

   * **UPDATED** Now includes a menu interface to select project, 3D, threshhold, spectral region, and label for the spins. Modifed by F.Damberger

   * **UPDATED** Also picks negative peaks. Modified by F.Damberger

   * **NOTE** You must define labels in the SpectrumTypes so that the script can match the corresponding dimensions of the 2D and 3D. See the script header for details.

  * <a href="RenameSpins.lua">RenameSpins.lua</a> : Renames all spins with Old Label to a New Label. E.g. to rename the amide proton spins with label "H" generated by importing a project from a BMRB file to "HN".

  * <a href="RemoveSpins.lua">RemoveSpins.lua</a> : Removes all spins with a specified Label. One can also remove ALL spins by leaving the LABEL field empty.

  * <a href="ReplaceDegenerateSpinsByGroup.lua">ReplaceDegenerateSpinsByGroup.lua</a> : Removes degenerate spins and replaces them by a Group (pseudoatom). E.g. After importing from BMRB, you have PHE HE1 7.05 HE2 7.05 and would like to replace these two spins by a single pseudoatom HE 7.05. See script header for details.

  * <a href="ShiftSpins.lua">ShiftSpins.lua</a> : Shift a subset of selected spins by a fixed ppm value  Can also be applied to all spins. You must edit the script header to define which project, which spins, and what the size of the ppm shift is.

  * <a href="ShiftSpinsInCatagory.lua">ShiftSpinsInCatagory.lua</a> : Shift a subset of selected spins by a fixed ppm value  Can also be applied to all spins. Uses a persistent menu. Select AtomType and Catagory (e.g. all aromatics, aliphatics, amides... etc.)

  * <a href="ShiftSpinsAndAliases.lua">ShiftSpinsAndAliases.lua</a> : Shift a subset of selected spins and their aliases by a fixed ppm value. Can also be applied to all spins. You must edit the script header to define which project, which spins, and what the size of the ppm shift is.

  * <a href="SparkyAssignmentsToCara.lua">SparkyAssignmentsToCara.lua</a> : Imports the chemical shift assignments from a Sparky assignment list file into a CARA project.

 * !SpinLinks:

  * <a href="CreateLinksToSuccessor.lua">CreateLinksToSuccessor.lua</a> : Create Spinlinks between Spins with a certain Label in a System and a Spin with another Label in the Successor System. See Header for Details.

  * <a href="DeleteAllSpinLinks.lua">DeleteAllSpinLinks.lua</a> : Deletes all Spinlinks in selected Project.

   * Updated June 24, 2004.

  * <a href="ImportLinksFromPeakList.lua">ImportLinksFromPeakList.lua</a> : Creates Spinlinks in a Project from a NOESY Peaklist.

  * <a href="HideLinksInSpectrum.lua">HideLinksInSpectrum.lua</a> : Hides spinlinks in a selected spectrum. (Turns visibility off for this spectrum).

  * <a href="UplsToSpinLinks.lua">UplsToSpinLinks.lua</a> : Reads UPL file due to a specific NOESY spectrum and creates Spin Links visible in that NOESY Spectrum. Spin Link Parameters are modified so that Spin Link Rating = Constraint Distance, Code = Peak Number (peak used to derive UPL). Intended to support the analysis of structure calculations with Cara.

   * **UPDATED** 17.08.2004. Includes 3D 13C-resolved ![1H,1H]-!NOESYs in Spectrum Selection Dialog now.

  * <a href="DeleteSpinLinksWithinSequenceFragment.lua">DeleteSpinLinksWithinSequenceFragment.lua</a> : Script to delete all spinlinks within a defined sequence fragment. E.g. I want to delete all the spinlinks within the fragment from residue 1 to residue 50.

 * Other:

  * <a href="printkeycode.lua">printkeycode.lua</a> : returns the code of the pressed key (trivial).


Return to Main CALUA page

Scripts to write Analysis Reports to Script Window or to File:

  • AssignmentReport.lua : Writes out a report of chemical shift assignments to either terminal window or to a file. Identifies unusual shifts. It is possible to filter for only missing assignments (H atoms only or also heteroatoms).
    • UPDATE 20.May 05: Fixed a bug which occured if NOT all residues were assigned. Error message was: "line 83: attempt to index field Sys (a nil value)".
    • UPDATE 4.6.06: Includes a nice user-interface which remembers settings. Gives average offsets from random coil values. Allows user to set minimum SD to report outlier shifts. This is the version included in the latest template Start1.2.cara.
    • UPDATE 19.6.07: Fixed a bug which occured when there is only one project Error message was "No projects found in repository". Added a summary of pseudoatom conflicts (assignment of both the real atom HB2 and pseudoatom HB is reported in a warning).
  • CalcMassOfLabeledMolecule.lua : Calculates the molecular weight of a sequence in a project assuming the isotope-enrichment and percent d2o entered by the user. 2H, 13C, and 15N are available by default. Other nuclei can be accessed by commenting in an option at the top of the script.
    • UPDATED It now includes a checkbox to calculate the expected mass for mass-spectrometry and can also calculate the mass in solution for a given pH.
  • ChemShiftDeviationsFile.lua : Writes a file containing Chemical Shift Deviations from the average values stored in the repository library. See also ChemShiftDeviationsPlot.lua
  • ExportAllSpins.lua : Writes a file containing an atom list in XEASY format. All spins in the selected project are included (also CA-1 etc)
  • HetNoe.lua : Uses a batchlist consisting of two spectra (noe & ref) to calculate the heteronuclear nOe (ratio of peaks) and stores the result in the Peak attribute HetNoe. It also writes the results to a file in format suitable for excel. See the beginning of the script for instructions.
  • ReportSpinsWithColorNinPeakList.lua : Writes out a text file containing spins which occur more than N times in a peak with color C in peaklist P. (User enters N,C & P).
  • SideChainDeviations.lua : Writes out a report of average deviation of chemical shifts from each residue normalized to the standard deviation of the database versus residue number (H atoms only or also heteroatoms).
  • WriteShiftsInColumns.lua : Writes out shifts for selected atoms into columns, one line per residue. The user can edit a table at the beginning of the script to define which atoms shifts are written out. Currently: "H", "HA", "CA", "CB".

Scripts to Plot Data:

  • graphDemo.lua : plots amide exchange data for a given peak and peaklist. It assumes a batchlist setup as described in BatchIntegration?. Basically reproduces the function Show Peakcurve in MonoScope? Integrator menu.
  • ChemShiftDeviationsPlot.lua : Plots deviations from random coil shifts for a particular atom (like CA). See ChemShiftDeviationsPlot? for details and some screenshots.
  • multiplespectrumview.lua : overlay contour plots for any number of 2D spectra and a peaklist, colors are fully customizable. Use Shift-Ctrl Click drag to Zoom and Home key to restore to full ppm range.

    NOTE: It is now possible to overlay contours in different colors in PolyScope? (and to plot them in PrintPreview?). See Release 1.1.4. This script is kept here as a demonstration of how to use LUA to build custom scopes.

    • UPDATE: Some new features like customizable contour parameters, background color, ... See MultipleSpectrumView? for details and some screenshots.
    • UPDATE: Modified to work with several projects, autocontour or constant threshhold mode, peak label display (not spin numbers) multiplespectrumview2.lua
    • UPDATE: Increased functions to navigate and expand contract view, included cursor display, a peaklist bug fix. multiplespectrumview3.lua
      • Fixed a bug which read the peaklist indexes incorrectly (versions 1 & 2 displayed the wrong peaklist if the peakID numbers where not consecutively numbered).
      • Added navigation functions: Ctrl-click-drag to shift plot region, PageUp, PageDown to go up/down one region, Ctrl-PageUp/Ctrl-PageDown to go left/right one region.
      • Added Expand/Contract 2X functions: Shift-Ctrl-UpArrow to expand displayed region vertically, Shift-Ctrl-DownArrow to contract displayed region vertically, Shift-Ctrl-LeftArrow to expand horizontally, Shift-Ctrl-RightArrow to contract horizontally.
  • Display1DSlice.lua : Generates a 1D slice plot of Dim2 from a 3D for a given residue with HN(Dim1) and N(Dim3). Makes use of Slice Buffers.
  • GetSliceFrom1D.lua : Gets a slice from a 1D spectrum. You can plot the slice, send the ppm,intensity values to the terminal, or send the ppm,intensity values to a file for plotting in external programs.

Scripts to Export Data:

  • Analysis Reports to Script Window or to File:
    • AssignmentReport.lua : Writes out a report of chemical shift assignments to either terminal window or to a file. Identifies unusual shifts. It is possible to filter for only missing assignments (H atoms only or also heteroatoms).
      • UPDATE 20.May 05: Fixed a bug which occured if NOT all residues were assigned. Error message was: "line 83: attempt to index field Sys (a nil value)".
      • UPDATE 4.6.06: Includes a nice user-interface which remembers settings. Gives average offsets from random coil values. Allows user to set minimum SD to report outlier shifts. This is the version included in the latest template Start1.2.cara.
    • CalcMassOfLabeledMolecule.lua : Calculates the molecular weight of a sequence in a project assuming the isotope-enrichment and percent d2o entered by the user. 2H, 13C, and 15N are available by default. Other nuclei can be accessed by commenting in an option at the top of the script.
      • UPDATED 8.11.07: It now includes a checkbox to calculate the expected mass for mass-spectrometry and can also calculate the mass in solution for a given pH.
    • ChemShiftDeviationsFile.lua : Writes a file containing Chemical Shift Deviations from the average values stored in the repository library. See also ChemShiftDeviationsPlot.lua
    • ExportAllSpins.lua : Writes a file containing an atom list in XEASY format. All spins in the selected project are included (also CA-1 etc)
    • ReportSpinsWithColorNinPeakList.lua : Writes out a text file containing spins which occur more than N times in a peak with color C in peaklist P. (User enters N,C & P).
    • SideChainDeviations.lua : Writes out a report of average deviation of chemical shifts from each residue normalized to the standard deviation of the database versus residue number (H atoms only or also heteroatoms).
    • WriteAssignments.lua : Writes out assignments for BMRB, DYANA, CYANA or XEASY (see "Export File for a Program" for details)
    • WriteShiftsInColumns.lua : Writes out shifts for selected atoms into columns, one line per residue. The user can edit a table at the beginning of the script to define which atoms shifts are written out. Currently: "H", "HA", "CA", "CB".
  • Export File for a Program:
    • ATNOS/CANDID & DYANA or CYANA2.0
      • ExportSpinLinksToUpls.lua : Writes a UPL file in CYANA format containing one UPL for each spinlink connecting the atoms corresponding to the linked spins. The upper distance limits are all set to 5.0 Angstroms. This script can be used together with UplsToSpinLinks.lua in order to transfer spinlinks from one project to another. Thanks to D. Frueh for this contribution.
      • WriteAssignments.lua : Writes out assignments in a nomenclature consistent for structure calculations using ATNOS/CANDID together with DYANA or CYANA2.0 (seq and prot files). Can also write out assignments for submission to BMRB. This is the successor to WriteAssignmentsInFormatX.lua. The main new feature is that WriteAssignments.lua can write out alias shifts for a selected spectrum.
        • UPDATED 30.10.07: BMRB format now writes out one line for each atom with a degenerate shift.
      • WriteAssignmentsInFormatX.lua : Writes out assignments in a nomenclature consistent for structure calculations using ATNOS/CANDID together with DYANA or CYANA2.0 (seq and prot files). Can also write out assignments for submission to BMRB.
    • EXCEL
      • WriteBatchTable.lua : Write out a table from a batch integration into a text file (for EXCEL).
      • HetNoe.lua: Uses a batchlist consisting of two spectra (noe & ref) to calculate the heteronuclear nOe (ratio of peaks) and stores the result in the Peak attribute HetNoe. It also writes the results to a file in format suitable for excel. See the beginning of the script for instructions. See the beginning of the script for instructions.
        • UPDATE: Improved User interface, output format and introduced the option to write out the spectrum-dependent parameter (e.g. MixTime, ExchTime)
      • WriteTitrationCurveDataToFile.lua : Writes chemical shift values of spins with a user-selected label for a series of spectra into a spreadsheet file. (shifts are taken from the alias values in each spectrum). See header for details.
        • UPDATE 2.Jan.05: Fixed an error in line "t.Line = LineTable..." and added dialog for Project selection and entry of ProtonListName
    • MARS
    • MOLMOL
      • ShowNoesInMolmol.lua : Writes out a molmol macro which highlights a selected target atom in cyan and all candidate atoms within a tolerance range of a user-determined chemical shift. Useful for NOE assignment during structure refinement. See header for details
    • PACES
      • ExportToPaces.lua : Writes out a comma-separated list of HN,N,CA,CB chemical shifts for import into Excel and use with PACES.
        • UPDATE 20. May 05: Adjusted formatting to more closely adhere to PACES. Included CO, CO-1, HA, HA-1.
    • SPARKY
    • XEASY
      • WriteProtonList.lua : Writes out an xeasy-formatted proton list for a project (no unassigned "999.000" atoms included)
      • PeakListNumberedByResidue.lua : Write out a peaklist where the peaknumber corresponds to the residue number for a specific atom in each dimension. E.g. you want to write out a peaklist for an HSQC15N where each residue gives rise to a peak (HN/N) whose peaknumber corresponds to the residue number. This is useful for plotting the results of NH dynamics or exchange vs. sequence.
    • X-PLOR
      • ExportToXplor.lua : Converts spinlinks from a project into upper distance limits with the maximum distance (5.5A) Thanks to S. Ilin for this contribution.
  • Write out spectral data:
    • Display1DSlice.lua : Writes out a report to terminal window or to a file containing ppm, intensity values for a 1D slice along Dim2 of a 3D spectrum with HN in Dim1 and N in Dim3. See also Scripts to plot data.
    • GetSliceFrom1D.lua : Gets a slice from a 1D spectrum. You can plot the slice, send the ppm,intensity values to the terminal, or send the ppm,intensity values to a file for plotting in external programs.

Scripts to convert external files:

  • OneLetterFileToSeqFile.lua : Converts a file containing an amino acid sequence in one letter code to an XEASY seq file for easy read in to CARA. It ignores case and all characters which do not code for one of the 20 standard amino acids. Copy-paste from ExPASy or NCBI website directly into a .aa file and convert to .seq file!
    • UPDATE 8.Apr.05: Modified so that last line of seq file is not empty.

Scripts to modify Projects (always back-up Repository before running these scripts - there is no undo!)

  • Aliases:
    • CopyAliases.lua : Copies Spin Aliases from one spectrum to another.
      • UPDATE 17.Oct.05: Fixed a bug and added a flag to keep existing aliases. (t.Overwrite)
    • IsotopeShiftAliases.lua : Creates spin aliases for heavy atoms in a selected spectrum which are adjusted for the secondary isotope shift of the attatched deuterium atoms. This is useful for including spectra measured with perdeuterated and nondeuterated protein in the same project. Thanks to N. Keller for entering values into isotope shifts table.
    • PeakListToAliases.lua : Creates Spin Aliases for a selected spectrum based on an external peaklist. Intended as a workaround for the "Peaks-Import Alias Shifts" in MonoScope? when the error message "Cannot import: There are ambiguous shifts" appears. See header for details.
    • RemoveAliases.lua : Removes Spin Aliases from one spectrum or from all spectra of a project. (This updated version includes a menu interface so that editing the script is no longer necessary. It replaces RemoveAllAlliases.lua (see below).
    • RemoveAllAliases.lua : Removes all Spin Aliases from a project (This script is replaced by RemoveAliases.lua (see above).
    • ShiftSpinsAndAliases.lua : Shift a subset of selected spins and their aliases by a fixed ppm value. Can also be applied to all spins. You must edit the script header to define which project, which spins, and what the size of the ppm shift is.
  • Atoms:
    • NEW CorrectAtomMagnitudes.lua : Adjusts all methyl group atom magnitudes to 3 (this fixes an error in the standard template Start1.2.cara)
  • Residues:
    • LoadProtonListOntoResidues.lua : Defines expected shifts for each residue in a sequence from the proton list. User can enter the deviation from expected 1H shift (H or Q) and deviation from expected HeteroAtom shift (C or N). This is meant to support the assignment of homologous proteins or proteins where predicted assignments are available.
  • ResidueTypes:
    • LoadBmrbStats.lua : Updates ResidueType Ave,Dev values from a BMRB statistics file. See header of script for details.
  • Peaks:
    • ChangePeakColorCodes.lua : changes the color code of a range of peak ids.
    • CopyPeakAmpToVol.lua : Copies Peak Amplitudes to Volumes.
    • DeleteAssignedPeaks.lua : Deletes all Assigned Peaks from a chosen Peaklist (peaks with label "?" in one or more dimensions remain)
    • HetNoe.lua : Uses a batchlist consisting of two spectra (noe & ref) to calculate the heteronuclear nOe (ratio of peaks) and stores the result in the Peak attribute HetNoe. It also writes the results to a file in format suitable for excel. See the beginning of the script for instructions.
  • Spectra:
    • RecalibrateSpectra.lua : Recalibrates all spectrum dimensions with a shift range and atom type matching the selected values by a fixed amount. E.g. To shift all alpihatic carbon dimensions by 2.5 ppm. Often used in combination with ShiftSpinsInCatagory.lua or ShiftSpinsAndAliases.lua.
    • ReportAllSpectrumParameters.lua : Reports all spectrum parameters for every spectrum in a project in a table written to the CARA Terminal window.
  • Systems:
    • ChangeSystemTypes.lua : Change the System Type for a selected range of Systems. Uses a nice Menu dialog.
    • CreateOriginSystemsFromProjectedSpins-v3.lua : Creates new spin systems using the projected spins of existing spin-systems in a selected project. E.g. you picked the spins in the (H)CCONH experiment like CA-1, CB-1, CG-1 etc. in systems i and want to create the predecessor systems i-1 containing these spins with label CA, CB, CG etc. This script will create the new spin systems i-1, fill them with spins from system i but with zero offset, and link systems i-1 as predecessors to systems i. There is an option to create only new spin-systems if they are Prolines. If the origin spin system has spins with tentative labels (?CA), these will be renamed to "?" and before copying projected spins with final labels (e.g. CA-1).
      • NOTE: *Version 3 fixes a couple of bugs in the first two releases. This one works.
    • ImportUnassignedPeaksToNewSystems.lua : Import unassigned peaks from a 3D peaklist (two H dimensions and one HeteroAtom dimension) to new Systems. This script creates a spinsystem for each unassigned peak with a spinlink between the 1H spins. Intended for use during Structure Refinement to inspect unassigned NOESY peaks from structure calculations.
    • RemoveSelectedSystems.lua : Removes selected spin systems from project.
  • Spins:
    • CorrectShiftsForFoldErrorInCaraBelow155.lua : Corrects an error in the position of folded spins resulting from an error in the contour display for CARA versions < 1.5.5. After running this script, spins should have correct shifts in folded regions using CARA versions 1.5.5 or higher. This script should be used before exporting shifts from projects for structure calculations if the assignment were obtained using CARA versions prior to 1.5.5. See the script header for details.
    • CreateProjectedSpins.lua : Creates spins with nonzero offset (e.g CA-1 in res.2 from CA in res.1).
      • Updated June 29, 2004. Fixed a mistake & removed Project Selection if only one Project in repository.
    • CopyProjectedSpinsToOriginalSystem.lua : Creates spins with zero offset from offset spins (e.g. CA in res.1 from CA-1 in res.2)
    • Pick_2D_Peaks.lua : Finds local maxima in an HSQC15N and creates H/N spins with unique labels obtained from SpectrumType? (usually "H"/"N") with the corresponding chemical shifts (contributed by Jimm Masse 3.29.2005)
    • Pick_3D_Peaks.lua : Finds local maxima along the strip axis of a 3D at the anchor positions H/N derived from an HSQC15N (see Pick_2D_Peaks.lua above) and creates spins with the corresponding chemical shifts (contributed by Jimm Masse 3.29.2005)
      • UPDATED Now includes a menu interface to select project, 3D, threshhold, spectral region, and label for the spins. Modifed by F.Damberger
      • UPDATED Also picks negative peaks. Modified by F.Damberger
      • NOTE You must define labels in the SpectrumTypes? so that the script can match the corresponding dimensions of the 2D and 3D. See the script header for details.
    • RenameSpins.lua : Renames all spins with Old Label to a New Label. E.g. to rename the amide proton spins with label "H" generated by importing a project from a BMRB file to "HN".
    • RemoveSpins.lua : Removes all spins with a specified Label. One can also remove ALL spins by leaving the LABEL field empty.
    • ReplaceDegenerateSpinsByGroup.lua : Removes degenerate spins and replaces them by a Group (pseudoatom). E.g. After importing from BMRB, you have PHE HE1 7.05 HE2 7.05 and would like to replace these two spins by a single pseudoatom HE 7.05. See script header for details.
    • ShiftSpins.lua : Shift a subset of selected spins by a fixed ppm value Can also be applied to all spins. You must edit the script header to define which project, which spins, and what the size of the ppm shift is.
    • ShiftSpinsInCatagory.lua : Shift a subset of selected spins by a fixed ppm value Can also be applied to all spins. Uses a persistent menu. Select AtomType? and Catagory (e.g. all aromatics, aliphatics, amides... etc.)
    • ShiftSpinsAndAliases.lua : Shift a subset of selected spins and their aliases by a fixed ppm value. Can also be applied to all spins. You must edit the script header to define which project, which spins, and what the size of the ppm shift is.
    • SparkyAssignmentsToCara.lua : Imports the chemical shift assignments from a Sparky assignment list file into a CARA project.
  • SpinLinks:
    • CreateLinksToSuccessor.lua : Create Spinlinks between Spins with a certain Label in a System and a Spin with another Label in the Successor System. See Header for Details.
    • DeleteAllSpinLinks.lua : Deletes all Spinlinks in selected Project.
      • Updated June 24, 2004.
    • ImportLinksFromPeakList.lua : Creates Spinlinks in a Project from a NOESY Peaklist.
    • HideLinksInSpectrum.lua : Hides spinlinks in a selected spectrum. (Turns visibility off for this spectrum).
    • UplsToSpinLinks.lua : Reads UPL file due to a specific NOESY spectrum and creates Spin Links visible in that NOESY Spectrum. Spin Link Parameters are modified so that Spin Link Rating = Constraint Distance, Code = Peak Number (peak used to derive UPL). Intended to support the analysis of structure calculations with Cara.
      • UPDATED 17.08.2004. Includes 3D 13C-resolved [1H,1H]-NOESYs in Spectrum Selection Dialog now.
    • DeleteSpinLinksWithinSequenceFragment.lua : Script to delete all spinlinks within a defined sequence fragment. E.g. I want to delete all the spinlinks within the fragment from residue 1 to residue 50.
  • Other: