Commit b54d9486 authored by Lena Hersemann's avatar Lena Hersemann

'standard' information on proteinGroup level will now only be reported if...

'standard' information on proteinGroup level will now only be reported if corresponding data are available
parent d41414fe
......@@ -233,12 +233,18 @@ init_stat_plot %>% ggplot(aes(intensity, fill = feature, color = feature)) +
#' <br><br>
#'
#' ### LFQ and raw intensities of STANDARDS on protein level
contr_data %>% gather(sample, intensity, -c(GROUP, protein_ids, fasta_headers)) %>%
mutate(feature = str_match(sample, "lfq_intensity|intensity")[,1],
feature = case_when(feature == "intensity"~"raw intensity", feature == "lfq_intensity"~"lfq intensity"),
sample = str_replace(sample, "lfq_intensity_|intensity_", ""),
intensity = as.numeric(intensity)
) %>% ggplot(aes(feature, intensity)) + geom_boxplot()
if (nrow(contr_data) > 0){
contr_data %>% gather(sample, intensity, -c(GROUP, protein_ids, fasta_headers)) %>%
mutate(feature = str_match(sample, "lfq_intensity|intensity")[,1],
feature = case_when(feature == "intensity"~"raw intensity", feature == "lfq_intensity"~"lfq intensity"),
sample = str_replace(sample, "lfq_intensity_|intensity_", ""),
intensity = as.numeric(intensity)
) %>% ggplot(aes(feature, intensity)) + geom_boxplot()
} else {
print("No standard information found")
}
......@@ -248,7 +254,7 @@ contr_data %>% gather(sample, intensity, -c(GROUP, protein_ids, fasta_headers))
#' ### LFQ and raw intensities of STANDARDS on peptide level
pepFiles <- list.files(ms_data_folder, pattern = "peptides.txt", full = TRUE)
if (!is_empty(pepFiles)){
if (!is_empty(pepFiles) & nrow(contr_data) > 0){
std_info = pepFiles %>%
map(~ read_tsv(.x) %>% pretty_columns() %>%
......@@ -270,7 +276,7 @@ if (!is_empty(pepFiles)){
theme(axis.text.x = element_text(angle = 45, hjust = 1))
} else {
print("peptide level information were not provided")
print("Peptide level information were not provided or standard information were not found")
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment