BiVeS of course also provides a command line interface, here you can see the --help
output:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | ~dev/bives master » java -jar target/BiVeS.jar --help ARGUMENTS: [option] FILE1 FILE2 compute the differences between 2 XML files --documentType FILE1 get the documentType of an XML file --meta FILE1 get some meta information about an XML file FILE1 and FILE2 define XML files to compare OPTIONS: COMMON OPTIONS [none] expect XML files and print patch --help print this help --debug enable verbose mode --debugg enable even more verbose mode MAPPING OPTIONS --CellML force CellML comparison --SBML force SBML comparison --compHierarchyDot get the hierarchy of components in a CellML document encoded in DOT language --compHierarchyGraphml get the hierarchy of components in a CellML document encoded in GraphML --compHierarchyJson get the hierarchy of components in a CellML document encoded in JSON --crnDot get the highlighted chemical reaction network encoded in DOT language --crnGraphml get the highlighted chemical reaction network encoded in GraphML --crnJson get the highlighted chemical reaction network encoded in JSON --regular force regular XML comparison --reportHtml get the report of changes encoded in HTML --reportMd get the report of changes encoded in MarkDown --reportRST get the report of changes encoded in ReStructuredText --xmlDiff get the diff encoded in XML format ENCODING OPTIONS by default we will just dump the result to the terminal. Thus, it's only usefull if you call for one single output. --json encode results in JSON --xml encode results in XML |
Thus, basically you just need to pass two XML files and BiVeS will compute the differences and present them in and XML encoded format:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ~dev/bives master » java -jar target/BiVeS.jar A.xml B.xml <?xml version="1.0" encoding="UTF-8" standalone="no"?> <bives type="fullDiff"> <update> <!-- ... updates ... --> </update> <delete> <!-- ... deletes ... --> </delete> <insert> <!-- ... inserts ... --> </insert> <move> <!-- ... moves ... --> </move> </bives> |
BiVeS will try to detect the type of the provided files and might activate specific modules for the comparison of SBML or CellML files. You might want to overwrite this behavior and force a certain type of comparison by passing --SBML
, --CellML
, or --regular
(don’t enable additional modules) as an argument.
Besides the differences encoded in XML (--xmlDiff
) you can also ask for the highlighted chemical reaction (--crn*
), the hierarchy of the components in and CellML file (--compHierarchy*
) or the human readable report (--report*
) in different formats. To learn more about the output formats take a look at the format descriptions.
In addition to the sophisticated comparison capabilities BiVeS offers some options to get some more information about an XML document.
Passing --documentType
together with a document BiVeS will try to detect the document type, e.g.:
1 2 | ~dev/bives master » java -jar target/BiVeS.jar --documentType test/potato.xml XML,SBML |
In that case test/potato.xml
is an XML
file and also a recognizable SBML
file.
Moreover, you can get more information about a file using
1 2 | ~dev/bives master » java -jar target/BiVeS.jar --meta test/potato.xml sbmlVersion:4;sbmlLevel:2;modelId:null;modelName:assmus;nodestats:{reaction=30, apply=283, listOfReactions=1, model=1, sbml=1, listOfParameters=1, parameter=134, modifierSpeciesReference=7, times=109, power=4, text()=379, speciesReference=95, listOfCompartments=1, plus=50, kineticLaw=30, minus=22, listOfReactants=30, species=31, listOfSpecies=1, divide=98, listOfModifiers=5, math=30, listOfProducts=30, cn=37, ci=342, compartment=1}; |
So test/potato.xml
is encoded in SBML L2V4. It doesn’t have a model id but its name is assmus
. Subsequently, you get some statistics about the XML document itself, this copy for example contains 30 reaction
nodes and 134 parameter
nodes. It’s quite useful if you try to create some statistics about XML documents :)