# Load libraries
library(dplyr)
set.seed(123) # Makes example reproducible
# Create example data
data <- create_synthetic_data(
n_proteins = 100,
frac_change = 0.05,
n_replicates = 3,
n_conditions = 2,
method = "effect_random"
) %>%
mutate(intensity_non_log2 = 2^peptide_intensity_missing)
# Determine peptide type percentages
qc_peptide_type(
data = data,
sample = sample,
peptide = peptide,
pep_type = pep_type,
intensity = intensity_non_log2,
method = "intensity",
plot = FALSE
)
# Plot peptide type
qc_peptide_type(
data = data,
sample = sample,
peptide = peptide,
pep_type = pep_type,
intensity = intensity_non_log2,
method = "intensity",
plot = TRUE
)
Run the code above in your browser using DataLab