Skip to content

📦 Request to Add Formula: mosdepth #316

Description

@BenjaminDEMAILLE

Hi Homebrew Science team,

I’d like to request the addition of a formula for mosdepth, a fast and memory-efficient tool for computing read depth from BAM/CRAM files.


🔍 Tool Overview

  • Name: mosdepth
  • Repository: https://github.com/brentp/mosdepth
  • License: MIT
  • Language: Rust
  • Platform: Cross-platform (Linux and macOS supported)
  • Latest version: v0.3.5 (as of March 2025)
  • Installation: Built using cargo

💡 Why it’s useful

mosdepth is widely used in WGS/WES pipelines for:

  • Calculating per-base, per-region, and per-window depth
  • Fast coverage analysis for CNV detection, QC, and panel validation
  • Handling large BAM/CRAM files efficiently using HTSlib and multi-threading

Compared to samtools depth, mosdepth is significantly faster and more memory-efficient, especially on modern multicore systems.


✅ Proposed Formula

class Mosdepth < Formula
  desc "Fast BAM/CRAM depth calculation for WGS/WES"
  homepage "https://github.com/brentp/mosdepth"
  url "https://github.com/brentp/mosdepth/archive/refs/tags/v0.3.5.tar.gz"
  sha256 "<insert_sha256_here>"
  license "MIT"

  depends_on "rust" => :build

  def install
    system "cargo", "install", *std_cargo_args
  end

  test do
    assert_match "Usage", shell_output("#{bin}/mosdepth --help")
  end
end

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions