$ show tseemann/barrnap
Barrnap is a Perl-based command-line tool for annotating RNA features in microbial genomes (bacteria, archaea, fungi). It integrates multiple bioinformatics tools (Infernal, Aragorn, Prodigal, etc.) to detect rRNA, tRNA, tmRNA, ncRNA, mRNA, and associated features like RBS, CDS, and terminators. The tool takes FASTA input and outputs GFF3 annotations. It is structured as a single executable script with modular subroutines for each analysis type, using temporary files for intermediate results. The code shows good organization, clear separation of concerns, and reusable components like the GFF handling and FASTA processing utilities.
The LLM identified 3 files worth highlighting for reuse:
The main script demonstrates a well-structured pipeline where each RNA type (tRNA, rRNA, mRNA, etc.) is handled by isolated subroutines. It cleanly separates concerns: input processing, tool execution, result parsing, and GFF output. The use of temporary directories with automatic cleanup, dependency checking, and clear error handling makes it robust and reusable as a template for similar bioinformatics tools.
The GFF writing and sorting functions (print_gff, sort_gff, gff_cmp) are cleanly implemented and could be reused in other genome annotation tools. They handle sorting by chromosome, start, and end coordinates correctly, and support optional sequence inclusion in the output.
The FASTA processing pipeline using any2fasta and seqkit for format conversion, deduplication, and indexing is a reusable pattern for preparing input sequences for downstream bioinformatics tools. The approach is efficient and handles various input formats gracefully.