Input and output formats

IN PROGRESS

File with parameters

The first line of the input contains two numbers, the number of functions $F$ and the maximum value of the window-size $W$. Next $F$ lines contains $W+1$ real numbers that describes the weight function of the HERD algorithm. The function in $i$-th function have number $i$. The function with number $0$ is the constant function $f(i)=1$.

The rest of the input contain the description of the runs, one line per line. The run is described by four numbers: the window-size, penalty $\gamma$, posterior weight $\beta$ and the number of weighting function.

Example:

 2 4
 1 0.9 0.8 0.7 0.6
 1 0.9 0.3 0.2 0.01
 5 3 0 0
 5 2 1 1
 5 4 10000 0

Input sequences

One sequence per line.

Example:

 ACTCGCTAGCTAGTCGATGCT
 GCTAGCTAGTCGTAGCTAGTCGTACGT
 GCTAGTCAGTCGATGCTAGTCAGCTAGTCAGTCGATGCTAGC

HMM file

The first line of the input contains the numbers, the number of states $N$ and the number of colors $C$. The first line follows $n$ description of the states.

Each description of the state begins with the line with four numbers: the number of the state, the row of the state, the column of the state and the type of the state (the last three values are important only to jumping HMM). The next two line contains the emissions probabilities and log of the emission probabilities (the number of emissions and the emissions). The next line contains the number of transitions and the rest of the state description is followed by the description of transitions: initial state, final state, probability, log of the probability.

After the description of the states, there is the number X and the next X lines contains the pairs (number of the color, label of the color).

Example:

 9 2

 0 0 0 0
 0
 0
 1
 0 1 1 0 

 1 0 0 0 
 2 0.5 0.5
 2 -0.69314718055994530941  -0.69314718055994530941
 2
 1 1 0.95 -0.05129329438755053342
 1 2 0.05 -2.99573227355399099343 

 2 1 0 0
 2 0 1
 2 -inf 0
 2
 2 3 0.9 -0.10536051565782630122
 2 8 0.1 -2.30258509299404568401

 3 1 0 0 
 2 0 1
 2 -inf 0
 1
 3 4 1 0 

 4 1 0 0
 2 0.1 0.9
 2 -2.30258509299404568401 -0.10536051565782630122
 2
 4 4 0.95 -0.05129329438755053342
 4 5 0.05 -2.99573227355399099343 

 5 1 0 0
 2 0.1 0.9
 2 -2.30258509299404568401 -0.10536051565782630122
 2
 5 5 0.9 -0.10536051565782630122
 5 6 0.1 -2.30258509299404568401 

 6 1 0 0
 2 0 1
 2 -inf 0
 1
 6 7 1 0 

 7 1 0 0 
 2 0 1
 2 -inf 0
 1
 7 1 1 0 

 8 1 0 0 
 0
 0
 0

 2
 0 e
 1 i

Output format