ValidatePairs
Validates a directory of paired genome (.fna) and annotation (.gff) files. For each basename with both an .fna(.gz) and a .gff(.gz), checks that every GFF feature line has exactly 9 tab-separated fields and cross-checks sequence IDs in both directions between the FNA and GFF. Also flags unpaired and empty files. Multithreaded across pairs.
Basic Usage
validatepairs.sh in=<directory> [out=report.txt]
Scans a directory for matching .fna(.gz)/.gff(.gz) basename pairs and validates each pair's structure and cross-references. This is the content-level companion to validategz.sh: that tool catches truncated compression, while this one catches content problems — partial GFF records, or an FNA/GFF pair that disagrees about which sequence IDs exist — in files that decompress cleanly.
Parameters
Parameters
- in=<dir,dir>
- Input director(ies) to scan for .fna/.gff pairs. A bare directory path may also be given as a positional argument.
- out=<file>
- Write the per-pair FAIL report here. Default is stderr.
- printpass=f
- Also print a line for each passing pair, not just failures.
- bidirectional=t
- Report FNA sequence IDs absent from the GFF, in addition to the reverse direction. Set f to only report GFF seqids absent from the FNA (the direction that is always an error, since a GFF feature must reference a real sequence). Alias: fnaingff.
- maxbad=10
- Maximum example seqids or line numbers to list per failure reason.
- t=
- Worker threads. Default is all available.
- ow=t
- Overwrite the output file if it already exists.
Java Parameters
- -Xmx
- Set Java memory usage, overriding autodetection.
- -eoom
- Exit if an out-of-memory exception occurs. Requires Java 8u92+.
- -da
- Disable assertions.
Examples
Basic Directory Scan
validatepairs.sh in=/data/refseq_genomes
Scans the directory for .fna/.gff pairs and prints any failures to stderr.
Writing a Report File
validatepairs.sh in=/data/refseq_genomes out=validation_report.txt printpass=t
Writes a full report — including passing pairs — to a file instead of stderr.
GFF-Only Direction, Multiple Directories
validatepairs.sh in=/data/batch1,/data/batch2 bidirectional=f maxbad=25
Scans two directories, only reports GFF seqids missing from their FNA (skipping the reverse check), and lists up to 25 example seqids per failure.
Support
For questions and support:
- Email: bbushnell@lbl.gov
- Documentation: bbmap.org
- Related tool: ValidateGZ — the compression-level companion check.