Skip to content
Paolo Di Tommaso edited this page May 5, 2014 · 1 revision

xml2csv.pl usage wiki.


Introduction

This is the documentation of xml2csv it allows to transform MWM xml data to csv, binning and bin statistics.


Installation

  1. Install xml2csv.pl on your PATH

Standard Usage

Transforming files

{{{
xml2csv.pl -data file.xml -action converts -outdata csv }}}

This action will print in the STDOUT a csv file.

Note The reverse conversion is not implemented by the moment.

Adding fields

{{{
xml2csv.pl -data file.xml -add direction -outdata csv }}}

This action adds as a new field (direction), the changes of direction of the animal.

Binning

It is possible to use csv or xml files to do the binning in both cases by the moment the output will be and csv file with the corresponding binning annotated.

{{{ xml2csv.pl -data file.xml -bin angle -outdata csv }}}

Binning statistics

This option allows the user to get the binning statistics.

{{{ xml2csv.pl -data file_binned.csv -action countBins -outdata no -outBins binsFileName }}}

It is also possible to get an idea of which is the dependency of the bins using the logodd ratio option

{{{ xml2csv.pl -data file_binned.csv -action logodd -outdata no -outLogodd screen }}}

Note If you want to store the results into a file just set the name with the option outLogodd

{{{ xml2csv.pl -data file_binned.csv -action logodd -outdata no -outLogodd results }}}

An example of a complete command line

xml2csv.pl -data file.xml -add direction -bin angle -action logodd -outBins fileBins -outdata filedata -outLogodd logoddata

<wiki:toc max_depth="3" />