This directory contains an example for automated peak picking with
CYPICK using the example of a 2D 15N-HSQC spectrum. 
=============================================================================================

read spectrum filename

---------------------------------------------------------------------------------------------
filename=string(required)

name of the spectrum file. In case of xeasy two files will be read; a XEASY parameter file called filename.3D.param and the data file filename.3D.16. In case of azara also two files will be read; an azara parameter file called filename.spc.par and the data file filenam.spc. In case of bruker format a parameter file for each dimension is read. The parameter file has to have the name proc for first dimension, proc2s for the second dimension, proc3s for the third dimension and so on. Tha data file usually has no suffix. In case of ucsf data format all the information are stored in a single data file called filename.ucsf.
---------------------------------------------------------------------------------------------
type=string (required)

type specifies the format of the spectral data file and can be azara, bruker, ucsf, or xeasy.
---------------------------------------------------------------------------------------------
format=string(required)

format refers to the experimental definition of the spectrum within the CYANA library file, e.g. a 13C-resolved NOESY spectrum is defined as: format="C13NOESY H HC C". The order of the atoms has to be the same as they are stored in the parameter file of the spectrum or the header of the intensity file.
---------------------------------------------------------------------------------------------
header=option

Only the header of the spectrum is read.
---------------------------------------------------------------------------------------------
EXAMPLE: A 3D 13C-resolved NOESY spectrum can be read by the following literal CYANA input:
read spectrum C13NOESY type=xeasy format="C13NOESY H HC C"
---------------------------------------------------------------------------------------------
EXAMPLE: The header of a 3D 13-resolved NOESY spectrum can be read by the following literal CYANA input:
read spectrum C13NOESY header
=============================================================================================

write spectrum filename

This command converts a spectrum in memory to another spectral format.
---------------------------------------------------------------------------------------------
filename=string(required)
---------------------------------------------------------------------------------------------
format=string(required)

format can either be ucsf or bruker.
---------------------------------------------------------------------------------------------
EXAMPLE: A 3D 13C-resolved NOESY spectrum can be written to ucsf format by the following literal CYANA input:
write spectrum C13NOESY format=ucsf
=============================================================================================

spectrum noise global

Calculates the global noise level of the spectrum.

=============================================================================================

spectrum noise local 

Calculates the local noise at each data point of the spectrum. 

=============================================================================================

spectrum pick contour

---------------------------------------------------------------------------------------------
method=string (optional, default: diag)

method specifies the condition for local extremum determination. Provided modes are 'diag' (all neighbors of a data point are considered) and 'nodiag' (only direct neighbors of a data point are considered). 

---------------------------------------------------------------------------------------------
scale=float list (required)

scale is used to specify the scaling factor of the spectral axes. The individual scaling factors have to be provided in the same order as specified in 'format' (read spectrum command), explained above. Individual values are separated by ``,'', e.g. scale=0.03,0.03,0,4

---------------------------------------------------------------------------------------------
contourdim=string list (required)

contourdim defines the 2D plane(s) to be analyzed. Contour lines can only be created in 2D.  Dimensions for which contour lines should be created have to be provided by the user following the CYANA library (lib/cyana.lib) nomenclature, e.g. contourdim=HC,C

---------------------------------------------------------------------------------------------
peakarea=integer (optional, default 7 for each dimension)

'peakarea' defines the size of the box around a local maximum within which contour lines are created and analyzed. The size of 'peakarea' can be provided by the user. Smaller values lead to a faster scanning of the spectrum. For  peak picking it is vital to choose a sufficiently large 'peakarea' otherwise it does not influence the outcome of the algorithm. 

---------------------------------------------------------------------------------------------
basefactor=real (optional, default 3.0)

'basefactor' is the multiplication factor for the noise level to give the intensity of the first contour line.

---------------------------------------------------------------------------------------------
factor=real (optional, default=1.3)

'factor' is a multiplication factor for determining the intensity of the next higher contour line by multiplying with the intensity of current contour line. 
 
---------------------------------------------------------------------------------------------
userglobal=real (optional)

Instead of calculating the global noise level using the CYANA command 'spec noise' the user can set the noise level explicitly instead.

---------------------------------------------------------------------------------------------
pickrange=float list (optional, default: minimal and maximal chemical shifts)

'pickrange' specifies the spectral range in ppm that is picked. Ranges belonging to different dimensions can be separated by ``,''. The order of the ranges specified has to correspond to the order of the dimensions given in 'format', e.g. pickrange=1.0..10.0,2.0..11.0,0.0..75.0. If one wants to select the complete spectral range in for example dimension 1, one can write: pickrange=,2.0..11.0,0.0..75.0.

---------------------------------------------------------------------------------------------
only_pos or only_neg (option)

If the option 'only_pos' is given only positive signals are considered, else if the option only_neg is given only negative signals are considered. Is none of these two options set, both negative and positive signals are included in the analysis. 

---------------------------------------------------------------------------------------------
half_pixel_cal (option)

There are two ways of interpreting the maximal chemical shift of the spectrum, usually given in ppm: (i) interpreting the chemical shift as ppm of the edge of the spectrum, i.e. the left side of the left pixel, or (ii) the center of the first pixel.  If the option 'half_pixel_cal' is set, the maximal chemical shift is construed as explained in (ii). 

---------------------------------------------------------------------------------------------
sol=string list (optional)

'sol' specifies the dimension(s) that has(have) a solvent signal which should be excluded. The axis label has to follow the nomenclature of the 'format' specification, e.g. sol=HC,H. The order is irrelevant in this case.

---------------------------------------------------------------------------------------------
waterline=float list (optional, default 4.7)

'waterline' determines the region of the solvent signal to be excluded in ppm. Different positions can be indicated for varying dimensions but have to follow the order given in 'sol', e.g. waterline=4.7,4.6

---------------------------------------------------------------------------------------------
water_tol=float list (optional, default 0.04)

'water_tol' represents the tolerance range for solvent region to be excluded in ppm, i.e.'waterline' +- 'water_tol'. Different tolerances can be indicated for varying dimensions but have to follow the order given in 'sol', e.g. waterline=0.5,0.3

---------------------------------------------------------------------------------------------
include_diagonal (option)

If the option include_diagonal is set diagonal peaks of corresponding dimensions are picked.

---------------------------------------------------------------------------------------------
diagonal_tol=float (optional, default 0.2)

Offset for picking diagonal peaks.

=============================================================================================

spectrum pick filter

---------------------------------------------------------------------------------------------
method=string (optional, default: diag)

see command 'spectrum pick contour'

---------------------------------------------------------------------------------------------
scale=float list (required)

see command 'spectrum pick contour'

---------------------------------------------------------------------------------------------
contourdim=string list (required)

see command 'spectrum pick contour'

---------------------------------------------------------------------------------------------
peakarea=integer (optional, default 7 for each dimension)

see command 'spectrum pick contour'

---------------------------------------------------------------------------------------------
basefactor=real (optional, default 3.0)

see command 'spectrum pick contour'

---------------------------------------------------------------------------------------------
factor=real (optional, default=1.3)

see command 'spectrum pick contour' 
 
---------------------------------------------------------------------------------------------
userglobal=real (optional)

see command 'spectrum pick contour'

---------------------------------------------------------------------------------------------
pickrange=float list (optional, default: minimal and maximal chemical shifts)

see command 'spectrum pick contour'

---------------------------------------------------------------------------------------------
only_pos or only_neg (option)

see command 'spectrum pick contour'

---------------------------------------------------------------------------------------------
half_pixel_cal (option)

see command 'spectrum pick contour'

---------------------------------------------------------------------------------------------
sol=string list (optional)

see command 'spectrum pick contour'

---------------------------------------------------------------------------------------------
waterline=float list (optional, default 4.7)

see command 'spectrum pick contour'

---------------------------------------------------------------------------------------------
water_tol=float list (optional, default 0.04)

see command 'spectrum pick contour'

---------------------------------------------------------------------------------------------
include_diagonal (option)

If the option include_diagonal is set diagonal peaks of corresponding dimensions are picked.

---------------------------------------------------------------------------------------------
diagonal_tol=float (optional, default 0.2)

see command 'spectrum pick contour'

---------------------------------------------------------------------------------------------
piktol=float list (required)
 
Via piktol the tolerance range (in ppm) for accepting peaks that are close to the position o the frequency filter can be defined, e.g. piktol=0.01,0.01,0.1. The order of the tolerances has to follow the specification in 'format'.
---------------------------------------------------------------------------------------------
reference=string list (required)

'reference' specifies the axis labels of the frequency filter (peak list), i.e. in case of using a 15N-HSQC peak list one has to specify reference=H,N.
---------------------------------------------------------------------------------------------
dimensions=string list (required)

'dimension' specifies the axis labels of the spectrum that are equivalent to the ones specified in 'reference', i.e. in case of using a 15N-HSQC-NOESY peak list one has to specify dimensions=HN,N, whereas dimensions=N,HN is incorrect.
=============================================================================================
EXAMPLE macro:

PICK.cya: automatic global noise estimation, contour peak picking
PICK_filter.cya: restricted peak picking using a 15NHSQC peak list as filter and picking a 15NHSQC spectrum using the contour approach
PICK_bruker.cya: example for reading and picking bruker spectra
