combine-uid-lists
Quick Start
- Command:
combine-uid-lists FILE1 FILE2 ... - Local executable:
/home/vimalinx/miniforge3/envs/bio/bin/combine-uid-lists - Full reference: See references/help.md
When To Use This Tool
- Merge several one-UID-per-line files into a single union list.
- Deduplicate repeated PubMed, PMC, taxonomy, or other Entrez IDs before downstream fetches.
- Normalize multiple EDirect search results into one numerically sorted file.
- Use this when you want a quick set-union step without writing a custom
sort | uniqcommand.
Common Patterns
# 1) Combine two Entrez UID lists into one unique union
combine-uid-lists cohort_a.ids cohort_b.ids > union.ids
# 2) Merge several partial search results before efetch
combine-uid-lists day1.ids day2.ids day3.ids > merged.ids
# 3) Check how many unique IDs remain after the merge
combine-uid-lists a.ids b.ids c.ids | wc -l
Recommended Workflow
- Save each upstream UID set as one ID per line.
- Run
combine-uid-listson all source files you want to union. - Redirect the result to a new file or pipe it directly into a downstream EDirect step.
- Check the merged count before using the result in expensive downstream fetches.
Guardrails
- The real implementation is a tiny wrapper around
sort -nu "$@"; it always numeric-sorts and deduplicates. --helpand--versioncome from GNUsort, not from custom EDirect documentation.- This command expects file arguments, not two streams on stdin.
- Locale can affect sorting behavior in general
sortusage; useLC_ALL=Cif you need fully reproducible collation.