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

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

#### 2025-09-24

# 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.10 seconds (sparsity = 0.172586)!
    ## Learning embedding...
    ## Iteration 50: error is 58.792481 (50 iterations in 0.16 seconds)
    ## Iteration 100: error is 58.044323 (50 iterations in 0.12 seconds)
    ## Iteration 150: error is 57.899429 (50 iterations in 0.10 seconds)
    ## Iteration 200: error is 57.735207 (50 iterations in 0.10 seconds)
    ## Iteration 250: error is 57.730947 (50 iterations in 0.13 seconds)
    ## Iteration 300: error is 1.477555 (50 iterations in 0.11 seconds)
    ## Iteration 350: error is 1.373214 (50 iterations in 0.09 seconds)
    ## Iteration 400: error is 1.345901 (50 iterations in 0.07 seconds)
    ## Iteration 450: error is 1.335231 (50 iterations in 0.08 seconds)
    ## Iteration 500: error is 1.328452 (50 iterations in 0.08 seconds)
    ## Iteration 550: error is 1.323155 (50 iterations in 0.08 seconds)
    ## Iteration 600: error is 1.320530 (50 iterations in 0.08 seconds)
    ## Iteration 650: error is 1.318362 (50 iterations in 0.07 seconds)
    ## Iteration 700: error is 1.315591 (50 iterations in 0.08 seconds)
    ## Iteration 750: error is 1.313996 (50 iterations in 0.09 seconds)
    ## Iteration 800: error is 1.311416 (50 iterations in 0.12 seconds)
    ## Iteration 850: error is 1.308957 (50 iterations in 0.12 seconds)
    ## Iteration 900: error is 1.307332 (50 iterations in 0.10 seconds)
    ## Iteration 950: error is 1.306168 (50 iterations in 0.09 seconds)
    ## Iteration 1000: error is 1.305032 (50 iterations in 0.08 seconds)
    ## Iteration 1050: error is 1.304725 (50 iterations in 0.08 seconds)
    ## Iteration 1100: error is 1.303595 (50 iterations in 0.08 seconds)
    ## Iteration 1150: error is 1.302924 (50 iterations in 0.08 seconds)
    ## Iteration 1200: error is 1.302380 (50 iterations in 0.08 seconds)
    ## Iteration 1250: error is 1.302024 (50 iterations in 0.09 seconds)
    ## Iteration 1300: error is 1.300993 (50 iterations in 0.12 seconds)
    ## Iteration 1350: error is 1.300642 (50 iterations in 0.10 seconds)
    ## Iteration 1400: error is 1.300298 (50 iterations in 0.10 seconds)
    ## Iteration 1450: error is 1.299912 (50 iterations in 0.09 seconds)
    ## Iteration 1500: error is 1.299262 (50 iterations in 0.10 seconds)
    ## Iteration 1550: error is 1.299266 (50 iterations in 0.09 seconds)
    ## Iteration 1600: error is 1.298967 (50 iterations in 0.09 seconds)
    ## Iteration 1650: error is 1.298878 (50 iterations in 0.08 seconds)
    ## Iteration 1700: error is 1.298853 (50 iterations in 0.08 seconds)
    ## Iteration 1750: error is 1.298294 (50 iterations in 0.09 seconds)
    ## Iteration 1800: error is 1.298310 (50 iterations in 0.08 seconds)
    ## Iteration 1850: error is 1.298140 (50 iterations in 0.08 seconds)
    ## Iteration 1900: error is 1.297553 (50 iterations in 0.09 seconds)
    ## Iteration 1950: error is 1.297613 (50 iterations in 0.08 seconds)
    ## Iteration 2000: error is 1.297542 (50 iterations in 0.08 seconds)
    ## Iteration 2050: error is 1.297567 (50 iterations in 0.09 seconds)
    ## Iteration 2100: error is 1.297434 (50 iterations in 0.09 seconds)
    ## Iteration 2150: error is 1.296847 (50 iterations in 0.09 seconds)
    ## Iteration 2200: error is 1.296559 (50 iterations in 0.09 seconds)
    ## Iteration 2250: error is 1.296587 (50 iterations in 0.09 seconds)
    ## Iteration 2300: error is 1.296799 (50 iterations in 0.09 seconds)
    ## Iteration 2350: error is 1.296697 (50 iterations in 0.09 seconds)
    ## Iteration 2400: error is 1.297259 (50 iterations in 0.09 seconds)
    ## Iteration 2450: error is 1.297224 (50 iterations in 0.09 seconds)
    ## Iteration 2500: error is 1.297293 (50 iterations in 0.09 seconds)
    ## Iteration 2550: error is 1.296932 (50 iterations in 0.09 seconds)
    ## Iteration 2600: error is 1.296870 (50 iterations in 0.09 seconds)
    ## Iteration 2650: error is 1.296522 (50 iterations in 0.09 seconds)
    ## Iteration 2700: error is 1.296477 (50 iterations in 0.09 seconds)
    ## Iteration 2750: error is 1.296097 (50 iterations in 0.09 seconds)
    ## Iteration 2800: error is 1.295994 (50 iterations in 0.09 seconds)
    ## Iteration 2850: error is 1.295679 (50 iterations in 0.09 seconds)
    ## Iteration 2900: error is 1.295474 (50 iterations in 0.09 seconds)
    ## Iteration 2950: error is 1.295486 (50 iterations in 0.09 seconds)
    ## Iteration 3000: error is 1.295618 (50 iterations in 0.09 seconds)
    ## Iteration 3050: error is 1.295736 (50 iterations in 0.09 seconds)
    ## Iteration 3100: error is 1.295910 (50 iterations in 0.09 seconds)
    ## Iteration 3150: error is 1.296099 (50 iterations in 0.09 seconds)
    ## Iteration 3200: error is 1.295855 (50 iterations in 0.09 seconds)
    ## Iteration 3250: error is 1.296204 (50 iterations in 0.09 seconds)
    ## Iteration 3300: error is 1.295575 (50 iterations in 0.09 seconds)
    ## Iteration 3350: error is 1.295451 (50 iterations in 0.09 seconds)
    ## Iteration 3400: error is 1.295312 (50 iterations in 0.13 seconds)
    ## Iteration 3450: error is 1.294831 (50 iterations in 0.14 seconds)
    ## Iteration 3500: error is 1.294681 (50 iterations in 0.10 seconds)
    ## Iteration 3550: error is 1.294288 (50 iterations in 0.09 seconds)
    ## Iteration 3600: error is 1.293997 (50 iterations in 0.09 seconds)
    ## Iteration 3650: error is 1.294622 (50 iterations in 0.12 seconds)
    ## Iteration 3700: error is 1.294882 (50 iterations in 0.14 seconds)
    ## Iteration 3750: error is 1.294623 (50 iterations in 0.10 seconds)
    ## Iteration 3800: error is 1.294572 (50 iterations in 0.13 seconds)
    ## Iteration 3850: error is 1.294384 (50 iterations in 0.10 seconds)
    ## Iteration 3900: error is 1.294524 (50 iterations in 0.09 seconds)
    ## Iteration 3950: error is 1.294261 (50 iterations in 0.09 seconds)
    ## Iteration 4000: error is 1.293976 (50 iterations in 0.09 seconds)
    ## Iteration 4050: error is 1.293548 (50 iterations in 0.09 seconds)
    ## Iteration 4100: error is 1.293581 (50 iterations in 0.09 seconds)
    ## Iteration 4150: error is 1.293121 (50 iterations in 0.09 seconds)
    ## Iteration 4200: error is 1.293244 (50 iterations in 0.09 seconds)
    ## Iteration 4250: error is 1.292858 (50 iterations in 0.09 seconds)
    ## Iteration 4300: error is 1.292534 (50 iterations in 0.09 seconds)
    ## Iteration 4350: error is 1.292016 (50 iterations in 0.12 seconds)
    ## Iteration 4400: error is 1.292296 (50 iterations in 0.16 seconds)
    ## Iteration 4450: error is 1.292060 (50 iterations in 0.10 seconds)
    ## Iteration 4500: error is 1.292095 (50 iterations in 0.12 seconds)
    ## Iteration 4550: error is 1.292097 (50 iterations in 0.12 seconds)
    ## Iteration 4600: error is 1.292091 (50 iterations in 0.09 seconds)
    ## Iteration 4650: error is 1.292083 (50 iterations in 0.09 seconds)
    ## Iteration 4700: error is 1.292329 (50 iterations in 0.10 seconds)
    ## Iteration 4750: error is 1.292624 (50 iterations in 0.13 seconds)
    ## Iteration 4800: error is 1.292570 (50 iterations in 0.10 seconds)
    ## Iteration 4850: error is 1.292417 (50 iterations in 0.10 seconds)
    ## Iteration 4900: error is 1.292668 (50 iterations in 0.12 seconds)
    ## Iteration 4950: error is 1.292599 (50 iterations in 0.10 seconds)
    ## Iteration 5000: error is 1.292317 (50 iterations in 0.10 seconds)
    ## Iteration 5050: error is 1.292413 (50 iterations in 0.10 seconds)
    ## Iteration 5100: error is 1.292734 (50 iterations in 0.10 seconds)
    ## Iteration 5150: error is 1.292651 (50 iterations in 0.10 seconds)
    ## Iteration 5200: error is 1.292424 (50 iterations in 0.10 seconds)
    ## Iteration 5250: error is 1.292275 (50 iterations in 0.10 seconds)
    ## Iteration 5300: error is 1.292080 (50 iterations in 0.10 seconds)
    ## Iteration 5350: error is 1.292122 (50 iterations in 0.10 seconds)
    ## Iteration 5400: error is 1.291716 (50 iterations in 0.10 seconds)
    ## Iteration 5450: error is 1.291369 (50 iterations in 0.10 seconds)
    ## Iteration 5500: error is 1.291324 (50 iterations in 0.10 seconds)
    ## Iteration 5550: error is 1.291381 (50 iterations in 0.10 seconds)
    ## Iteration 5600: error is 1.291031 (50 iterations in 0.10 seconds)
    ## Iteration 5650: error is 1.291606 (50 iterations in 0.10 seconds)
    ## Iteration 5700: error is 1.292028 (50 iterations in 0.12 seconds)
    ## Iteration 5750: error is 1.291639 (50 iterations in 0.14 seconds)
    ## Iteration 5800: error is 1.291714 (50 iterations in 0.12 seconds)
    ## Iteration 5850: error is 1.291560 (50 iterations in 0.14 seconds)
    ## Iteration 5900: error is 1.291424 (50 iterations in 0.10 seconds)
    ## Iteration 5950: error is 1.291357 (50 iterations in 0.10 seconds)
    ## Iteration 6000: error is 1.291374 (50 iterations in 0.12 seconds)
    ## Iteration 6050: error is 1.291860 (50 iterations in 0.14 seconds)
    ## Iteration 6100: error is 1.292112 (50 iterations in 0.10 seconds)
    ## Iteration 6150: error is 1.291984 (50 iterations in 0.14 seconds)
    ## Iteration 6200: error is 1.292128 (50 iterations in 0.10 seconds)
    ## Iteration 6250: error is 1.292029 (50 iterations in 0.10 seconds)
    ## Iteration 6300: error is 1.291498 (50 iterations in 0.10 seconds)
    ## Iteration 6350: error is 1.291751 (50 iterations in 0.10 seconds)
    ## Iteration 6400: error is 1.291543 (50 iterations in 0.11 seconds)
    ## Iteration 6450: error is 1.291437 (50 iterations in 0.12 seconds)
    ## Iteration 6500: error is 1.290894 (50 iterations in 0.15 seconds)
    ## Iteration 6550: error is 1.290728 (50 iterations in 0.11 seconds)
    ## Iteration 6600: error is 1.290844 (50 iterations in 0.15 seconds)
    ## Iteration 6650: error is 1.290725 (50 iterations in 0.11 seconds)
    ## Iteration 6700: error is 1.290618 (50 iterations in 0.10 seconds)
    ## Iteration 6750: error is 1.290392 (50 iterations in 0.11 seconds)
    ## Iteration 6800: error is 1.290561 (50 iterations in 0.10 seconds)
    ## Iteration 6850: error is 1.290726 (50 iterations in 0.13 seconds)
    ## Iteration 6900: error is 1.290605 (50 iterations in 0.12 seconds)
    ## Iteration 6950: error is 1.290722 (50 iterations in 0.11 seconds)
    ## Iteration 7000: error is 1.290728 (50 iterations in 0.10 seconds)
    ## Iteration 7050: error is 1.290776 (50 iterations in 0.10 seconds)
    ## Iteration 7100: error is 1.290636 (50 iterations in 0.10 seconds)
    ## Iteration 7150: error is 1.290769 (50 iterations in 0.12 seconds)
    ## Iteration 7200: error is 1.290527 (50 iterations in 0.12 seconds)
    ## Iteration 7250: error is 1.290889 (50 iterations in 0.10 seconds)
    ## Iteration 7300: error is 1.291001 (50 iterations in 0.10 seconds)
    ## Iteration 7350: error is 1.290998 (50 iterations in 0.10 seconds)
    ## Iteration 7400: error is 1.290449 (50 iterations in 0.11 seconds)
    ## Iteration 7450: error is 1.290416 (50 iterations in 0.10 seconds)
    ## Iteration 7500: error is 1.290082 (50 iterations in 0.10 seconds)
    ## Iteration 7550: error is 1.290365 (50 iterations in 0.10 seconds)
    ## Iteration 7600: error is 1.290188 (50 iterations in 0.10 seconds)
    ## Iteration 7650: error is 1.290155 (50 iterations in 0.10 seconds)
    ## Iteration 7700: error is 1.290437 (50 iterations in 0.10 seconds)
    ## Iteration 7750: error is 1.290429 (50 iterations in 0.10 seconds)
    ## Iteration 7800: error is 1.290518 (50 iterations in 0.10 seconds)
    ## Iteration 7850: error is 1.290362 (50 iterations in 0.10 seconds)
    ## Iteration 7900: error is 1.290091 (50 iterations in 0.10 seconds)
    ## Iteration 7950: error is 1.289676 (50 iterations in 0.10 seconds)
    ## Iteration 8000: error is 1.289429 (50 iterations in 0.10 seconds)
    ## Iteration 8050: error is 1.289620 (50 iterations in 0.11 seconds)
    ## Iteration 8100: error is 1.289368 (50 iterations in 0.10 seconds)
    ## Iteration 8150: error is 1.289605 (50 iterations in 0.10 seconds)
    ## Iteration 8200: error is 1.290116 (50 iterations in 0.10 seconds)
    ## Iteration 8250: error is 1.289835 (50 iterations in 0.10 seconds)
    ## Iteration 8300: error is 1.290155 (50 iterations in 0.10 seconds)
    ## Iteration 8350: error is 1.290026 (50 iterations in 0.10 seconds)
    ## Iteration 8400: error is 1.290042 (50 iterations in 0.10 seconds)
    ## Iteration 8450: error is 1.289886 (50 iterations in 0.10 seconds)
    ## Iteration 8500: error is 1.289983 (50 iterations in 0.10 seconds)
    ## Iteration 8550: error is 1.289664 (50 iterations in 0.11 seconds)
    ## Iteration 8600: error is 1.289917 (50 iterations in 0.12 seconds)
    ## Iteration 8650: error is 1.289612 (50 iterations in 0.11 seconds)
    ## Iteration 8700: error is 1.289587 (50 iterations in 0.12 seconds)
    ## Iteration 8750: error is 1.289933 (50 iterations in 0.12 seconds)
    ## Iteration 8800: error is 1.290099 (50 iterations in 0.11 seconds)
    ## Iteration 8850: error is 1.289897 (50 iterations in 0.10 seconds)
    ## Iteration 8900: error is 1.290232 (50 iterations in 0.11 seconds)
    ## Iteration 8950: error is 1.289500 (50 iterations in 0.11 seconds)
    ## Iteration 9000: error is 1.288861 (50 iterations in 0.11 seconds)
    ## Iteration 9050: error is 1.288386 (50 iterations in 0.13 seconds)
    ## Iteration 9100: error is 1.288436 (50 iterations in 0.11 seconds)
    ## Iteration 9150: error is 1.287972 (50 iterations in 0.11 seconds)
    ## Iteration 9200: error is 1.288008 (50 iterations in 0.14 seconds)
    ## Iteration 9250: error is 1.287712 (50 iterations in 0.11 seconds)
    ## Iteration 9300: error is 1.288005 (50 iterations in 0.14 seconds)
    ## Iteration 9350: error is 1.287876 (50 iterations in 0.11 seconds)
    ## Iteration 9400: error is 1.287635 (50 iterations in 0.10 seconds)
    ## Iteration 9450: error is 1.287788 (50 iterations in 0.11 seconds)
    ## Iteration 9500: error is 1.287926 (50 iterations in 0.11 seconds)
    ## Iteration 9550: error is 1.287479 (50 iterations in 0.13 seconds)
    ## Iteration 9600: error is 1.287173 (50 iterations in 0.14 seconds)
    ## Iteration 9650: error is 1.287117 (50 iterations in 0.12 seconds)
    ## Iteration 9700: error is 1.286703 (50 iterations in 0.14 seconds)
    ## Iteration 9750: error is 1.286660 (50 iterations in 0.13 seconds)
    ## Iteration 9800: error is 1.286627 (50 iterations in 0.14 seconds)
    ## Iteration 9850: error is 1.286453 (50 iterations in 0.13 seconds)
    ## Iteration 9900: error is 1.286301 (50 iterations in 0.11 seconds)
    ## Iteration 9950: error is 1.286328 (50 iterations in 0.11 seconds)
    ## Iteration 10000: error is 1.286097 (50 iterations in 0.13 seconds)
    ## Fitting performed in 20.67 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.2
    ##
    ## loaded via a namespace (and not attached):
    ##  [1] gtable_0.3.6         xfun_0.52            bslib_0.9.0
    ##  [4] ggplot2_3.5.2        shinyjs_2.1.0        htmlwidgets_1.6.4
    ##  [7] lattice_0.22-6       vctrs_0.6.5          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.4      compiler_4.4.1
    ## [19] farver_2.1.2         stringr_1.5.1        mixtools_2.0.0.1
    ## [22] httpuv_1.6.16        htmltools_0.5.8.1    class_7.3-22
    ## [25] sass_0.4.10          yaml_2.3.10          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.37
    ## [40] Rtsne_0.17           stringi_1.8.7        dplyr_1.1.4
    ## [43] reshape2_1.4.4       purrr_1.0.4          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.3
    ## [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.29       httr_1.4.7
    ## [61] gridExtra_2.3        shiny_1.10.0         evaluate_1.0.3
    ## [64] knitr_1.50           viridisLite_0.4.2    mgcv_1.9-1
    ## [67] rlang_1.1.6          Rcpp_1.0.14          xtable_1.8-4
    ## [70] glue_1.8.0           shinydashboard_0.7.3 rstudioapi_0.17.1
    ## [73] jsonlite_2.0.0       R6_2.6.1             plyr_1.8.9