Skip to content

Conversation

Copy link

Copilot AI commented Oct 16, 2025

Overview

This PR adds a bash script and comprehensive documentation for running CellBender, a tool for removing ambient RNA contamination from single-cell RNA-seq data.

Changes

New Files

  1. scripts/run_cellbender.sh - Production-ready bash script with:

    • User-friendly command-line interface with both short and long options
    • Required parameters: input file, output directory, expected cells, total droplets
    • Optional parameters: FPR, epochs, CUDA support, learning rate, latent dimensions, and more
    • Built-in help documentation with usage examples
    • Comprehensive error handling and input validation
    • Proper exit codes and informative error messages
  2. docs/usage_cellbender.md - Complete documentation including:

    • Explanation of ambient RNA and why removal is important
    • Installation instructions for CellBender
    • Detailed parameter guidance and best practices
    • Multiple usage examples (basic, GPU-accelerated, custom parameters)
    • Integration instructions for using CellBender output with Seurat
    • Troubleshooting section for common issues
    • References to CellBender paper and documentation

Usage Example

./scripts/run_cellbender.sh \
    --input raw_feature_bc_matrix.h5 \
    --output-dir cellbender_output \
    --expected-cells 5000 \
    --total-droplets 15000 \
    --cuda

Quality Assurance

  • ✅ Script passes shellcheck validation with no warnings
  • ✅ Comprehensive error handling for missing/invalid inputs
  • ✅ Follows bash best practices (set -euo pipefail, proper quoting)
  • ✅ Executable permissions set correctly
  • ✅ Help text provides clear usage instructions

Benefits

  • Provides a standardized way to run CellBender in the scrnaseq2 workflow
  • Simplifies ambient RNA removal for users unfamiliar with CellBender CLI
  • Comprehensive documentation reduces setup friction and troubleshooting time
  • Consistent with the project's focus on best practices for single-cell analysis
Original prompt

Create bash script for running cellbender


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Copilot AI changed the title [WIP] Add bash script for running CellBender Add bash script for running CellBender ambient RNA removal Oct 16, 2025
Copilot AI requested a review from andpet0101 October 16, 2025 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants