Skip to contents

Computes the median depth for each variant from the depth matrix and adds it to the V.fitered slot by joining with the variant information.

Usage

add_median_depth_to_redeemR(redeemR)

Arguments

redeemR

A redeemR object that contains a depth matrix in @Ctx.Mtx.depth

Value

The input redeemR object with median_depth column added to @V.fitered

Details

This function:

  1. Extracts the depth matrix from the redeemR object

  2. Computes median depth for each variant (column) in the depth matrix

  3. Converts variant names using convert_variant() for proper joining

  4. Joins the median depth information with V.fitered

  5. Returns the modified redeemR object

Examples

if (FALSE) {
redeemR <- add_median_depth_to_redeemR(redeemR)
}