A vim plugin for DNA sequences and sequencing files | bioinformatics


This started as a joke colorscheme for vim where every character is the same color except for ACGT, but then I realized that the colors were actually useful for helping me visually parse DNA sequences. So I turned it into a plugin with a couple more features. There’s nothing super fancy in there, but it has made squinting at CIGAR strings and SAM flags less painful for me.

Link to the repository/screenshots

Current features:

  • A/C/G/T/U/N are colored (consistent with IGV colors for ACGT)
  • Using the commands :SAM, :BAM, :GAF, or :PAF in their respective files will tell you the description of the field your cursor is hovering over (e.g., using :SAM in column 2 of a SAM/BAM file will print a message along the lines of “FLAG: 2064 – supplementary alignment, reverse strand”)
  • Operation blocks within CIGAR strings are colored separately from each other
  • Using :Phred will decode the Phred score of the hovered character (e.g., using it on a D will print “D is score 35, 0.0003 probability of error”)
  • Sequence names in FASTA/FASTQ files are colored
  • Tags in alignment files are colored

June 1, 2025
← Back to posts