# annotation setting file
#
# lines start with "//" and "#" are recognized as comments.
# letters after "//" in a line are also recognized as comments.
#
# following keywords can be used for the "message", and "TogoMD_***" parameters in the "annotation blocks."
#
# $NUM_FORMULA_ALL              // number of formula in the all search results.
# $NUM_FORMULA_COMPOUND         // number of formula in the search results from compound databases.
# $NUM_FORMULA_PREDICTED        // number of formula in the search results from formula databases.
# $NUM_FORMULA_OTHER_PREDICTED  // number of formula in the search results from formula databases that are not
#                               // included in the search results from compound databases.
# 
# $NAME_TOP                     // name of the "top hit" compound.
#                               // the "top hit" compound is the one that have the least absolute delta ppm in default.
#                               // the parameter "topSelection" can define the "top hit".
# 
# $DBID_TOP                     // "DatabaseName:ID" for the top "hit compound"
# $FORMULA_COMPOUND_TOP         // formula of the "top hit" compound in the compound database search results.
# $FORMULA_PREDICTED_TOP        // formula of the "top hit" candidate in the formula databases search results.
# $FORMULA_ALL_DB_TOP           // formula of the "top hit" candidate in the all search results.
# 
# $NAME_ALL                     // names of all compounds. concatenated by a separator ", "
# $DBID_ALL                     // "DatabaseName:ID" of all compounds. concatenated by ", "
# $FORMULA_COMPOUND_ALL         // formula of all compounds in the compound database search results. contatenated by
#                               // ", "
# $FORMULA_PREDICTED_ALL        // formula of all candidates in the formula database search results. concatenated by
#                               // ", "
# $FORMULA_ALL_DB_ALL           // formula of all candidates in the all search results. concatenated by ", "
#
#
# following conditions are used in the annotation blocks to judge if the set of search results fulfils the condition.
#
# singleRecordForEachCompoundDb     // only a single result is found for each database in the results from 
#                                   // compound database searching.
# singleFormulaForAllCompoundDb     // only a single formula is found in the results from compound database searching.
# singleFormulaForAllDb             // only a single formula is found in the results from all database searching.
# existsResultsForCompoundDb        // At least one search result is found in the compound database searching.
# existsResultsForFormulaPrediction // At least one search result is found in the formula database searching.
# existsOtherPredictedFormula       // At least one search result is found in the formula database searching, 
#                                   // but it is not found in the compound database searching.
#
# * the condition that is not explicitly defined as true or false is not used for the judgement. 
# the valid annotation blocks start with ">true" are estimated in the order.
# if an block fulfiles all the conditions, the estimation terminates.
# then the massage, in which the keywords are relpaced with the corresponding values, is recorded in the 
# Annotation field (short title) of PowerFT data.

>default                        // the block starts with ">default" (default block)
                                // defines a basal settings affect for the other blocks start with ">" 
                                // (annotation block)

isNameTrim = 50                 // long text for compound names will be trimed at the position defined
                                // by this parameter. when the text is trimmed, "..." will be attached
                                // at the end of the trimmed text.
                                // if 0 is set, trimming is not performed.

topSelection = delta_ppm        // definition of the "top hit" compound (or formula)
                                // delta_ppm: the one having least absolute delta ppm (default)
                                // delta_ratio13c: the one having least deferences of 13C/12C value from the 
                                // theoretical value. in the case the 13C/12C ratio cannot be calculated,
                                // delta_ppm is automatically applied.

TogoMD_AnnotationMethodId = AM1 // this is for TogoMD output function.
                                // the value for "Annotation Method ID" field in the peak information

# includes only a single formula ------------
# 1) eDBɈ̃Gg[ȂAgЂƂꍇB
>true                           // an annotation block starts with ">".
                                // the annotation block starts with ">true" is valid.
                                // if you would like to disable this block, edit it to ">false".
message = [1] $FORMULA_COMPOUND_TOP (e.g. for $NAME_TOP) with a single hit for each compound DB ($DBID_ALL).

                                // these are for TogoMD output function.
                                // the value for "Annotation" field in the peak information
TogoMD_Annotation   = [1] $FORMULA_COMPOUND_TOP (e.g. for $NAME_TOP) with a single hit for each compound DB ($DBID_ALL).

                                // the value for "Annotated Compound ID" field in the peak information
TogoMD_CompoundIds  = $DBID_ALL
                                // the value for "Comment" field in the peak information
//TogoMD_Comments     = 

singleRecordForEachCompoundDb     = true
singleFormulaForAllCompoundDb     = true
singleFormulaForAllDb             = true


# 2) eDBɕ̃Gg[ꍇ邪AgЂƂꍇB
>true
message = [2] $FORMULA_COMPOUND_TOP (e.g. for $NAME_TOP) with multiple hits for compound DBs.
TogoMD_Annotation   = [2] $FORMULA_COMPOUND_TOP (e.g. for $NAME_TOP) with multiple hits for compound DBs.
TogoMD_CompoundIds  = $DBID_ALL
singleRecordForEachCompoundDb     = false
singleFormulaForAllCompoundDb     = true
singleFormulaForAllDb             = true

# 3) DBւ̃qbg͂ȂAgZőgЂƂꍇB
>true
message = [3] a single formula $FORMULA_PREDICTED_TOP without database hits.
TogoMD_Annotation   = [3] a single formula $FORMULA_PREDICTED_TOP without database hits.
existsResultsForCompoundDb        = false
singleFormulaForAllDb             = true


# multiple formulae ------------------------
# 4) eDBɈ̃Gg[ȂADBł̑g͂ЂƂA
# gZłȊȎgꂽꍇB
>true
message = [4] e.g. $NAME_TOP with a single hit for each compound DB ($DBID_ALL) and $NUM_FORMULA_OTHER_PREDICTED other predicted formulae.
TogoMD_Annotation   = [4] e.g. $NAME_TOP with a single hit for each compound DB ($DBID_ALL) and $NUM_FORMULA_OTHER_PREDICTED other predicted formulae.
TogoMD_CompoundIds  = $DBID_ALL
singleRecordForEachCompoundDb     = true
singleFormulaForAllCompoundDb     = true
singleFormulaForAllDb             = false


# 5) eDBɕ̃Gg[ꍇ邪ADBł͑gЂƂB
# AgZłȊȎgꂽꍇB
>true
message = [5] a single formula $FORMULA_COMPOUND_TOP (e.g. for $NAME_TOP) with multiple hits for compound DBs and $NUM_FORMULA_OTHER_PREDICTED other predicted formulae. 
TogoMD_Annotation   = [5] a single formula $FORMULA_COMPOUND_TOP (e.g. for $NAME_TOP) with multiple hits for compound DBs and $NUM_FORMULA_OTHER_PREDICTED other predicted formulae. 
TogoMD_CompoundIds  = $DBID_ALL
singleRecordForEachCompoundDb     = false
singleFormulaForAllCompoundDb     = true
singleFormulaForAllDb             = false

# 6-1) DBւ̃qbgŕ̑goĂꍇBȊȎg₪ȂꍇB
>true
message = [6] $NUM_FORMULA_ALL formulae (e.g. for $NAME_TOP) with multiple hits for compound DBs.
TogoMD_Annotation   = [6] $NUM_FORMULA_ALL formulae (e.g. for $NAME_TOP) with multiple hits for compound DBs.
TogoMD_CompoundIds  = $DBID_ALL
existsResultsForCompoundDb        = true
singleFormulaForAllCompoundDb     = false
existsOtherPredictedFormula       = false

# 6-2) DBւ̃qbgŕ̑goĂꍇBȊȎg₪ꍇB
>true
message = [6] $NUM_FORMULA_COMPOUND formulae (e.g. for $NAME_TOP) with multiple hits for compound DBs and $NUM_FORMULA_OTHER_PREDICTED other predicted formulae.
TogoMD_Annotation   = [6] $NUM_FORMULA_COMPOUND formulae (e.g. for $NAME_TOP) with multiple hits for compound DBs and $NUM_FORMULA_OTHER_PREDICTED other predicted formulae.
TogoMD_CompoundIds  = $DBID_ALL
existsResultsForCompoundDb        = true
singleFormulaForAllCompoundDb     = false
existsOtherPredictedFormula       = true

# 7)DBւ̃qbg͂ȂAgZŕ̑goĂꍇB
>true
message = [7] $NUM_FORMULA_PREDICTED predicted formulae (e.g. $FORMULA_PREDICTED_TOP)
TogoMD_Annotation   = [7] $NUM_FORMULA_PREDICTED predicted formulae (e.g. $FORMULA_PREDICTED_TOP)
existsResultsForCompoundDb        = false
existsResultsForFormulaPrediction = true
singleFormulaForAllDb             = false

# 8)DB֌łgZłAʂĂȂꍇB
>true
message = [8] No hits
TogoMD_Annotation   = [8] No hits
existsResultsForCompoundDb        = false
existsResultsForFormulaPrediction = false
