| name | difference-uid-lists |
| description | Use when finding the symmetric difference between two Entrez or NCBI UID files. |
| disable-model-invocation | true |
| user-invocable | true |
difference-uid-lists
Quick Start
- Command:
difference-uid-lists FILE1 FILE2
- Local executable:
/home/vimalinx/miniforge3/envs/bio/bin/difference-uid-lists
- Full reference:
references/help.md
When To Use This Tool
- Keep only IDs that appear in exactly one of two UID files.
- Compare an older and newer search result to see which IDs were added or dropped.
- Audit drift between two snapshots of the same Entrez query.
- Use this instead of
exclude-uid-lists when you need both sides' uniques, not just FILE1 minus FILE2.
Common Patterns
difference-uid-lists old.ids new.ids > changed.ids
difference-uid-lists case.ids control.ids | wc -l
difference-uid-lists baseline.ids rerun.ids | sed -n '1,20p'
Recommended Workflow
- Prepare exactly two one-UID-per-line files.
- Run
difference-uid-lists to compute the symmetric difference.
- Inspect or count the output before feeding it into downstream fetch or QC steps.
- Switch to
exclude-uid-lists or intersect-uid-lists if you actually need a directional subtraction or shared set.
Guardrails
- The real implementation is
comm -3 <(sort "$1") <(sort "$2") | tr -d '\t' | sort -n, so it returns IDs unique to either file.
- The wrapper sorts inputs internally; original input order is discarded.
- This command expects exactly two files and has no real built-in help/version path.
- Passing
--help or --version does not show clean custom docs; it leaks through to sort and can still emit comm / missing-file noise.