This function calculates the coverage based on the immune profile mass and calibration data.

get_coverage(immune_profile_mass, cal)

Arguments

immune_profile_mass

A data frame containing the immune profile mass information.

cal

A data frame containing the calibration data.

Value

The coverage value. If the product in the immune profile mass is "mat", it returns the mean of the positive coverage values from the calibration data. Otherwise, it returns 0.

Examples

immune_profile_mass <- data.frame(product = "mat")
cal <- data.frame(cov = c(0.1, 0.2, 0, -0.1))
get_coverage(immune_profile_mass, cal)
#> [1] 0.15