# ZetaSuite: A Comprehensive Guide to Multi-dimensional High-throughput Data Analysis

#### Yajing Hao, Shuyang Zhang, Junhui Li, Changwei Shao, Guofeng Zhao, Xiang-Dong Fu

#### 2026-04-27

# Introduction

## Overview

ZetaSuite is an R package designed for analyzing multi-dimensional high-throughput screening data, particularly two-dimensional RNAi screens and single-cell RNA sequencing data. The package addresses the limitations of simple Z-based statistics when dealing with complex multi-dimensional datasets where experimental noise and off-target effects accumulate.

## Key Features

- Quality Control Analysis: Comprehensive evaluation of experimental design and data quality
- Z-score Normalization: Standardization using negative controls as reference
- Event Coverage Analysis: Quantification of regulatory effects across thresholds
- Zeta Score Calculation: Area-under-curve based scoring for regulatory effects
- SVM-based Background Correction: Machine learning approach to filter noise
- Screen Strength Analysis: Optimal threshold selection for hit identification
- Single Cell Quality Control: Cell quality assessment for scRNA-seq data

## Applications

1. Two-dimensional RNAi screens: Identify genes critical for cell fitness and proliferation
2. Alternative splicing analysis: Detect splicing regulators and their effects
3. Single-cell RNA-seq QC: Differentiate high-quality cells from damaged ones
4. Cancer dependency screens: Reveal genes with opposite roles in cancer biology

# Installation and Setup

## R Package Installation

    # Install from CRAN
    install.packages("ZetaSuite")

    # Load the package
    library(ZetaSuite)

## Interactive Shiny Application

ZetaSuite includes an interactive web interface for easy-to-use analysis:

    # Launch the Shiny app
    ZetaSuiteApp()

    # Launch without opening browser automatically
    ZetaSuiteApp(launch.browser = FALSE)

    # Launch on a specific port
    ZetaSuiteApp(port = 3838)

The Shiny app provides: - Interactive data upload and visualization - Step-by-step analysis workflow with progress indicators - Real-time results and interactive plots - Data export capabilities for all analysis results - Built-in example dataset for demonstration - Bug report integration with GitHub issues

## Original ZetaSuite Installation

# Example Dataset

The package includes an example dataset from an in-house HTS2 screening experiment. This dataset contains:

- countMat: 1,609 genes × 100 alternative splicing events (fold change values)
- negGene: 30 negative control genes (non-specific siRNAs)
- posGene: 20 positive control genes (PTB-targeting siRNAs)
- nonExpGene: 50 non-expressed genes (RPKM < 1 in HeLa cells)
- ZseqList: Pre-calculated Z-score thresholds
- SVMcurve: Pre-calculated SVM decision boundaries

    library(ZetaSuite)

    # Load example data
    data(countMat)
    data(negGene)
    data(posGene)
    data(nonExpGene)
    data(ZseqList)
    data(SVMcurve)

    # Display data dimensions
    cat("Count matrix dimensions:", dim(countMat), "\n")

    ## Count matrix dimensions: 1609 100

    cat("Negative controls:", nrow(negGene), "genes\n")

    ## Negative controls: 510 genes

    cat("Positive controls:", nrow(posGene), "genes\n")

    ## Positive controls: 299 genes

    cat("Non-expressed genes:", nrow(nonExpGene), "genes\n")

    ## Non-expressed genes: 722 genes

# Analysis Workflow

## Step 1: Quality Control Analysis

Quality control evaluates the ability of functional readouts to discriminate between negative and positive controls. This step provides diagnostic plots and SSMD (Strictly Standardized Mean Difference) scores.

    # Perform quality control analysis
    qc_results <- QC(countMat, negGene, posGene)

    ## Performing PCA
    ## Read the 809 x 50 data matrix successfully!
    ## Using no_dims = 2, perplexity = 30.000000, and theta = 0.500000
    ## Computing input similarities...
    ## Building tree...
    ## Done in 0.14 seconds (sparsity = 0.172586)!
    ## Learning embedding...
    ## Iteration 50: error is 59.336418 (50 iterations in 0.19 seconds)
    ## Iteration 100: error is 58.145744 (50 iterations in 0.20 seconds)
    ## Iteration 150: error is 58.180765 (50 iterations in 0.22 seconds)
    ## Iteration 200: error is 57.751518 (50 iterations in 0.23 seconds)
    ## Iteration 250: error is 57.690524 (50 iterations in 0.18 seconds)
    ## Iteration 300: error is 1.490837 (50 iterations in 0.12 seconds)
    ## Iteration 350: error is 1.386273 (50 iterations in 0.12 seconds)
    ## Iteration 400: error is 1.354510 (50 iterations in 0.11 seconds)
    ## Iteration 450: error is 1.339930 (50 iterations in 0.11 seconds)
    ## Iteration 500: error is 1.336520 (50 iterations in 0.12 seconds)
    ## Iteration 550: error is 1.331847 (50 iterations in 0.11 seconds)
    ## Iteration 600: error is 1.328186 (50 iterations in 0.11 seconds)
    ## Iteration 650: error is 1.325495 (50 iterations in 0.11 seconds)
    ## Iteration 700: error is 1.322936 (50 iterations in 0.11 seconds)
    ## Iteration 750: error is 1.321515 (50 iterations in 0.12 seconds)
    ## Iteration 800: error is 1.319680 (50 iterations in 0.11 seconds)
    ## Iteration 850: error is 1.318002 (50 iterations in 0.12 seconds)
    ## Iteration 900: error is 1.316731 (50 iterations in 0.12 seconds)
    ## Iteration 950: error is 1.316174 (50 iterations in 0.11 seconds)
    ## Iteration 1000: error is 1.314577 (50 iterations in 0.11 seconds)
    ## Iteration 1050: error is 1.313578 (50 iterations in 0.11 seconds)
    ## Iteration 1100: error is 1.313268 (50 iterations in 0.11 seconds)
    ## Iteration 1150: error is 1.313047 (50 iterations in 0.12 seconds)
    ## Iteration 1200: error is 1.312710 (50 iterations in 0.12 seconds)
    ## Iteration 1250: error is 1.312615 (50 iterations in 0.12 seconds)
    ## Iteration 1300: error is 1.311824 (50 iterations in 0.12 seconds)
    ## Iteration 1350: error is 1.311141 (50 iterations in 0.12 seconds)
    ## Iteration 1400: error is 1.310927 (50 iterations in 0.12 seconds)
    ## Iteration 1450: error is 1.310594 (50 iterations in 0.13 seconds)
    ## Iteration 1500: error is 1.309996 (50 iterations in 0.12 seconds)
    ## Iteration 1550: error is 1.309686 (50 iterations in 0.12 seconds)
    ## Iteration 1600: error is 1.309039 (50 iterations in 0.12 seconds)
    ## Iteration 1650: error is 1.309040 (50 iterations in 0.13 seconds)
    ## Iteration 1700: error is 1.309156 (50 iterations in 0.13 seconds)
    ## Iteration 1750: error is 1.308981 (50 iterations in 0.12 seconds)
    ## Iteration 1800: error is 1.308646 (50 iterations in 0.12 seconds)
    ## Iteration 1850: error is 1.308568 (50 iterations in 0.12 seconds)
    ## Iteration 1900: error is 1.308503 (50 iterations in 0.13 seconds)
    ## Iteration 1950: error is 1.308239 (50 iterations in 0.12 seconds)
    ## Iteration 2000: error is 1.307966 (50 iterations in 0.15 seconds)
    ## Iteration 2050: error is 1.307518 (50 iterations in 0.16 seconds)
    ## Iteration 2100: error is 1.307248 (50 iterations in 0.17 seconds)
    ## Iteration 2150: error is 1.307212 (50 iterations in 0.15 seconds)
    ## Iteration 2200: error is 1.307025 (50 iterations in 0.16 seconds)
    ## Iteration 2250: error is 1.306799 (50 iterations in 0.14 seconds)
    ## Iteration 2300: error is 1.306663 (50 iterations in 0.15 seconds)
    ## Iteration 2350: error is 1.306614 (50 iterations in 0.16 seconds)
    ## Iteration 2400: error is 1.306623 (50 iterations in 0.15 seconds)
    ## Iteration 2450: error is 1.306600 (50 iterations in 0.14 seconds)
    ## Iteration 2500: error is 1.306225 (50 iterations in 0.14 seconds)
    ## Iteration 2550: error is 1.305698 (50 iterations in 0.15 seconds)
    ## Iteration 2600: error is 1.305510 (50 iterations in 0.15 seconds)
    ## Iteration 2650: error is 1.305431 (50 iterations in 0.18 seconds)
    ## Iteration 2700: error is 1.305539 (50 iterations in 0.17 seconds)
    ## Iteration 2750: error is 1.305480 (50 iterations in 0.16 seconds)
    ## Iteration 2800: error is 1.305056 (50 iterations in 0.16 seconds)
    ## Iteration 2850: error is 1.305011 (50 iterations in 0.19 seconds)
    ## Iteration 2900: error is 1.304929 (50 iterations in 0.18 seconds)
    ## Iteration 2950: error is 1.303823 (50 iterations in 0.15 seconds)
    ## Iteration 3000: error is 1.303537 (50 iterations in 0.16 seconds)
    ## Iteration 3050: error is 1.303127 (50 iterations in 0.15 seconds)
    ## Iteration 3100: error is 1.302868 (50 iterations in 0.16 seconds)
    ## Iteration 3150: error is 1.302960 (50 iterations in 0.17 seconds)
    ## Iteration 3200: error is 1.302888 (50 iterations in 0.16 seconds)
    ## Iteration 3250: error is 1.302994 (50 iterations in 0.17 seconds)
    ## Iteration 3300: error is 1.302625 (50 iterations in 0.17 seconds)
    ## Iteration 3350: error is 1.302533 (50 iterations in 0.16 seconds)
    ## Iteration 3400: error is 1.302353 (50 iterations in 0.16 seconds)
    ## Iteration 3450: error is 1.302195 (50 iterations in 0.16 seconds)
    ## Iteration 3500: error is 1.302154 (50 iterations in 0.15 seconds)
    ## Iteration 3550: error is 1.302160 (50 iterations in 0.14 seconds)
    ## Iteration 3600: error is 1.302683 (50 iterations in 0.14 seconds)
    ## Iteration 3650: error is 1.302403 (50 iterations in 0.14 seconds)
    ## Iteration 3700: error is 1.302639 (50 iterations in 0.14 seconds)
    ## Iteration 3750: error is 1.302074 (50 iterations in 0.16 seconds)
    ## Iteration 3800: error is 1.301965 (50 iterations in 0.14 seconds)
    ## Iteration 3850: error is 1.301912 (50 iterations in 0.15 seconds)
    ## Iteration 3900: error is 1.301984 (50 iterations in 0.14 seconds)
    ## Iteration 3950: error is 1.301720 (50 iterations in 0.14 seconds)
    ## Iteration 4000: error is 1.301955 (50 iterations in 0.14 seconds)
    ## Iteration 4050: error is 1.301946 (50 iterations in 0.14 seconds)
    ## Iteration 4100: error is 1.301558 (50 iterations in 0.14 seconds)
    ## Iteration 4150: error is 1.301453 (50 iterations in 0.14 seconds)
    ## Iteration 4200: error is 1.301050 (50 iterations in 0.14 seconds)
    ## Iteration 4250: error is 1.301080 (50 iterations in 0.14 seconds)
    ## Iteration 4300: error is 1.300989 (50 iterations in 0.14 seconds)
    ## Iteration 4350: error is 1.301178 (50 iterations in 0.15 seconds)
    ## Iteration 4400: error is 1.301093 (50 iterations in 0.14 seconds)
    ## Iteration 4450: error is 1.301010 (50 iterations in 0.14 seconds)
    ## Iteration 4500: error is 1.300989 (50 iterations in 0.14 seconds)
    ## Iteration 4550: error is 1.300997 (50 iterations in 0.14 seconds)
    ## Iteration 4600: error is 1.301107 (50 iterations in 0.14 seconds)
    ## Iteration 4650: error is 1.300914 (50 iterations in 0.15 seconds)
    ## Iteration 4700: error is 1.301192 (50 iterations in 0.14 seconds)
    ## Iteration 4750: error is 1.301460 (50 iterations in 0.14 seconds)
    ## Iteration 4800: error is 1.301228 (50 iterations in 0.15 seconds)
    ## Iteration 4850: error is 1.301236 (50 iterations in 0.15 seconds)
    ## Iteration 4900: error is 1.301514 (50 iterations in 0.14 seconds)
    ## Iteration 4950: error is 1.301177 (50 iterations in 0.14 seconds)
    ## Iteration 5000: error is 1.300822 (50 iterations in 0.14 seconds)
    ## Iteration 5050: error is 1.300626 (50 iterations in 0.14 seconds)
    ## Iteration 5100: error is 1.300383 (50 iterations in 0.14 seconds)
    ## Iteration 5150: error is 1.300753 (50 iterations in 0.14 seconds)
    ## Iteration 5200: error is 1.300348 (50 iterations in 0.14 seconds)
    ## Iteration 5250: error is 1.299905 (50 iterations in 0.14 seconds)
    ## Iteration 5300: error is 1.299649 (50 iterations in 0.14 seconds)
    ## Iteration 5350: error is 1.299622 (50 iterations in 0.14 seconds)
    ## Iteration 5400: error is 1.299600 (50 iterations in 0.14 seconds)
    ## Iteration 5450: error is 1.299499 (50 iterations in 0.14 seconds)
    ## Iteration 5500: error is 1.299634 (50 iterations in 0.14 seconds)
    ## Iteration 5550: error is 1.299395 (50 iterations in 0.15 seconds)
    ## Iteration 5600: error is 1.299313 (50 iterations in 0.14 seconds)
    ## Iteration 5650: error is 1.299144 (50 iterations in 0.14 seconds)
    ## Iteration 5700: error is 1.299255 (50 iterations in 0.14 seconds)
    ## Iteration 5750: error is 1.299210 (50 iterations in 0.15 seconds)
    ## Iteration 5800: error is 1.299146 (50 iterations in 0.15 seconds)
    ## Iteration 5850: error is 1.299067 (50 iterations in 0.15 seconds)
    ## Iteration 5900: error is 1.299058 (50 iterations in 0.14 seconds)
    ## Iteration 5950: error is 1.299155 (50 iterations in 0.14 seconds)
    ## Iteration 6000: error is 1.299213 (50 iterations in 0.15 seconds)
    ## Iteration 6050: error is 1.299114 (50 iterations in 0.15 seconds)
    ## Iteration 6100: error is 1.298865 (50 iterations in 0.14 seconds)
    ## Iteration 6150: error is 1.299221 (50 iterations in 0.14 seconds)
    ## Iteration 6200: error is 1.298864 (50 iterations in 0.15 seconds)
    ## Iteration 6250: error is 1.298941 (50 iterations in 0.15 seconds)
    ## Iteration 6300: error is 1.299064 (50 iterations in 0.14 seconds)
    ## Iteration 6350: error is 1.298964 (50 iterations in 0.14 seconds)
    ## Iteration 6400: error is 1.299090 (50 iterations in 0.14 seconds)
    ## Iteration 6450: error is 1.299221 (50 iterations in 0.15 seconds)
    ## Iteration 6500: error is 1.299196 (50 iterations in 0.13 seconds)
    ## Iteration 6550: error is 1.299150 (50 iterations in 0.14 seconds)
    ## Iteration 6600: error is 1.299192 (50 iterations in 0.14 seconds)
    ## Iteration 6650: error is 1.299174 (50 iterations in 0.14 seconds)
    ## Iteration 6700: error is 1.299807 (50 iterations in 0.14 seconds)
    ## Iteration 6750: error is 1.299859 (50 iterations in 0.14 seconds)
    ## Iteration 6800: error is 1.299676 (50 iterations in 0.14 seconds)
    ## Iteration 6850: error is 1.299306 (50 iterations in 0.14 seconds)
    ## Iteration 6900: error is 1.299004 (50 iterations in 0.14 seconds)
    ## Iteration 6950: error is 1.298768 (50 iterations in 0.14 seconds)
    ## Iteration 7000: error is 1.298988 (50 iterations in 0.13 seconds)
    ## Iteration 7050: error is 1.299111 (50 iterations in 0.13 seconds)
    ## Iteration 7100: error is 1.299090 (50 iterations in 0.13 seconds)
    ## Iteration 7150: error is 1.299277 (50 iterations in 0.12 seconds)
    ## Iteration 7200: error is 1.299406 (50 iterations in 0.13 seconds)
    ## Iteration 7250: error is 1.299593 (50 iterations in 0.13 seconds)
    ## Iteration 7300: error is 1.299689 (50 iterations in 0.13 seconds)
    ## Iteration 7350: error is 1.299737 (50 iterations in 0.13 seconds)
    ## Iteration 7400: error is 1.299763 (50 iterations in 0.13 seconds)
    ## Iteration 7450: error is 1.299557 (50 iterations in 0.13 seconds)
    ## Iteration 7500: error is 1.299689 (50 iterations in 0.13 seconds)
    ## Iteration 7550: error is 1.299599 (50 iterations in 0.12 seconds)
    ## Iteration 7600: error is 1.299799 (50 iterations in 0.12 seconds)
    ## Iteration 7650: error is 1.299840 (50 iterations in 0.12 seconds)
    ## Iteration 7700: error is 1.299717 (50 iterations in 0.12 seconds)
    ## Iteration 7750: error is 1.299905 (50 iterations in 0.12 seconds)
    ## Iteration 7800: error is 1.299826 (50 iterations in 0.12 seconds)
    ## Iteration 7850: error is 1.299591 (50 iterations in 0.12 seconds)
    ## Iteration 7900: error is 1.299453 (50 iterations in 0.12 seconds)
    ## Iteration 7950: error is 1.299503 (50 iterations in 0.12 seconds)
    ## Iteration 8000: error is 1.299606 (50 iterations in 0.12 seconds)
    ## Iteration 8050: error is 1.299560 (50 iterations in 0.12 seconds)
    ## Iteration 8100: error is 1.299559 (50 iterations in 0.12 seconds)
    ## Iteration 8150: error is 1.299454 (50 iterations in 0.12 seconds)
    ## Iteration 8200: error is 1.299236 (50 iterations in 0.12 seconds)
    ## Iteration 8250: error is 1.299609 (50 iterations in 0.12 seconds)
    ## Iteration 8300: error is 1.299524 (50 iterations in 0.13 seconds)
    ## Iteration 8350: error is 1.299111 (50 iterations in 0.12 seconds)
    ## Iteration 8400: error is 1.299205 (50 iterations in 0.13 seconds)
    ## Iteration 8450: error is 1.298895 (50 iterations in 0.13 seconds)
    ## Iteration 8500: error is 1.298887 (50 iterations in 0.13 seconds)
    ## Iteration 8550: error is 1.298651 (50 iterations in 0.13 seconds)
    ## Iteration 8600: error is 1.298606 (50 iterations in 0.12 seconds)
    ## Iteration 8650: error is 1.298673 (50 iterations in 0.12 seconds)
    ## Iteration 8700: error is 1.298773 (50 iterations in 0.12 seconds)
    ## Iteration 8750: error is 1.298827 (50 iterations in 0.12 seconds)
    ## Iteration 8800: error is 1.298920 (50 iterations in 0.12 seconds)
    ## Iteration 8850: error is 1.298800 (50 iterations in 0.12 seconds)
    ## Iteration 8900: error is 1.298975 (50 iterations in 0.12 seconds)
    ## Iteration 8950: error is 1.298891 (50 iterations in 0.12 seconds)
    ## Iteration 9000: error is 1.298798 (50 iterations in 0.12 seconds)
    ## Iteration 9050: error is 1.298747 (50 iterations in 0.12 seconds)
    ## Iteration 9100: error is 1.298858 (50 iterations in 0.12 seconds)
    ## Iteration 9150: error is 1.298941 (50 iterations in 0.11 seconds)
    ## Iteration 9200: error is 1.298934 (50 iterations in 0.11 seconds)
    ## Iteration 9250: error is 1.299063 (50 iterations in 0.12 seconds)
    ## Iteration 9300: error is 1.299082 (50 iterations in 0.13 seconds)
    ## Iteration 9350: error is 1.299184 (50 iterations in 0.13 seconds)
    ## Iteration 9400: error is 1.299186 (50 iterations in 0.13 seconds)
    ## Iteration 9450: error is 1.299355 (50 iterations in 0.13 seconds)
    ## Iteration 9500: error is 1.299359 (50 iterations in 0.13 seconds)
    ## Iteration 9550: error is 1.299350 (50 iterations in 0.13 seconds)
    ## Iteration 9600: error is 1.299518 (50 iterations in 0.13 seconds)
    ## Iteration 9650: error is 1.299412 (50 iterations in 0.13 seconds)
    ## Iteration 9700: error is 1.299473 (50 iterations in 0.12 seconds)
    ## Iteration 9750: error is 1.299392 (50 iterations in 0.11 seconds)
    ## Iteration 9800: error is 1.299715 (50 iterations in 0.11 seconds)
    ## Iteration 9850: error is 1.299754 (50 iterations in 0.12 seconds)
    ## Iteration 9900: error is 1.299591 (50 iterations in 0.11 seconds)
    ## Iteration 9950: error is 1.299374 (50 iterations in 0.11 seconds)
    ## Iteration 10000: error is 1.299268 (50 iterations in 0.11 seconds)
    ## Fitting performed in 27.28 seconds.

    # Display QC plots
    cat("QC analysis completed. Generated", length(qc_results), "diagnostic plots.\n")

    ## QC analysis completed. Generated 4 diagnostic plots.

### QC Plot 1: Score Distribution

This plot shows the distribution of raw scores across all readouts for positive and negative controls.

    qc_results$score_qc

### QC Plot 2: t-SNE Visualization

Global evaluation of sample separation based on all readouts.

    qc_results$tSNE_QC

### QC Plot 3: Box Plots

Side-by-side comparison of score distributions between control groups.

    grid::grid.draw(qc_results$QC_box)

### QC Plot 4: SSMD Distribution

Distribution of SSMD scores with quality threshold (SSMD ≥ 2).

    qc_results$QC_SSMD

## Step 2: Z-score Normalization

Z-score normalization standardizes the data using negative controls as reference, making readouts comparable across different conditions.

    # Calculate Z-scores
    zscore_matrix <- Zscore(countMat, negGene)

    # Display first few rows and columns
    cat("Z-score matrix dimensions:", dim(zscore_matrix), "\n")

    ## Z-score matrix dimensions: 1609 100

    cat("First 5 rows and columns:\n")

    ## First 5 rows and columns:

    print(zscore_matrix[1:5, 1:5])

    ##           X5621.1     X157.1     X2451.1    X6798.1     X2570.1
    ## HLA-DOB -2.498000  1.8430201  0.20901748  0.7276768  1.80779786
    ## DOK2     1.665303 -2.3679279  0.45552333  2.6441584  1.49359264
    ## POU3F1   0.126659 -1.1401584  0.09130339 -0.8482665 -0.32759624
    ## VWC2     1.170266  0.3294906 -0.74381915 -0.7616473  1.52798191
    ## FGFBP3   2.042632 -1.7006933 -1.53998400 -0.7430438  0.06798774

## Step 3: Event Coverage Analysis

Event coverage quantifies the proportion of readouts that exceed different Z-score thresholds for each gene, creating the foundation for zeta score calculations.

    # Calculate event coverage
    ec_results <- EventCoverage(zscore_matrix, negGene, posGene, binNum = 100, combine = TRUE)

    # Display event coverage plots
    cat("Event coverage analysis completed.\n")

    ## Event coverage analysis completed.

### Event Coverage Plots

    # Decrease direction (exon skipping)
    ec_results[[2]]$EC_jitter_D

    # Increase direction (exon inclusion)
    ec_results[[2]]$EC_jitter_I

## Step 4: Zeta Score Calculation

Zeta scores represent the area under the event coverage curve, quantifying the cumulative regulatory effect of each gene across all Z-score thresholds.

    # Calculate zeta scores without SVM correction
    zeta_scores <- Zeta(zscore_matrix, ZseqList, SVM = FALSE)

    # Display summary statistics
    cat("Zeta score summary:\n")

    ## Zeta score summary:

    cat("Number of genes:", nrow(zeta_scores), "\n")

    ## Number of genes: 1609

    cat("Zeta_D range:", range(zeta_scores$Zeta_D), "\n")

    ## Zeta_D range: 0 2.508444

    cat("Zeta_I range:", range(zeta_scores$Zeta_I), "\n")

    ## Zeta_I range: 0.3968725 7.805159

    # Show top hits
    cat("\nTop 10 genes by Zeta_D (decrease direction):\n")

    ##
    ## Top 10 genes by Zeta_D (decrease direction):

    top_decrease <- head(zeta_scores[order(zeta_scores$Zeta_D, decreasing = TRUE), ], 10)
    print(top_decrease)

    ##          Zeta_D   Zeta_I
    ## IL11RA 2.508444 4.156137
    ## HNRNPK 2.363447 2.711962
    ## SRSF3  1.739961 7.805159
    ## 59J23  1.312221 3.726192
    ## 30K23  1.246972 3.163956
    ## 61J23  1.181724 3.836434
    ## 61N23  1.174474 3.582877
    ## 59L23  1.167224 3.770289
    ## 55I23  1.167224 3.208053
    ## 58B23  1.167224 4.409694

## Step 5: SVM Background Correction (Optional)

SVM analysis creates decision boundaries to separate positive and negative controls, enabling background correction in zeta score calculations.

    # Run SVM analysis (can be computationally intensive)
    svm_results <- SVM(ec_results)

    # Calculate zeta scores with SVM correction
    zeta_scores_svm <- Zeta(zscore_matrix, ZseqList, SVMcurve = svm_results, SVM = TRUE)

## Step 6: Screen Strength Analysis

Screen Strength analysis determines optimal cutoff thresholds by balancing sensitivity and specificity, using the ratio of apparent FDR to baseline FDR.

    # Calculate FDR cutoffs and Screen Strength
    fdr_results <- FDRcutoff(zeta_scores, negGene, posGene, nonExpGene, combine = TRUE)

    # Display Screen Strength plots
    cat("Screen Strength analysis completed.\n")

    ## Screen Strength analysis completed.

### Zeta Score Distribution by Gene Type

    fdr_results[[2]]$Zeta_type

    ## TableGrob (1 x 2) "arrange": 2 grobs
    ##   z     cells    name           grob
    ## 1 1 (1-1,1-1) arrange gtable[layout]
    ## 2 2 (1-1,2-2) arrange gtable[layout]

### Screen Strength Curves

    fdr_results[[2]]$SS_cutOff

### FDR Cutoff Results

    # Display FDR cutoff results
    fdr_table <- fdr_results[[1]]
    cat("FDR cutoff results summary:\n")

    ## FDR cutoff results summary:

    cat("Number of thresholds tested:", nrow(fdr_table), "\n")

    ## Number of thresholds tested: 101

    cat("Screen Strength range:", range(fdr_table$SS), "\n")

    ## Screen Strength range: -0.05104725 0.7336667

    # Show optimal thresholds (SS > 0.8)
    optimal_thresholds <- fdr_table[fdr_table$SS > 0.8, ]
    cat("\nOptimal thresholds (SS > 0.8):\n")

    ##
    ## Optimal thresholds (SS > 0.8):

    print(head(optimal_thresholds, 10))

    ## [1] Cut_Off    aFDR       SS         TotalHits  Num_nonExp Type
    ## <0 rows> (or 0-length row.names)

## Step 7: Hit Selection

Based on the Screen Strength analysis, select appropriate thresholds for hit identification.

    # Example: Select threshold with SS > 0.8 and reasonable number of hits
    selected_threshold <- fdr_table[fdr_table$SS > 0.8 & fdr_table$TotalHits > 50, ]
    if(nrow(selected_threshold) > 0) {
      best_threshold <- selected_threshold[which.max(selected_threshold$SS), ]
      cat("Recommended threshold:", best_threshold$Cut_Off, "\n")
      cat("Screen Strength:", best_threshold$SS, "\n")
      cat("Total hits:", best_threshold$TotalHits, "\n")

      # Identify hits
      combined_zeta <- zeta_scores$Zeta_D + zeta_scores$Zeta_I
      hits <- names(combined_zeta[combined_zeta >= best_threshold$Cut_Off])
      cat("Number of hits identified:", length(hits), "\n")
    }

# Single Cell RNA-seq Quality Control

ZetaSuite also provides functionality for single-cell RNA-seq quality control, helping to differentiate high-quality cells from damaged ones.

    # Example single cell analysis (requires single cell count matrix)
    # single_cell_results <- ZetaSuitSC(count_matrix_sc, binNum = 10, filter = TRUE)

# Advanced Usage

## Custom Parameter Settings

    # Custom event coverage analysis
    ec_custom <- EventCoverage(zscore_matrix, negGene, posGene,
                              binNum = 200,    # More bins for finer resolution
                              combine = FALSE) # Separate decrease/increase directions

    # Custom zeta score calculation with SVM
    zeta_custom <- Zeta(zscore_matrix, ZseqList,
                       SVMcurve = svm_results,
                       SVM = TRUE)  # Use SVM correction

    # Custom FDR analysis
    fdr_custom <- FDRcutoff(zeta_scores, negGene, posGene, nonExpGene,
                           combine = FALSE)  # Analyze directions separately

## Batch Processing

    # Example: Process multiple datasets
    datasets <- list(dataset1 = list(countMat = countMat1, negGene = negGene1),
                    dataset2 = list(countMat = countMat2, negGene = negGene2))

    results <- lapply(datasets, function(ds) {
      zscore <- Zscore(ds$countMat, ds$negGene)
      ec <- EventCoverage(zscore, ds$negGene, ds$posGene, binNum = 100)
      zeta <- Zeta(zscore, ZseqList, SVM = FALSE)
      return(list(zscore = zscore, ec = ec, zeta = zeta))
    })

# Interpretation Guidelines

## Quality Control Interpretation

- SSMD ≥ 2: High-quality readouts with good separation between controls
- t-SNE separation: Clear clustering indicates good experimental design
- Box plot overlap: Minimal overlap suggests effective control design

## Zeta Score Interpretation

- Higher Zeta_D: Genes promoting exon skipping
- Higher Zeta_I: Genes promoting exon inclusion
- Combined score: Overall regulatory effect strength

## Screen Strength Interpretation

- SS = 1: Perfect separation (no false positives)
- SS > 0.8: Excellent separation
- SS > 0.6: Good separation
- Optimal threshold: Balance between sensitivity and specificity

# Troubleshooting

## Common Issues

1. Insufficient controls: Ensure adequate number of positive/negative controls
2. Data quality: Check for missing values and extreme outliers
3. Memory issues: Reduce bin number for large datasets
4. SVM convergence: Adjust SVM parameters or use pre-calculated curves

## Performance Optimization

- Use `combine = TRUE` for faster event coverage analysis
- Reduce `binNum` for large datasets
- Consider using pre-calculated SVM curves for repeated analyses

# References

## Software Citation

Hao, Y., Shao, C., Zhao, G., Fu, X.D. (2021). ZetaSuite: A Computational Method for Analyzing Multi-dimensional High-throughput Data, Reveals Genes with Opposite Roles in Cancer Dependency. Forthcoming

## Dataset Citation

Shao, C., Hao, Y., Qiu, J., Zhou, B., Li, H., Zhou, Y., Meng, F., Jiang, L., Gou, L.T., Xu, J., Li, Y., Wang, H., Yeo, G.W., Wang, D., Ji, X., Glass, C.K., Aza-Blanc, P., Fu, X.D. (2021). HTS2 Screen for Global Splicing Regulators Reveals a Key Role of the Pol II Subunit RPB9 in Coupling between Transcription and Pre-mRNA Splicing. Cell. Forthcoming

# Session Information

    sessionInfo()

    ## R version 4.4.1 (2024-06-14)
    ## Platform: x86_64-apple-darwin20
    ## Running under: macOS Sonoma 14.6
    ##
    ## Matrix products: default
    ## BLAS:   /Library/Frameworks/R.framework/Versions/4.4-x86_64/Resources/lib/libRblas.0.dylib
    ## LAPACK: /Library/Frameworks/R.framework/Versions/4.4-x86_64/Resources/lib/libRlapack.dylib;  LAPACK version 3.12.0
    ##
    ## locale:
    ## [1] C/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
    ##
    ## time zone: America/New_York
    ## tzcode source: internal
    ##
    ## attached base packages:
    ## [1] stats     graphics  grDevices utils     datasets  methods   base
    ##
    ## other attached packages:
    ## [1] ZetaSuite_1.0.3
    ##
    ## loaded via a namespace (and not attached):
    ##  [1] gtable_0.3.6         xfun_0.56            bslib_0.10.0
    ##  [4] ggplot2_3.5.2        shinyjs_2.1.0        htmlwidgets_1.6.4
    ##  [7] lattice_0.22-6       vctrs_0.7.1          tools_4.4.1
    ## [10] generics_0.1.4       tibble_3.2.1         proxy_0.4-27
    ## [13] pkgconfig_2.0.3      Matrix_1.7-0         data.table_1.17.4
    ## [16] RColorBrewer_1.1-3   lifecycle_1.0.5      compiler_4.4.1
    ## [19] farver_2.1.2         stringr_1.6.0        mixtools_2.0.0.1
    ## [22] httpuv_1.6.16        htmltools_0.5.9      class_7.3-22
    ## [25] sass_0.4.10          yaml_2.3.12          lazyeval_0.2.2
    ## [28] plotly_4.10.4        pillar_1.10.2        later_1.4.2
    ## [31] jquerylib_0.1.4      tidyr_1.3.1          MASS_7.3-61
    ## [34] DT_0.33              cachem_1.1.0         nlme_3.1-166
    ## [37] mime_0.13            tidyselect_1.2.1     digest_0.6.39
    ## [40] Rtsne_0.17           stringi_1.8.7        dplyr_1.1.4
    ## [43] reshape2_1.4.4       purrr_1.2.1          kernlab_0.9-33
    ## [46] labeling_0.4.3       splines_4.4.1        fastmap_1.2.0
    ## [49] grid_4.4.1           cli_3.6.5            magrittr_2.0.4
    ## [52] dichromat_2.0-0.1    survival_3.7-0       e1071_1.7-16
    ## [55] withr_3.0.2          scales_1.4.0         promises_1.3.3
    ## [58] segmented_2.1-4      rmarkdown_2.30       httr_1.4.7
    ## [61] otel_0.2.0           gridExtra_2.3        shiny_1.10.0
    ## [64] evaluate_1.0.5       knitr_1.51           viridisLite_0.4.2
    ## [67] mgcv_1.9-1           rlang_1.1.7          Rcpp_1.1.1
    ## [70] xtable_1.8-4         glue_1.8.0           shinydashboard_0.7.3
    ## [73] rstudioapi_0.18.0    jsonlite_2.0.0       R6_2.6.1
    ## [76] plyr_1.8.9