Commit 11085b4c authored by Lena Hersemann's avatar Lena Hersemann

fixed bug: STANDARDS on peptide level are now only reported if the data are available

parent 4f286ff2
......@@ -21,7 +21,7 @@ Options:
'
#commandArgs <- function(x) c("--renaming_scheme", "renaming_scheme.txt", "../provided", "exp_design.txt")
#commandArgs <- function(x) c("--renaming_scheme", "../provided/renaming_scheme.xlsx", "../provided/20181122-133344-Barbara-scaffoldDB-all-txt", "exp_design.txt")
#commandArgs <- function(x) c("../provided/20181122-133344-Barbara-scaffoldDB-all-txt", "exp_design.txt")
#commandArgs <- function(x) c("../provided/20181102-Bar-MQ-Scaffold_Holger", "../provided/renaming_scheme.xlsx")
......@@ -233,24 +233,29 @@ rbind(init_stat %>% filter(str_detect(protein_ids, "STANDARD")) %>%
#' ### LFQ and raw intensities of STANDARDS on peptide level
pepFiles <- list.files(ms_data_folder, pattern = "peptides.txt", full = TRUE)
std_info = pepFiles %>%
map(~ read_tsv(.x) %>% pretty_columns() %>%
select(proteins, sequence, matches("^lfq_intensity_"), matches("^intensity_")) %>%
filter(str_detect(proteins, "STANDARD"))) %>%
setNames(basename(pepFiles)) %>%
map_df(~ gather(.x, feature, intensity, contains("intensity")) %>%
separate(feature, c("type", "sample"), sep = "sity_"), .id = 'GROUP') %>%
mutate(sample = str_replace_all(sample, oldNames, newNames), type = str_replace(type, "inten", "intensity"))
if (!is_empty(pepFiles)){
print("STANDARD intensities on peptide level are available for the following samples:")
unique(std_info$sample)
std_info = pepFiles %>%
map(~ read_tsv(.x) %>% pretty_columns() %>%
select(proteins, sequence, matches("^lfq_intensity_"), matches("^intensity_")) %>%
filter(str_detect(proteins, "STANDARD"))) %>%
setNames(basename(pepFiles)) %>%
map_df(~ gather(.x, feature, intensity, contains("intensity")) %>%
separate(feature, c("type", "sample"), sep = "sity_"), .id = 'GROUP') %>%
mutate(sample = str_replace_all(sample, oldNames, newNames), type = str_replace(type, "inten", "intensity"))
print("STANDARD intensities on peptide level are available for the following samples:")
unique(std_info$sample)
std_info %>% ggplot(aes(sample, intensity, fill = type)) + geom_boxplot() + coord_flip()
std_info %>%
ggplot(aes(sample, sequence, fill = intensity)) + geom_tile() + facet_wrap(~type) +
theme(axis.text.x = element_text(angle = 45, hjust = 1))
std_info %>% ggplot(aes(sample, intensity, fill = type)) + geom_boxplot() + coord_flip()
std_info %>%
ggplot(aes(sample, sequence, fill = intensity)) + geom_tile() + facet_wrap(~type) +
theme(axis.text.x = element_text(angle = 45, hjust = 1))
} else {}
# init_stat %>% select(GROUP, protein_ids, unique_entry, ambiguous_entry, scrap_prop_unique, scrap_prop_ambiguous, matches("lfq_intensity")) %>%
......
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