EnglishFrenchSpanish

OnWorks favicon

stag-diffp - Online in the Cloud

Run stag-diffp in OnWorks free hosting provider over Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

This is the command stag-diffp that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

PROGRAM:

NAME


stag-diff - finds the difference between two stag files

SYNOPSIS


stag-diff -ignore foo-id -ignore bar-id file1.xml file2.xml

DESCRIPTION


Compares two data trees and reports whether they match. If they do not match, the mismatch
is reported.

ARGUMENTS
-help|h
shows this document

-ignore|i ELEMENT
these nodes are ignored for the purposes of comparison. Note that attributes are
treated as elements, prefixed by the containing element id. For example, if you have

<foo ID="wibble">

And you wish to ignore the ID attribute, then you would use the switch

-ignore foo-ID

You can specify multiple elements to ignore like this

-i foo -i bar -i baz

You can also specify paths

-i foo/bar/bar-id

-parser|p FORMAT
which parser to use. The default is XML. This can also be autodetected by the file
suffix. Other alternatives are sxpr and itext. See Data::Stag for details.

-report|r ELEMENT
report mismatches as they occur on each element of type ELEMENT

multiple elements can be specified

-verbose|v
used in conjunction with the -report switch

shows the tree of the mismatching element

OUTPUT
If a mismatch is reported, a report is generated displaying the subpart of the tree that
could not be matched. This will look like this:

REASON: no_matching_node: annotation
no_matching_node: feature_set
no_matching_node: feature_span
no_matching_node: evidence
no_matching_node: evidence-id
data_mismatch(:15077290 ne :15077291): evidence-id AND evidence-id

Due to the nature of tree matching, it can be difficult to specify exactly how trees do
not match. To investigate this, you may need to use the -r and -v options. For the above
output, I would recommend using

stag-diff -r feature_span -v

ALGORITHM
Both trees are recursively traversed... see the actual code for how this works

The order of elements is not important; eg

<foo>
<bar>
<baz>1</baz>
</bar>
<bar>
<baz>2</baz>
</bar>
</foo>

matches

<foo>
<bar>
<baz>2</baz>
</bar>
<bar>
<baz>1</baz>
</bar>
</foo>

The recursive nature of this algorithm means that certain tree comparisons will explode
wrt time and memory. I think this will only happen with very deep trees where nodes high
up in the tree can only be differentiated by nodes low down in the tree.

Both trees are loaded into memory to begin with, so it may thrash with very large
documents

AUTHOR
Chris Mungall cjm at fruitfly dot org

Use stag-diffp online using onworks.net services


Free Servers & Workstations

Download Windows & Linux apps

  • 1
    PostInstallerF
    PostInstallerF
    PostInstallerF will install all the
    software that Fedora Linux and others
    doesn't include by default, after
    running Fedora for the first time. Its
    easy for...
    Download PostInstallerF
  • 2
    strace
    strace
    The strace project has been moved to
    https://strace.io. strace is a
    diagnostic, debugging and instructional
    userspace tracer for Linux. It is used
    to monitor a...
    Download strace
  • 3
    gMKVExtractGUI
    gMKVExtractGUI
    A GUI for mkvextract utility (part of
    MKVToolNix) which incorporates most (if
    not all) functionality of mkvextract and
    mkvinfo utilities. Written in C#NET 4.0,...
    Download gMKVExtractGUI
  • 4
    JasperReports Library
    JasperReports Library
    JasperReports Library is the
    world's most popular open source
    business intelligence and reporting
    engine. It is entirely written in Java
    and it is able to ...
    Download JasperReports Library
  • 5
    Frappe Books
    Frappe Books
    Frappe Books is a free and open source
    desktop book-keeping software that's
    simple and well-designed to be used by
    small businesses and freelancers. It'...
    Download Frappe Books
  • 6
    Numerical Python
    Numerical Python
    NEWS: NumPy 1.11.2 is the last release
    that will be made on sourceforge. Wheels
    for Windows, Mac, and Linux as well as
    archived source distributions can be fou...
    Download Numerical Python
  • More »

Linux commands

Ad