| Crates.io | gff_diff |
| lib.rs | gff_diff |
| version | 0.1.1 |
| created_at | 2021-01-12 09:39:08.695032+00 |
| updated_at | 2021-01-12 09:51:45.966355+00 |
| description | A tool to generate a diff (in JSON format) between two GFF3 files. |
| homepage | |
| repository | https://github.com/magnusmanske/gff_diff |
| max_upload_size | |
| id | 340799 |
| size | 154,628 |
A tool to generate a diff (in JSON format) between two GFF3 files, written in Rust.
See instructions, or just run:
curl https://sh.rustup.rs -sSf | sh
Use git clone https://github.com/magnusmanske/gff_diff.git to get the tool source, then use
cargo build --release
to build the binary (target/release/gff_diff).
To compare original.gff and modified.gff, use:
gff_diff original.gff modified.gff
Output is a JSON structure. The changes required to turn original.gff into modified.gff are in the objects in the {"changes":[]} array.
Each object has an action, a what, and an id key. what can be row (a line in the GFF file, represented by an id) or attribute (last column in a row).
action can be:
add / remove for what=attributeadd / remove / update for what=rowFor what=row / action=update, there are key and value keys, indicating what should be changed. key can be one of seqname, source, feature_type, start , end, score, strand, or frame. value is a string representing the new value for the given key.
For what=row / action=add/remove, a data key holds a JSON structure representing the entire row to be added or removed.
For what=attribute / action=add/remove, there are key and value keys, indicating what value should be added to, or removed from, the attribute key.