2.3 Create Study Design Tables
Aside from the fractions table, the other study design tables can be the same as those created for the global proteomics data. This is because the datasets are different. The study design tables have been added to the data package (end of Section 1.3.3), so we can use get_study_design_by_dataset_package
.
# Create fractions table
<- unique(intersect(msnid$Dataset, masic_data$Dataset))
datasets <- data.frame(Dataset = datasets) %>%
fractions mutate(PlexID = gsub(".*_P_(S\\d{1})_.*", "\\1", Dataset))
# Use global samples and references tables
<- get_study_design_by_dataset_package(3442)
study_design <- study_design$samples
samples <- study_design$references references
# Save phospho fractions table
write.table(fractions, file = "data/3626_fractions.txt",
sep = "\t", quote = FALSE, row.names = FALSE)