Skip to content

📦 Request to Add Formula: SnpEff #315

Description

@BenjaminDEMAILLE

Hi Homebrew Science team,

I’d like to request the addition of a formula for SnpEff, a widely used variant annotation tool written in Java. It annotates and predicts the effects of genetic variants on genes and proteins, and is a commonly used alternative to Ensembl VEP.


🔍 Tool Overview


💡 Why it’s useful

SnpEff is a popular tool for:

  • Annotating VCF files with gene, exon, codon, and protein effect information
  • Predicting variant consequences (missense, frameshift, synonymous, etc.)
  • Supporting many species and custom genome databases
  • Fast and easy to integrate into variant calling pipelines

It’s especially useful when a lightweight alternative to VEP is desired, and is compatible with tools like GATK and bcftools.


📦 Installation notes

SnpEff is distributed as a standalone .jar file with a set of supporting config files. It does not require compilation and works on any system with a Java runtime.

After installing the binary, users typically run:

snpeff download GRCh38.99
snpeff ann GRCh38.99 input.vcf > output.ann.vcf

✅ Proposed Formula

class Snpeff < Formula
  desc "Genetic variant annotation and effect prediction toolbox"
  homepage "https://pcingola.github.io/SnpEff/"
  url "https://github.com/pcingola/snpEff/archive/refs/tags/v5.2.tar.gz"
  sha256 "<insert_sha256_here>"
  license "LGPL-3.0-or-later"

  depends_on "openjdk"

  def install
    libexec.install Dir["*"]
    bin.write_jar_script libexec/"snpEff.jar", "snpeff"
  end

  def caveats
    <<~EOS
      To use SnpEff, you'll need to download genomic databases before annotation, e.g.:

        snpeff download GRCh38.105

      To annotate:

        snpeff ann GRCh38.105 input.vcf > output.vcf

      Documentation: https://pcingola.github.io/SnpEff/
    EOS
  end

  test do
    system "#{bin}/snpeff", "help"
  end
end

This formula installs snpeff as a simple wrapper around the snpEff.jar file, similar to how picard or gatk are installed in other ecosystems. The program can then be used as a CLI tool system-wide via the snpeff command.

Let me know if you'd prefer a snpSift companion formula to be submitted separately or as part of this one.

Thanks again for maintaining this excellent toolkit for the bioinformatics community!

Best regards

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions