Commit b6d3a968 authored by Lena Hersemann's avatar Lena Hersemann

imputation information are now added to the final limma results

parent edabaa22
......@@ -163,6 +163,7 @@ expMatrix = countData %>%
# remove rows with rowSums == 0
# to remove non-zero rows slightly changes the results
all_rows <- expMatrix %>% nrow()
expMatrix <- expMatrix[rowSums(expMatrix) > 0, ]
non_zero_rows <- expMatrix %>% nrow()
......@@ -485,6 +486,26 @@ if(nrow(degs)>0){
#'
#'<br>
#'
imp_info <- file.path(ms_data_infos, "data_prep.imputation_info.txt")
if (file.exists(ident_info)) {
imp <- read_tsv(imp_info)
# extract which condition is reported in the de_results
d <- gather(imp, feature, value, -intensity) %>% filter(value %in% unique(deAnnot$condition_1)) %$% feature %>% unique()
imp <- imp[,colnames(imp) %in% c("protein_ids", "is_imputed", d)] %>%
push_left(c("protein_ids", "is_imputed"))
colnames(imp)[3] <- "condition"
imp %<>% group_by(protein_ids, condition) %>%
count(is_imputed) %>%
select(-n)
deAnnot %<>%
left_join(imp %>% rename(c1_imp = is_imputed), by = c("protein_ids", "condition_1" = "condition")) %>%
left_join(imp %>% rename(c2_imp = is_imputed), by = c("protein_ids", "condition_2" = "condition"))
}
########################################################################################################################
#' ## Results & Discussion
......
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