**What it does**

This tool trains a signal predictor using support vector machines
(SVMs) with pre-selected kernels for the selected signal.  As input it
takes sequence (a genome information object (GIO) file) and labels
(ie, genomic locations; in SPF format).  The tool performs the
following steps:


1. Labeled candidates (from the SPF file) are sampled into five splits
to perform five-fold cross-validation.  Examples of 3 of these splits
are used for training, the forth set is used for model selection and
the fives set is used for testing. The sets are permutated such that
eventually unbiased predictions are generated for each single position
in the SPF file.

2. Around each candidate, a sequence window (of pre-specified extent)
is copied from the genomic sequence.  This window serves as input for
the SVM.  The SVM is trained to optimally distinguish sequences
accociateds with positive examples from negative ones.

The training time depends on the number of labeled examples and on the
selected signal. For instance, for splice sites using 1 million
labeled examples, training takes about 1h.

------

**Output**

The output is an internal data structure (TSP file) that can be used
with 'SignalPredict' in order to perform predictions on genomic
sequences.

--------

**Example**

When providing a genome information file containing a chromosome with
name 'CHR1', selects 'Acceptor Splice Site' and provides a label file
in SPF format::

   ...
   CHR1	acc	label	13099	-	-1.000
   CHR1	acc	label	13105	-	-1.000
   CHR1	acc	label	13160	-	-1.000
   CHR1	acc	label	13165	-	-1.000
   CHR1	acc	label	13173	-	1.000
   CHR1	acc	label	13225	-	-1.000
   CHR1	acc	label	13321	-	-1.000
   CHR1	acc	label	13329	-	-1.000
   CHR1	acc	label	13334	-	-1.000
   ...

then one obtains a trained signal predictor (in TSP format). The
trained signal predictor is stored in internal data structures which
are displayed as::

  Trained "acc" classifier
   * based on 981051 labeled examples (31199 positive, 949852 negative)
   * using 5-fold cross-validation for model-selection from 1 models (inner cv loop)
   * using 5-fold cross-validation for obtaining unbiased predictions (outer cv loop)

  Performance
   * Average area under ROC curve on test splits: 0.986
   * Average area under PRC curve on test splits: 0.856


------

**About formats**


**GIO format** Genome Information Object is an internal format used to
store relevant information about the considered genome (as extracted
from a FASTA file). Includes for example number and length of
chromosomes/contigs. File is generated by applying the GenomeTool.

**SPF format** Signal Prediction format is designed to provide
information such as labels or predictions for specific genomic
locations (with strand information). It requires exactly six
fields::

    1. chrom - The name of the chromosome (e.g. chr1, chrY_random).
    2. signalName - possible choices include tss, tis, acc, don, cdsStop, cleave.
    3. scoreName - possible choices include label, output, Conf, Conf_Cum
    4. chromPos - The position in the chromosome. (The first base in a chromosome is numbered 1.)
    5. strand - Defines the strand - either '+' or '-'.
    6. score - The score between -infinity and infinity. If scoreName is 'label', then the score should be either -1 or 1.


**TSP format** Trained Signal Predictor is an internal structure that contains the trained model for a given signal.
