@b{MetaQTL} provides some other programs to deal with file formatting or to extract usefull information from the result files.

@menu
* A2Xml::
* Xml2A::
* QTLClustInfo::
* QTLModel::
* Utilities-References::
@end menu

@node A2Xml
@section A2Xml

@b{A2Xml} is dedicated to convert plaint text files into XML files compliant with the analysis programs of @b{MetaQTL}.

@subsection Command Line Options

@multitable @columnfractions 0.2 0.15 0.15 0.5
@headitem Option @tab Usage    @tab Type    @tab Explanation
@item @code{-i,--ifile}      @tab required @tab @sc{string}  @tab The file to convert in XML.
@item @code{-x,--xmlfile}    @tab required @tab @sc{string}  @tab The output XML file.
@item @code{-t,--type}       @tab required @tab @sc{string}  @tab The type of the input file.
@item @code{-f,--format}     @tab optional @tab @sc{string}  @tab The format of the input file.
@end multitable

Presently, the command @code{--type} have two possible values:
@itemize @bullet
@item @code{map} : the input file is a marker and/or QTL map.
@item @code{onto} : the input file is an ontology.
@end itemize
@cartouche
@smallexample
@verbatim
%java org.metatqtl.main.A2Xml \
>     -i map.txt -x map.xml -t map -f chart
@end verbatim
@end smallexample
@end cartouche

The command @code{-f,--format} allows user to convert into XML different input file formats. This option works only when @code{-t,--type} is set to @code{map}. In this case 3 different input file formats can be used:
@itemize @bullet
@item @code{tab}   : the map is in tabulated format as for the GLMdb tables @xref{GLMdb}.
@item @code{mch}   : the map is formatted like a MapChart (Voorrips 2002) input file.
@item @code{mmk}   : the map is formatted like a MapMaker (Lander 1987) output.
@end itemize 

For example, suppose we have a map file @file{map.txt} in tabulated format as follows,
@cartouche
@smallexample
@verbatim
group   marker  position
1       umc11   0.0
1       gsy27   18.0
1       umc67   54.0
1       umc58   75.0
1       umc83a  115.0
1       umc66b  140.0
1       gsy56   153.0
1       umc161  168.0
1       umc84   189.0
1       bnl6.32 198.0
@end verbatim
@end smallexample
@end cartouche
Then we can convert it into a XML file using the command
@cartouche
@smallexample
@verbatim
%java org.metatqtl.main.A2Xml \
>     -i map.txt -x map.xml -t map -f tab
@end verbatim
@end smallexample
@end cartouche
This creates a file named @file{map.xml} which looks like this
@cartouche
@smallexample
@verbatim
<?xml version="1.0" encoding="UTF-8"?>
<genome-map name="">
 <linkage-group name="1">
  <locus name="umc83a" type="M" position="115.0"/>
  <locus name="bnl6.32" type="M" position="198.0"/>
  <locus name="gsy27" type="M" position="18.0"/>
  <locus name="umc58" type="M" position="75.0"/>
  <locus name="umc161" type="M" position="168.0"/>
  <locus name="umc66b" type="M" position="140.0"/>
  <locus name="umc11" type="M" position="0.0"/>
  <locus name="gsy56" type="M" position="153.0"/>
  <locus name="umc67" type="M" position="54.0"/>
  <locus name="umc84" type="M" position="189.0"/>
 </linkage-group>
</genome-map>
@end verbatim
@end smallexample
@end cartouche
The XML file will be the same if instead using a tabulated format we have used a MapChart format as input
@cartouche
@smallexample
@verbatim
group 1
umc11 0
gsy27 18
umc67 54
umc58 75
umc83a 115
umc66b 140
gsy56 153
umc161 168
umc84 189
bnl6.32 198
@end verbatim
@end smallexample
@end cartouche
and the command
@cartouche
@smallexample
@verbatim
%java org.metatqtl.main.A2Xml \
>     -i map.txt -x map.xml -t map -f chart
@end verbatim
@end smallexample
@end cartouche
or if we have used a MapMaker like format
@cartouche
@smallexample
@verbatim
*1
>map
===========================================================================
Map:
  Markers         Distance
   1  umc11         18 cM
   2  gsy27         36 cM
   3  umc67         21 cM
   4  umc58         40 cM
   5  umc83a        25 cM
   6  umc66b        13 cM
   7  gsy56         15 cM
   8  umc161        21 cM
   9  umc84          9 cM
   10  bnl6.32     ----------
                198 cM 10 markers   log-likelihood=
===========================================================================
@end verbatim
@end smallexample
@end cartouche
and the command
@cartouche
@smallexample
@verbatim
%java org.metatqtl.main.A2Xml \
>     -i map.txt -x map.xml -t map -f mm
@end verbatim
@end smallexample
@end cartouche


@node Xml2A
@section Xml2A

@b{Xml2A} does exactly the reverse job of @b{A2Xml}: it takes as input a XML file and convert it into a plain text output file according to the format specified by the user.

@subsection Command Line Options

@multitable @columnfractions 0.2 0.2 0.2 0.4
@headitem Option @tab Usage   @tab Type    @tab Explanation
@item @code{-o,--outfile}  @tab required @tab @sc{string}  @tab The output file.
@item @code{-x,--xmlfile}  @tab required @tab @sc{string}  @tab The input XML file.
@item @code{-t,--type}     @tab required @tab @sc{string}  @tab The type of the input file.
@item @code{-f,--format}   @tab optional @tab @sc{string}  @tab The format of the input file.
@end multitable

@node QTLClustInfo
@section QTLClustInfo

When a QTL clustering has been done using @b{QTLClust} @xref{QTL Clustering, QTLCLust}, the result can be formatted using @b{QTLClustInfo}. This program allows user to get for a given trait, a given chromosome and a given clustering model, tables in which the results are summarized. @b{QTLClustInfo} computes also extra statistics as mahalanobis distances between the QTL of the clustering model, the unconditional confidence intervals (UCI) of these QTL and the predicted values of the observed QTL according to the clustering model.

@subsection Command Line Options

@multitable @columnfractions 0.15 0.15 0.15 0.55
@headitem Option @tab Usage    @tab Type    @tab Explanation
@item @code{-o,--output}    @tab required @tab @sc{string}   @tab The output file
@item @code{-c,--chr}    @tab required @tab @sc{string}   @tab The name of the chromosome.
@item @code{-t,--trait}  @tab required @tab @sc{string}   @tab The name of the trait.
@item @code{-r,--clust}  @tab required @tab @sc{string}   @tab The clustering result file.
@item @code{-b,--best}   @tab required @tab @sc{integer}  @tab The number of QTL for the best model.
@item @code{--kmin}      @tab required @tab @sc{integer}  @tab The minimal value to compute the UCI.
@item @code{--kmax}      @tab required @tab @sc{integer}  @tab The maximal value to compute the UCI.
@end multitable

For example, we focus on the chromosome @samp{8} for the trait called @samp{FT} for which we have previously performed a QTL clustering via @b{QTLClust}. We want to display the result of the clustering for the best model supposed to be the model with 5 QTL. We also want to compute the UCI by averaging over the clustering models from 1 QTL to 10 QTL. Thus we use the command
@cartouche
@smallexample
@verbatim
%java org.metatqtl.main.QTLClustInfo \
>     -c 8 -t FT -r clust_res.txt -b 5 --kmin 1 --kmax 10 -o table.txt
@end verbatim
@end smallexample
@end cartouche
The result of this command is dumped into the file @file{table.txt} which looks like this
@cartouche
@smallexample
@verbatim
##
# Meta-QTL Table
##
--
QTL     Position        Weight  Distance        CI(95%) UCI(95%)
--
1       14.64   0.06    6.21    11.72   11.72
2       75.39   0.37    1.26    6.25    8.97
3       89.68   0.42    2.64    3.79    4.24
4       114.47  0.07    5.2     11.14   11.62
5       165.25  0.09    -       13.86   13.86
--
##
# Observed QTL Table
##
--
QTL   Position   CI(95%)   Predicted   Memberships 1 --> 5
--
Pioneer_HT_1    1.91    20.46   14.64   1       0       0       0       0
Poupard_2001_DPS_10     20.85   14.31   14.64   1       0       0       0       0
Pioneer_HT_2    62.7    24.62   75.39   0       1       0       0       0
Lubberstedt_1997_HT_17  74.15   14.31   75.39   0       1       0       0       0
Bouchez_2002_SD_1       74.86   14.31   75.39   0       1       0       0       0
Poupard_2001_DPS_11     76.1    16.7    75.53   0       0.99    0.01    0       0
Moreau_1998_SD_5        67.72   28.62   75.68   0       0.98    0.02    0       0
Bohn_2000_DPS_11        79.23   14.9    75.96   0       0.96    0.04    0       0
Vladutu_1999_DPS_2      73.04   26.26   76.1    0       0.95    0.05    0       0
Rebai_1997_SD_18        59.86   63.15   78.96   0       0.75    0.25    0       0
Chardon_2005b_SD_1      70.96   73.74   81.64   0       0.58    0.41    0.01    0
Charcosset_unpub_SD_7   71.13   71.42   81.64   0       0.58    0.41    0.01    0
Chardon_2005b_DPS_1     70.96   74.75   81.78   0       0.57    0.42    0.01    0
Groh_1998_HT_6  81.08   32.61   81.96   0       0.54    0.46    0       0
Mechin_2001_SD_4        82.66   21.44   83.25   0       0.45    0.55    0       0
Rebai_1997_SD_4 83.22   27.4    83.68   0       0.42    0.58    0       0
Rebai_1997_SD_31        83.96   30.97   84.11   0       0.39    0.61    0       0
Blanc_SXflofch8 85.04   37.98   84.39   0       0.37    0.63    0       0
Chardon_2005b_DPS_2     90.64   75.22   84.49   0       0.37    0.58    0.04    0
Chardon_2005b_SD_2      90.64   47.75   86.17   0       0.28    0.7     0.02    0
Groh_1998_SD_5  87.6    29.56   86.82   0       0.2     0.8     0       0
Blanc_SDflofch8 91.05   25.99   88.97   0       0.05    0.95    0       0
Moreau_1998_SD_6        93.8    11.92   89.68   0       0       1       0       0
Vladutu_1999_DPS_1      88.39   10.15   89.68   0       0       1       0       0
Chardon_2005a_SD_1      91.39   14.31   89.68   0       0       1       0       0
Chardon_2005a_DPS_1     91.39   7.13    89.68   0       0       1       0       0
Barierre_2005_SD_3      87.52   9.53    89.68   0       0       1       0       0
Vladutu_1999_HT_1       88.39   10.15   89.68   0       0       1       0       0
Blanc_SFflofch8 103.31  31.01   95.64   0       0.01    0.79    0.21    0
Pioneer_HT_3    112.74  12.31   114.47  0       0       0       1       0
Ribaut_1996_SD_4        126.15  28.46   114.47  0       0       0       1       0
Pioneer_HT_4    169.52  19.01   165.25  0       0       0       0       1
Cardinal_2001_DPS_7     167.11  45.98   165.25  0       0       0       0       1
Lubberstedt_1997_HT_16  156.52  26.22   165.25  0       0       0       0       1
--
@end verbatim
@end smallexample
@end cartouche

@node QTLModel
@section QTLModel

Once the best clustering models have been identified, @b{QTLModel} can be used to format the clustering results into a single XML file where both the markers and the best QTL positions are given. This files can then be re-formatted using @b{Xml2A}.

@subsection Command Line Options

@multitable @columnfractions 0.15 0.15 0.15 0.55
@headitem Option @tab Usage    @tab Type    @tab Explanation
@item @code{-m,--map}     @tab required @tab @sc{string}   @tab The XML map name.
@item @code{-r,--clust}   @tab required @tab @sc{string}   @tab The clustering result file.
@item @code{-b,--best}    @tab required @tab @sc{string}   @tab The best clustering file.
@item @code{-o,--outfile} @tab required @tab @sc{string}   @tab The output file.
@end multitable

@node Utilities-References
@section References

@itemize @bullet
@item Lander, E. S. and Green, P. and Abrahamson, J. and Barlow, A. and Daly M.J., 1987, @i{MapMaker: an integrative computer package for constructing genetic linkage maps of experimental and natural populations}, Genomics 1: 174-181. The software is available at @url{http://www.broad.mit.edu/ftp/distribution/software/}.
@item Voorrips, R.E., 2002. @i{MapChart: Software for the graphical presentation of linkage maps and QTLs}, The Journal of Heredity 93 (1): 77-78. The software is available at @url{http://www.biometris.nl/uk/Software/MapChart/}
@end itemize

