diff --git a/DESCRIPTION b/DESCRIPTION index 7be052c..f77aaf9 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Package: artMS Type: Package Title: Analytical R tools for Mass Spectrometry -Version: 1.7.5 -Date: 2020-05-20 +Version: 1.7.6 +Date: 2020-10-21 Authors@R: c(person("David", "Jimenez-Morales", role = c("aut","cre"), email = "biodavidjm@gmail.com", comment = c(ORCID = "0000-0003-4356-6461")), diff --git a/NAMESPACE b/NAMESPACE index a676296..5889d1d 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -114,6 +114,7 @@ importFrom(stats,sd) importFrom(tidyr,pivot_longer) importFrom(tidyr,pivot_wider) importFrom(tidyr,unnest) +importFrom(utils,capture.output) importFrom(utils,combn) importFrom(utils,globalVariables) importFrom(utils,head) diff --git a/NEWS b/NEWS index 1838f92..e34f599 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,14 @@ + +Changes in version 1.6.6 (2020-10-21) ++ Convert new MaxQuant format of PTMs to the old format ++ MSstats messages are not displayed by default when using artmsQuantification. +The user can enable MSstats messages by selecting "display_msstats = TRUE" ++ Prevent artmsWriteConfigYamlFile() from overwriting an existing configuration +file unless the user allows it (overwrite = TRUE) ++ printPDF now available in all functions printing plots to pdf, which means that +notebooks can be used and print all plots. Default is still printPDF = TRUE ++ Fix bugs + Changes in version 1.6.5 (2020-05-20) + Fix ggplot warnings (caused by NA values) + Fix artmsAnalysisQuantification reproducibility plots diff --git a/R/MSstats_functions.R b/R/MSstats_functions.R index 5964e45..f26e865 100644 --- a/R/MSstats_functions.R +++ b/R/MSstats_functions.R @@ -130,7 +130,7 @@ artmsChangeColumnName <- function(dataset, oldname, newname) { if(verbose) message(">> FILTERING ") if (config$data$filters$contaminants) { - x <- artmsFilterEvidenceContaminants(x) + x <- artmsFilterEvidenceContaminants(x, verbose = verbose) } if (config$data$filters$protein_groups == 'remove') { diff --git a/R/analysisQuantifications.R b/R/analysisQuantifications.R index 72f040a..7af3170 100644 --- a/R/analysisQuantifications.R +++ b/R/analysisQuantifications.R @@ -71,13 +71,15 @@ #' @param plotPropImputation (logical) if `TRUE` plots proportion of overall #' imputation #' @param plotHeatmapsChanges (logical) if `TRUE` plots heatmaps of quantified -#' changes (both all and significant only) +#' changes (both all and significant only). Only if `printPDF` is also `TRUE` #' @param plotTotalQuant (logical) if `TRUE` plots barplot of total number of #' quantifications per comparison #' @param plotClusteringAnalysis (logical) if `TRUE` performs clustering #' analysis between quantified comparisons (more than 1 comparison required) #' @param data_object (logical) flag to indicate whether the required files #' are data objects. Default is FALSE +#' @param printPDF If `TRUE` (default) prints out the pdfs. Warning: plot +#' objects are not returned due to the large number of them. #' @param verbose (logical) `TRUE` (default) shows function messages #' @return (data.frame) summary of quantifications, including annotations, #' enrichments, etc @@ -114,6 +116,7 @@ artmsAnalysisQuantifications <- function(log2fc_file, plotTotalQuant = TRUE, plotClusteringAnalysis = TRUE, data_object = FALSE, + printPDF = TRUE, verbose = TRUE ) { @@ -125,7 +128,7 @@ artmsAnalysisQuantifications <- function(log2fc_file, # outliers = "keep" # enrich = TRUE # l2fc_thres = 1 - # choosePvalue = "pvalue" + # choosePvalue = "adjpvalue" # isBackground = "nobackground" # isPtm = "global" # mnbr = 2 @@ -142,9 +145,10 @@ artmsAnalysisQuantifications <- function(log2fc_file, # plotHeatmapsChanges = TRUE # plotTotalQuant = TRUE # plotClusteringAnalysis = TRUE - # data_object = TRUE + # data_object = FALSE + # printPDF = TRUE # verbose = TRUE - + Uniprot_PTM = imputed = Gene_Protein = NULL if(verbose){ @@ -353,10 +357,10 @@ artmsAnalysisQuantifications <- function(log2fc_file, out.outliers <- gsub(".txt", paste0("-outliers-removed-",outliers,".pdf"), log2fc_file) out.outliers <- paste0(output_dir, "/", out.outliers) - pdf(out.outliers) + if(printPDF) pdf(out.outliers) plot(k) plot(l) - garbage <- dev.off() + if(printPDF) garbage <- dev.off() if(verbose) message("------> Check table and plot to find out more about outliers removed") @@ -561,13 +565,13 @@ artmsAnalysisQuantifications <- function(log2fc_file, # DISTRIBUTION PRINT OUTS distributionsOut <- gsub(".txt", ".distributions.pdf", log2fc_file) distributionsOut <- paste0(output_dir, "/", distributionsOut) - pdf(distributionsOut) - plotDFdistColor - plotDFdistAll - plotDFdistiLog - plotPvalues - plotAdjustedPvalues - plotAdjustedIpvalues + if(printPDF) pdf(distributionsOut) + print(plotDFdistColor) + print(plotDFdistAll) + print(plotDFdistiLog) + print(plotPvalues) + print(plotAdjustedPvalues) + print(plotAdjustedIpvalues) if (numberInfinites > 0) { hist( @@ -624,7 +628,7 @@ artmsAnalysisQuantifications <- function(log2fc_file, ), xlab = "log2FC" ) - garbage <- dev.off() + if(printPDF) garbage <- dev.off() } @@ -644,10 +648,10 @@ artmsAnalysisQuantifications <- function(log2fc_file, abundancesName <- gsub(".txt", ".relativeABUNDANCE.pdf", log2fc_file) abundancesName <- paste0("plot.", abundancesName) abundancesName <- paste0(output_dir, "/", abundancesName) - pdf(abundancesName) + if(printPDF) pdf(abundancesName) .artms_plotAbundanceBoxplots(df = dfmq) .artms_plotNumberProteinsAbundance(df = dfmq) - garbage <- dev.off() + if(printPDF) garbage <- dev.off() } # Reproducibility plots based on normalized abundance @@ -656,9 +660,9 @@ artmsAnalysisQuantifications <- function(log2fc_file, reproName <- gsub(".txt", ".reproducibilityAbundance.pdf", log2fc_file) reproName <- paste0("plot.", reproName) reproName <- paste0(output_dir, "/", reproName) - pdf(reproName) + if(printPDF) pdf(reproName) .artms_plotReproducibilityAbundance(x = dfmq, verbose = verbose) - garbage <- dev.off() + if(printPDF) garbage <- dev.off() } # Conditions @@ -667,10 +671,10 @@ artmsAnalysisQuantifications <- function(log2fc_file, relaCond <- gsub(".txt", ".correlationConditions.pdf", log2fc_file) relaCond <- paste0("plot.", relaCond) relaCond <- paste0(output_dir, "/", relaCond) - pdf(relaCond) + if(printPDF) pdf(relaCond) .artms_plotCorrelationConditions(x = dfmq, numberBiologicalReplicas = numberBioReplicas) - garbage <- dev.off() + if(printPDF) garbage <- dev.off() } if(plotCorrQuant){ @@ -680,9 +684,9 @@ artmsAnalysisQuantifications <- function(log2fc_file, relaChanges <- gsub(".txt", ".correlationQuantifications.pdf", log2fc_file) relaChanges <- paste0("plot.", relaChanges) relaChanges <- paste0(output_dir, "/", relaChanges) - pdf(relaChanges) + if(printPDF) pdf(relaChanges) .artms_plotRatioLog2fc(dflog2fc, verbose = verbose) - garbage <- dev.off() + if(printPDF) garbage <- dev.off() } else{ if(verbose) message("--- Only one Comparison is available (correlation is not possible) ") } @@ -933,7 +937,7 @@ artmsAnalysisQuantifications <- function(log2fc_file, if(verbose) message("--- Distribution of log2fc and pvalues ") distributionsFilteredOut <- gsub(".txt", ".distributionsFil.pdf", log2fc_file) distributionsFilteredOut <- paste0(output_dir, "/", distributionsFilteredOut) - pdf(distributionsFilteredOut) + if(printPDF) pdf(distributionsFilteredOut) hist(imputedDF$iLog2FC, breaks = 1000, main = paste0("Filtered Log2FC (>2BR)\n n = ", dim(imputedDF)[1]), @@ -942,7 +946,7 @@ artmsAnalysisQuantifications <- function(log2fc_file, breaks = 1000, main = paste0("Filtered p-values (>2BR)\n n = ", dim(imputedDF)[1]), xlab = "p-value") - garbage <- dev.off() + if(printPDF) garbage <- dev.off() } if(plotPropImputation){ @@ -976,13 +980,13 @@ artmsAnalysisQuantifications <- function(log2fc_file, outImputation <- gsub(".txt", ".imputation.pdf", log2fc_file) outImputation <- paste0(output_dir, "/", outImputation) - pdf(outImputation) + if(printPDF) pdf(outImputation) print(p1) print(p2) - garbage <- dev.off() + if(printPDF) garbage <- dev.off() } - if(plotHeatmapsChanges){ + if(plotHeatmapsChanges & printPDF){ if(verbose) message(">> HEATMAPS OF CHANGES (log2fc) ") ##LEGACY @@ -1004,7 +1008,7 @@ artmsAnalysisQuantifications <- function(log2fc_file, outHeatMapOverallL2fc <- gsub(".txt", ".clustering.log2fc.all-overview.pdf", log2fc_file) - + outHeatMapOverallL2fc <- paste0(output_dir, "/", outHeatMapOverallL2fc) pheatmap( l2fcolmatrix, @@ -1480,9 +1484,9 @@ artmsAnalysisQuantifications <- function(log2fc_file, j <- j + theme(axis.text.x = element_text(angle = 90, hjust = 1, vjust = 0.5)) - pdf(abuJittered) + if(printPDF) pdf(abuJittered) print(j) - garbage <- dev.off() + if(printPDF) garbage <- dev.off() if(verbose) message("--- done ") } @@ -1544,9 +1548,10 @@ artmsAnalysisQuantifications <- function(log2fc_file, values_fill = list(iPvalue = 0)) } else if (isPtm == "global") { - suppressMessages(imputedDF <- artmsAnnotationUniprot(imputedDF, - 'Protein', - species)) + suppressMessages(imputedDF <- artmsAnnotationUniprot(x = imputedDF, + columnid = 'Protein', + species = species)) + names(imputedDF)[grep("Label", names(imputedDF))] <- 'Comparison' imputedDF <- artmsAnnotateSpecie(imputedDF, pathogen, species) @@ -1589,9 +1594,9 @@ artmsAnalysisQuantifications <- function(log2fc_file, numimputedfinal <- gsub(".txt", ".TotalQuantifications.pdf", log2fc_file) numimputedfinal <- paste0("plot.", numimputedfinal) numimputedfinal <- paste0(output_dir, "/", numimputedfinal) - pdf(numimputedfinal) + if(printPDF) pdf(numimputedfinal) .artms_plotNumberProteinsImputedLog2fc(imputedDF) - garbage <- dev.off() + if(printPDF) garbage <- dev.off() } #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -1663,7 +1668,7 @@ artmsAnalysisQuantifications <- function(log2fc_file, df.cor.matrix <- round(cor(venga, use = "pairwise.complete.obs"), 2) file_corr_l2fc <- gsub(".txt", ".log2fc-corr.pdf", log2fc_file) file_corr_l2fc <- paste0(output_dir, "/", file_corr_l2fc) - pdf(file_corr_l2fc, width = 12, height = 9) + if(printPDF) pdf(file_corr_l2fc, width = 12, height = 9) corrplot::corrplot( df.cor.matrix, type = "upper", @@ -1679,7 +1684,7 @@ artmsAnalysisQuantifications <- function(log2fc_file, histogram = TRUE, pch = 25, main = "Correlation between Comparisons") - garbage <- dev.off() + if(printPDF) garbage <- dev.off() # BASED ON GROUPS pca.hasdcexp <- FactoMineR::PCA( @@ -1701,9 +1706,9 @@ artmsAnalysisQuantifications <- function(log2fc_file, if(verbose) message("--- PCA, individuals plot ") file_pca_l2fc <- gsub(".txt", ".log2fc-individuals-pca.pdf", log2fc_file) file_pca_l2fc <- paste0(output_dir, "/", file_pca_l2fc) - pdf(file_pca_l2fc, width = 9, height = 7) + if(printPDF) pdf(file_pca_l2fc, width = 9, height = 7) print(pca_all) - garbage <- dev.off() + if(printPDF) garbage <- dev.off() # Determine the OPTIMAL NUMBER OF CLUSTERS: @@ -1729,9 +1734,9 @@ artmsAnalysisQuantifications <- function(log2fc_file, hc <- hclust(res.dist) file_dendro_l2fc <- gsub(".txt", ".log2fc-dendro.pdf", log2fc_file) file_dendro_l2fc <- paste0(output_dir, "/", file_dendro_l2fc) - pdf(file_dendro_l2fc, width = 9, height = 7) + if(printPDF) pdf(file_dendro_l2fc, width = 9, height = 7) plot(hc) - garbage <- dev.off() + if(printPDF) garbage <- dev.off() # COMPLEXHEATMAP Heatmap with a specified number of optimal clusters n = 10 @@ -1745,7 +1750,7 @@ artmsAnalysisQuantifications <- function(log2fc_file, file_clusterplots_l2fc <- paste0(output_dir, "/", file_clusterplots_l2fc) - pdf(file_clusterplots_l2fc, + if(printPDF) pdf(file_clusterplots_l2fc, width = 9, height = 7) print(e1) @@ -1754,7 +1759,7 @@ artmsAnalysisQuantifications <- function(log2fc_file, print(k2) print(cp1) print(cp2) - garbage <- dev.off() + if(printPDF) garbage <- dev.off() if(verbose) message("--- Cluster heatmaps (10 clusters) ") @@ -1792,13 +1797,13 @@ artmsAnalysisQuantifications <- function(log2fc_file, file_clusterheat_l2fc <- gsub(".txt", ".log2fc-clusterheatmap.pdf", log2fc_file) file_clusterheat_l2fc <- paste0(output_dir, "/", file_clusterheat_l2fc) - pdf(file_clusterheat_l2fc, + if(printPDF) pdf(file_clusterheat_l2fc, width = 12, height = 10) ComplexHeatmap::draw(hmap, heatmap_legend_side = "top", annotation_legend_side = "right") - garbage <- dev.off() + if(printPDF) garbage <- dev.off() # Pre enrichment of clusters cl_number <- pam.res$clustering diff --git a/R/main.R b/R/main.R index dd3ec2f..8078635 100644 --- a/R/main.R +++ b/R/main.R @@ -37,7 +37,7 @@ #' @importFrom tidyr unnest pivot_wider pivot_longer #' @import UpSetR #' @importFrom utils combn read.delim sessionInfo write.table setTxtProgressBar -#' txtProgressBar head globalVariables +#' txtProgressBar head globalVariables capture.output #' @import VennDiagram #' @import yaml @@ -188,18 +188,22 @@ utils::globalVariables( #' - normalized abundance values #' @param yaml_config_file (char) The yaml file name and location #' @param data_object (logical) flag to indicate whether the configuration file -#' is a string to a file that should be opened or +#' is a string to a file that should be opened or config object (yaml) +#' @param printPDF (logical) if `TRUE`, prints out pdf +#' @param display_msstats (logical) if `TRUE`, prints MSstats outputs #' @param verbose (logical) `TRUE` (default) shows function messages #' @return The relative quantification of the conditions and comparisons #' specified in the keys/contrast file resulting from running MSstats, in #' addition to quality control plots (if selected) #' @keywords main, driver, function #' @examples \donttest{ -#' artmsQuantification("artms-ab-config.yaml") +#' artmsQuantification(yaml_config_file = "path/to/artms-ab-config.yaml") #' } #' @export artmsQuantification <- function(yaml_config_file, data_object = FALSE, + printPDF = TRUE, + display_msstats = FALSE, verbose = TRUE) { # Debugging: @@ -292,8 +296,7 @@ artmsQuantification <- function(yaml_config_file, # process MaxQuant data, link with keys, and convert for MSStats format if (config$data$enabled) { - if(verbose) - message(">> QUANTIFICATION: LOADING DATA ") + if(verbose) message(">> LOADING DATA ") ## Found more bugs in fread (issue submitted to data.table on github by ## JVD but it was closed with the excuse that 'is was not reproducible' ## although he provided examples) @@ -372,7 +375,7 @@ artmsQuantification <- function(yaml_config_file, data_w <- .artms_castMaxQToWidePTM(data_f) ## HEATMAPS - if (!is.null(config$data$sample_plots) && config$data$sample_plots) { + if ( all(!is.null(config$data$sample_plots) & config$data$sample_plots & printPDF) ) { keys_in_data <- keys[keys$RawFile %in% unique(x$RawFile), ] .artms_sampleCorrelationHeatmap(data_w = data_w, keys = keys_in_data, @@ -407,7 +410,8 @@ artmsQuantification <- function(yaml_config_file, fraction = config$data$fractions$enabled, output_name = config$files$evidence, data_object = data_object, - funfunc = "sum") + funfunc = "sum", + verbose = verbose) } else { if(verbose) message(sprintf("\t+ READING PREPROCESSED FILE: %s ", config$msstats$msstats_input)) @@ -416,10 +420,24 @@ artmsQuantification <- function(yaml_config_file, sep = '\t') } - results <- .artms_runMSstats(dmss = dmss, - contrasts = contrasts, - config = config, - verbose = verbose) + if(verbose) message(">> RUNNING MSstats (it might take some time)") + + if(display_msstats){ + + suppressWarnings(results <- .artms_runMSstats(dmss = dmss, + contrasts = contrasts, + config = config, + verbose = verbose)) + }else{ + if(verbose) message("\t(MSstats messages are turned off. Select to activate MSstats outputs)") + capture.output( suppressMessages(suppressWarnings(results <- .artms_runMSstats(dmss = dmss, + contrasts = contrasts, + config = config, + verbose = verbose))) ) + } + + if(verbose) message(">> MSstats done") + if(data_object){ return(results) } @@ -429,7 +447,7 @@ artmsQuantification <- function(yaml_config_file, } ## ANNOTATING RESULT FILE - if (config$output_extras$enabled) { + if ( all(config$output_extras$enabled & printPDF) ) { if (!config$msstats$enabled){ message("-- MSstats was not enabled: cannot be done!") }else{ @@ -449,6 +467,7 @@ artmsQuantification <- function(yaml_config_file, #' and how to fill it up #' @param config_file_name (char) The name for the configuration file. It must #' have a `.yaml` extension. If `NULL`, it returns the config as a yaml object +#' @param overwrite (logical) Default FALSE #' @param verbose (logical) `TRUE` (default) shows function messages #' @return A file (or yaml data object) of the artMS configuration file #' @keywords config, yaml @@ -456,12 +475,25 @@ artmsQuantification <- function(yaml_config_file, #' config_empty <- artmsWriteConfigYamlFile(config_file_name = NULL) #' @export artmsWriteConfigYamlFile <- function(config_file_name = "artms_config_file.yaml", + overwrite = FALSE, verbose = TRUE){ if(!is.null(config_file_name)){ if(grepl("\\.yaml", config_file_name)){ - write_yaml(x = artms_config, file = config_file_name ) - if(verbose) message(">> File ",config_file_name," is out ") + if(overwrite){ + if(file.exists(config_file_name)){ + if(verbose) message("- Overwriting the configuration file") + } + }else{ + if(file.exists(config_file_name)){ + stop("File ", config_file_name, " already exits. + Are you sure you want to overwrite it? + if so, select `overwrite = TRUE` ") + }else{ + write_yaml(x = artms_config, file = config_file_name ) + if(verbose) message(">> File ", config_file_name," is out ") + } + } }else{ stop("The must have the extension .yaml") } diff --git a/R/plots.R b/R/plots.R index 8236a94..6db7b75 100644 --- a/R/plots.R +++ b/R/plots.R @@ -1001,11 +1001,11 @@ artmsPlotHeatmapQuant <- function(input_file, # We need at least TWO CONDITIONS to <- length(blist) - 1 # Progress bar - pb <- txtProgressBar(min = 0, + if(verbose) pb <- txtProgressBar(min = 0, max = length(blist) - 1, style = 3) for (i in seq_len(to)) { - setTxtProgressBar(pb, i) + if(verbose) setTxtProgressBar(pb, i) j <- i + 1 for (k in j:length(blist)) { br1 <- blist[i] @@ -1039,7 +1039,7 @@ artmsPlotHeatmapQuant <- function(input_file, print(p3) } # FOR loop } # For loop - close(pb) + if(verbose) close(pb) } else{ message("\tONLY ONE BIOLOGICAL REPLICA AVAILABLE (plots are not possible) ") } diff --git a/R/protein2SiteConversion.R b/R/protein2SiteConversion.R index a1277ed..3694852 100644 --- a/R/protein2SiteConversion.R +++ b/R/protein2SiteConversion.R @@ -191,13 +191,15 @@ If the proteins are still Uniprot Entry IDs and the file has not been converted if (mod_type == 'PH') { - if(length(grep("(ph)", maxq_data$`Modified sequence`)) == 1){ + if(any(grepl("pS", maxq_data$`Modified sequence`)) | + any(grepl("pT", maxq_data$`Modified sequence`)) | + any(grepl("pY", maxq_data$`Modified sequence`)) ){ message("\n____________________________________________________________") message("| WARNING: ") message("| The version of MaxQuant that generated this evidence file") message("| introduced changes in the column that requires some changes.") - message("| Basically, the phosphorylation site is indicated as 'XXXpSXXX' instead of 'XXXS(ph)XXX> as before.") - message("| Next: Applyng changes to return to the previous version") + message("| Basically, the phosphorylation site is indicated as 'pS' instead of '(ph)' as in other versions") + message("| Next: artMS will apply changes to return to the previous notation") message("____________________________________________________________\n") maxq_data$`Modified sequence` <- gsub("pS", "S(ph)", maxq_data$`Modified sequence`) maxq_data$`Modified sequence` <- gsub("pT", "T(ph)", maxq_data$`Modified sequence`) @@ -205,6 +207,18 @@ If the proteins are still Uniprot Entry IDs and the file has not been converted } } + if( any(grepl("Phospho", maxq_data$`Modified sequence`)) | + any(grepl("GlyGly", maxq_data$`Modified sequence`)) | + any(grepl("Carbamidomethyl", maxq_data$`Modified sequence`)) | + any(grepl("Oxidation", maxq_data$`Modified sequence`)) | + any(grepl("Acetyl", maxq_data$`Modified sequence`)) + ){ + if(verbose) message("--- Long notation detected in column: converting to short notation") + maxq_data$ModifiedSequenceLong <- maxq_data$`Modified sequence` + maxq_data$`Modified sequence` <- .convertLong2ShortPTMFormat(specModSequence = maxq_data$`Modified sequence`) + } + + if(verbose) message("--- READING REFERENCE PROTEOME ") ## read in reference proteome ref_proteome <- read.fasta(file = ref_proteome_file, @@ -260,9 +274,7 @@ If the proteins are still Uniprot Entry IDs and the file has not been converted - # --------------------------------------------------------------------------- # EXTRACT PTM POSITIONS FROM MODIFIED PEPTIDES IN EVIDENCE FILE - # --------------------------------------------------------------------------- unique_peptides_in_data <- unique(maxq_data[, c(column_name, 'Modified sequence'), with = FALSE]) @@ -428,3 +440,37 @@ If the proteins are still Uniprot Entry IDs and the file has not been converted ) if(verbose) message(">> CONVERSION COMPLETED") } + +# +# @title Convert PTM long notation to short +# +# @description One version of MaxQuant annotates the peptides in a strange way +# XXXXS(Phospho (STY))XXXX. This function converts them to the old notation +# @param specModSequence (vector) +# @param mods (char) the PTM modification: PH, UB, CAM, MOX, NAC +# @keywords PTM +.convertLong2ShortPTMFormat <- function(specModSequence, + mods=c("PH", "UB", "CAM", "MOX", "NAC", "AC")){ + result <- specModSequence + specFormats <- list (PH = '([STY])[[(]Phospho \\(STY\\)[])]', + UB = '(K)[[(]GlyGly \\(K\\)[])]', + CAM = '([C])[[(]Carbamidomethyl \\(C\\)[])]', + MOX = '([M])[[(]Oxidation \\(M\\)[])]', + NAC = '([A-Z_])[[(]Acetyl \\(Protein N-term\\)[])]', + AC = '([A-Z_])[[(]Acetyl \\(K\\)[])]') + artmsFormats <- list (PH ='\\1\\(ph\\)', + UB ='\\1\\(gl\\)', + CAM = '\\1\\(cam\\)', + MOX = '\\1\\(ox\\)', + NAC = '\\1\\(ac\\)', + AC = '\\1\\(ac\\)') + stopifnot(names(specFormats)==names(artmsFormats)) + for (mod in mods){ + if (mod %in% names(specFormats)){ + result <- gsub(specFormats[[mod]], artmsFormats[[mod]], result) + }else{ + (stop("I don't know how to deal with requested mod: ", mod)) + } + } + return (result) +} diff --git a/R/qualityControlSummaryExtended.R b/R/qualityControlSummaryExtended.R index c5316df..42487cc 100644 --- a/R/qualityControlSummaryExtended.R +++ b/R/qualityControlSummaryExtended.R @@ -251,7 +251,7 @@ artmsQualityControlSummaryExtended <- function(summary_file, print(ac) } - garbage <- dev.off() + if(printPDF) garbage <- dev.off() if(verbose) message(" done ") } @@ -400,7 +400,7 @@ artmsQualityControlSummaryExtended <- function(summary_file, theme(plot.title = element_text(size = 12)) + scale_fill_brewer(palette = "Spectral") print(bd) - garbage <- dev.off() + if(printPDF) garbage <- dev.off() if(verbose) message(" done ") } @@ -512,7 +512,7 @@ artmsQualityControlSummaryExtended <- function(summary_file, print(cc) } - garbage <- dev.off() + if(printPDF) garbage <- dev.off() if(verbose) message(" done ") } @@ -734,7 +734,7 @@ artmsQualityControlSummaryExtended <- function(summary_file, print(df) } - garbage <- dev.off() + if(printPDF) garbage <- dev.off() if(verbose) message(" done ") } diff --git a/R/runMSstats.R b/R/runMSstats.R index ffe4d2b..0a48cb2 100644 --- a/R/runMSstats.R +++ b/R/runMSstats.R @@ -25,7 +25,6 @@ config, verbose = TRUE) { - if(verbose) message(">> RUNNING MSstats") # plot the data BEFORE normalization if (grepl('before', config$msstats$profilePlots)) { if(verbose) message("-- QC PLOT: before") @@ -55,6 +54,7 @@ } # Normalization + if (!is.null(config$msstats$normalization_reference) & config$msstats$normalization_method == 'globalStandards') { # if globalStandars is selected, must have a reference protein(s) diff --git a/docs/404.html b/docs/404.html index 9ba32e9..335bd96 100644 --- a/docs/404.html +++ b/docs/404.html @@ -71,7 +71,7 @@ artMS - 1.7.5 + 1.7.6 diff --git a/docs/LICENSE-text.html b/docs/LICENSE-text.html index 7561009..ee0b644 100644 --- a/docs/LICENSE-text.html +++ b/docs/LICENSE-text.html @@ -71,7 +71,7 @@ artMS - 1.7.5 + 1.7.6 diff --git a/docs/articles/artMS_vignette.html b/docs/articles/artMS_vignette.html index 0e2aabd..c65c0d6 100644 --- a/docs/articles/artMS_vignette.html +++ b/docs/articles/artMS_vignette.html @@ -31,7 +31,7 @@ artMS - 1.7.5 + 1.7.6 @@ -82,7 +82,7 @@

artMS: Analytical R Tools for Mass Spectrometry

David Jimenez-Morales

-

2020-05-20

+

2020-10-21

Source: vignettes/artMS_vignette.Rmd @@ -98,7 +98,7 @@

2020-05-20

OVERVIEW

artMS is a Bioconductor package that provides a set of tools for the analysis and integration of large-scale proteomics (mass-spectrometry-based) datasets obtained using the popular proteomics software MaxQuant.

-

The functions available in artMS can be grouped into the following categories:

+

The functions available in artMS, which can be grouped into the following categories:

  • Multiple quality control (QC) functions.
  • Relative quantification using MSstats.
  • @@ -106,6 +106,7 @@

  • Generation of input files for other tools, including SAINTq, SAINTexpress, Photon, and Phosfate
+

Click here for details about all the functions available in artMS.

For a graphical overview check the slides presented at the 2019 SUMS-RAS (Stanford University Mass Spectrometry - Research Application Symposium)

artMS also perfoms basic quality control and relative quantification for metabolomics datasets obtained using the alignment table generated by MarkerView. However, this functionality is not stable.

@@ -336,7 +337,7 @@

contrasts : /path/to/the/contrast.txt summary: /path/to/the/summary.txt # Optional output : /path/to/the/results_folder/ph-results.txt -

The file path/name of the required files. It is recommended to create a new folder in your folder project (for example, results_folder). The results file name (e.g. -results.txt) will be used as prefix for the several files (txt and pdf) that will be generated.

+

The file path/name of the required files. It is recommended to create a new folder in your folder project (for example, results_folder). The results file name (e.g. -results.txt) will be used as prefix for the several files (txt and pdf) that will be generated.


@@ -369,7 +370,7 @@

  • enabled : 1: to pre-process the data provided in the files section. 0: won’t process the data (and a pre-generated MSstats file will be expected)

  • -fractions: Multiple fractionation or separation methods are often combined in proteomics to improve signal-to-noise and proteome coverage and to reduce interference between peptides in quantitative proteomics. +

    fractions: Multiple fractionation or separation methods are often combined in proteomics to improve signal-to-noise and proteome coverage and to reduce interference between peptides in quantitative proteomics.

    • enabled : 1 for fractionation dataset. See Special case: Protein Fractionation below for details
    • @@ -378,7 +379,7 @@

  • -silac: +

    silac:

    • enabled : 1: check if the files belong to a SILAC experiment. See Special case: SILAC below for details
    • @@ -387,7 +388,7 @@

  • -filters: +

    filters:

    • enabled : 1 Enables filtering (this section)
    • @@ -400,7 +401,7 @@

  • -sample_plots +

    sample_plots

    • 1 Generate correlation plots
    • @@ -953,14 +954,14 @@

      • plotCS (qcExtended_evidence.qcplot.ChargeState): charge state distribution of PSMs confidently identified in each BioReplicate.

      • -plotIC (qcExtended_evidence.qcplot.PCA.pdf): pairwise intensity correlation and Principal Component Analysis (PCA) +

        plotIC (qcExtended_evidence.qcplot.PCA.pdf): pairwise intensity correlation and Principal Component Analysis (PCA)

        • Page 1 and 3: pairwise peptide and protein intensity correlation and scatter plot between any 2 BioReplicates, respectively.
        • Page 2 and 4: principal component analysis at the intensity level for both peptide and proteins, respectively.
      • -plotIONS (qcExtended_evidence.qcplot.Ions.pdf): A peptide ion is defined in the context of m/z, in other words, a unique peptide sequence may give rise to multiple ions with different charge state and/or amino acid modification. +

        plotIONS (qcExtended_evidence.qcplot.Ions.pdf): A peptide ion is defined in the context of m/z, in other words, a unique peptide sequence may give rise to multiple ions with different charge state and/or amino acid modification.

        • Page 1: number of ions confidently identified in each BioReplicate (top panel: non-contaminants, bottom: contaminants)
        • Page 2: mean number of peptide ions per condition with error bar showing the standard error of the mean (categories: non-contaminants / contaminants)
        • @@ -969,7 +970,7 @@

        • plotME (qcExtended_evidence.qcplot.MassError.pdf): Distribution of precursor error for all PSMs confidently identified in each BioReplicate.

        • plotMOCD (qcExtended_evidence.qcplot.MZ.pdf): Distribution of precursor mass-over-charge for all PSMs confidently identified in each BioReplicate.

        • -plotPIO (qcExtended_evidence.qcplot.PepIonOversampling.pdf): +

          plotPIO (qcExtended_evidence.qcplot.PepIonOversampling.pdf):

          • Page 1: proportion of all peptide ions (including peptides matched across runs) fragmented once, twice and thrice or more.
          • Page 2: proportion of peptide ions (with intensity detected) fragmented once, twice and thrice or more.
          • @@ -978,15 +979,15 @@

          • plotPEPDETECT (qcExtended_evidence.qcplot.PeptideDetection.pdf): frequency of peptide detection across BioReplicates by condition, showing the percentage of peptides detected once, twice, thrice, and so on (based on the number of bioreplicates for each condition).

          • -plotPEPICV (qcExtended_evidence.qcplot.PeptideIntensity.pdf): Peptide intensity coefficient of variance (CV) plot.
            -The CV is calculated for each feature (peptide ion) identified in more than one replicate. +

            plotPEPICV (qcExtended_evidence.qcplot.PeptideIntensity.pdf): Peptide intensity coefficient of variance (CV) plot.
            +The CV is calculated for each feature (peptide ion) identified in more than one replicate.

            • Page 1 shows the distribution of CV’s for each condition, while
            • Page 2 shows the distribution of CV’s within 4 bins of intensity (i.e., 4 quantiles of average intensity).
          • -plotPEPTIDES (qcExtended_evidence.qcplot.Peptides.pdf): peptide statistics plot. +

            plotPEPTIDES (qcExtended_evidence.qcplot.Peptides.pdf): peptide statistics plot.

            • Page 1: number of unique peptide sequences (disregards the charge state or amino acid modifications) confidently identified in each BioReplicate (top panel: non-contaminants, bottom: contaminants)
            • Page 2: mean number of peptides per condition with error bar showing the standard error of the mean.
            • @@ -994,7 +995,7 @@

            • plotPEPTOVERLAP (qcExtended_evidence..qcplot.PeptidesOverlap.pdf): peptide overlaps across bioreplicates (page 1) and conditions (page 2)

            • -plotPROTDETECT (qcExtended_evidence.qcplot.ProteinDetection.pdf): Protein detection frequency plot: +

              plotPROTDETECT (qcExtended_evidence.qcplot.ProteinDetection.pdf): Protein detection frequency plot:

              • Page 1: protein group frequency of detection across BioReplicates for each condition, showing the percentage of proteins detected per bioreplicates
              • Page 2: feature (peptide ion) intensity distribution within each BioReplicate (potential contaminant proteins are plot separately).
              • @@ -1002,14 +1003,14 @@

            • -plotPROTICV (qcExtended_evidence.qcplot.ProteinIntensityCV.pdf): protein intensity coefficient of variance (CV) plot. The CV is calculated for each protein (after summing the peptide intensities) identified in more than one replicate. +

              plotPROTICV (qcExtended_evidence.qcplot.ProteinIntensityCV.pdf): protein intensity coefficient of variance (CV) plot. The CV is calculated for each protein (after summing the peptide intensities) identified in more than one replicate.

              • Page 1: istribution of CV’s for each condition
              • Page 2: distribution of CV’s within 4 bins of intensity (i.e., 4 quantiles of average intensity).
            • -plotPROTEINS (qcExtended_evidence.qcplot.Proteins.pdf): protein statistics, +

              plotPROTEINS (qcExtended_evidence.qcplot.Proteins.pdf): protein statistics,

              • Page 1: number of protein groups confidently identified in each BioReplicate.
              • Page 2: mean number of protein groups per condition with error bar showing the standard error of the mean (categories: non-contaminants / contaminants)
              • @@ -1017,21 +1018,21 @@

              • plotPROTOVERLAP (qcExtended_evidence..qcplot.ProteinOverlap.pdf): Protein overlap across bioreplicates (page 1) and conditions (page 2)

              • -plotPSM (qcExtended_evidence.qcplot.PSM.pdf) : Peptide-spectrum-matches (PSMs). +

                plotPSM (qcExtended_evidence.qcplot.PSM.pdf) : Peptide-spectrum-matches (PSMs).

                • Page 1: number of PSMs confidently identified in each BioReplicate.
                • Page 2: mean number of PSMs per condition with error bar showing the standard error of the mean (categories: non-contaminants / contaminants)
              • -plotIDoverlap (qcExtended_evidence.qcplot.ID-Overlap.pdf): heatmap of pairwise identification overlap: +

                plotIDoverlap (qcExtended_evidence.qcplot.ID-Overlap.pdf): heatmap of pairwise identification overlap:

                • Page 1: peptide identification overlap, only peptides detected and identified between any 2 BioReplicates
                • Page 2: protein identification overlap, only proteins with at least 1 peptide detected and identified between any 2 BioReplicates
              • -plotSP (qcExtended_evidence.qcplot.SamplePrep.pdf): sample quality metrics. +

                plotSP (qcExtended_evidence.qcplot.SamplePrep.pdf): sample quality metrics.

                • Page 1: missing cleavage distribution of all peptides confidently identified in each BioReplicate.
                • Page 2: fraction of peptides with at least one methionine oxidized in each BioReplicate.
                • @@ -1376,8 +1377,8 @@

                  Summary file (summary.xlsx)

                  Reminder: for any given relative quantification, as for example WT-Mutant:

                    -
                  • Proteins with positive log2fc values (i.e. log2fc > 0) are more abundant in the condition on the left / numerator (WT)
                  • -
                  • Proteins with negative log2fc values (i.e. log2fc < 0) are more abundant in the condition on the right / denominator (Mutant)
                  • +
                  • Proteins with positive log2fc values (i.e. log2fc > 0) are more abundant in the condition on the left / numerator (WT)
                  • +
                  • Proteins with negative log2fc values (i.e. log2fc < 0) are more abundant in the condition on the right / denominator (Mutant)

                  The summary excel file (results-summary.xlsx) gathers several tabs:

                    @@ -1428,22 +1429,22 @@

                  Protein Complex Enrichment analysis (based on CORUM)

                    -
                  • results-enrich-MAC-allsignificants-corum.txt
                  • -
                  • results-enrich-MAC-positives-corum.txt
                  • +
                  • results-enrich-MAC-allsignificants-corum.txt

                  • +
                  • results-enrich-MAC-positives-corum.txt

                  • results-enrich-MAC-negatives-corum.txt

                  • -
                  • results-enrich-MAC-allsignificants-corum.pdf
                  • -
                  • results-enrich-MAC-negatives-corum.pdf
                  • +
                  • results-enrich-MAC-allsignificants-corum.pdf

                  • +
                  • results-enrich-MAC-negatives-corum.pdf

                  • results-enrich-MAC-positives-corum.pdf

                  Clustering

                    -
                  • results.clustering.log2fc.all-overview.pdf
                  • -
                  • results.clustering.log2fc.all-zoom.pdf
                  • -
                  • results.clustering.log2fcSign.all-overview.pdf
                  • +
                  • results.clustering.log2fc.all-overview.pdf

                  • +
                  • results.clustering.log2fc.all-zoom.pdf

                  • +
                  • results.clustering.log2fcSign.all-overview.pdf

                  • results.clustering.log2fcSign.all-zoom.pdf

                  • -
                  • results.log2fc-clusterheatmap-enriched.txt
                  • -
                  • results.log2fc-clusterheatmap.txt
                  • -
                  • results.log2fc-clusterheatmap.pdf
                  • +
                  • results.log2fc-clusterheatmap-enriched.txt

                  • +
                  • results.log2fc-clusterheatmap.txt

                  • +
                  • results.log2fc-clusterheatmap.pdf

                  • results.log2fc-clusters.pdf

                  Correlations

                  @@ -1456,9 +1457,9 @@

                  Miscellaneous

                  • results.relativeABUNDANCE.pdf

                  • -
                  • results.distributions.pdf
                  • -
                  • results.distributionsFil.pdf
                  • -
                  • results.imputation.pdf
                  • +
                  • results.distributions.pdf

                  • +
                  • results.distributionsFil.pdf

                  • +
                  • results.imputation.pdf

                  • results.TotalQuantifications.pdf

                  PCA

                  diff --git a/docs/articles/artMS_vignette_files/figure-html/unnamed-chunk-6-1.png b/docs/articles/artMS_vignette_files/figure-html/unnamed-chunk-6-1.png index 081d199..3945c4b 100644 Binary files a/docs/articles/artMS_vignette_files/figure-html/unnamed-chunk-6-1.png and b/docs/articles/artMS_vignette_files/figure-html/unnamed-chunk-6-1.png differ diff --git a/docs/articles/artMS_vignette_files/figure-html/unnamed-chunk-6-5.png b/docs/articles/artMS_vignette_files/figure-html/unnamed-chunk-6-5.png index 0f82933..cea9318 100644 Binary files a/docs/articles/artMS_vignette_files/figure-html/unnamed-chunk-6-5.png and b/docs/articles/artMS_vignette_files/figure-html/unnamed-chunk-6-5.png differ diff --git a/docs/articles/artMS_vignette_files/figure-html/unnamed-chunk-6-7.png b/docs/articles/artMS_vignette_files/figure-html/unnamed-chunk-6-7.png index daacdde..1f18d7d 100644 Binary files a/docs/articles/artMS_vignette_files/figure-html/unnamed-chunk-6-7.png and b/docs/articles/artMS_vignette_files/figure-html/unnamed-chunk-6-7.png differ diff --git a/docs/articles/index.html b/docs/articles/index.html index a47cbdc..99d8927 100644 --- a/docs/articles/index.html +++ b/docs/articles/index.html @@ -71,7 +71,7 @@ artMS - 1.7.5 + 1.7.6

diff --git a/docs/authors.html b/docs/authors.html index 6c46ed2..74cf6f0 100644 --- a/docs/authors.html +++ b/docs/authors.html @@ -71,7 +71,7 @@ artMS - 1.7.5 + 1.7.6 diff --git a/docs/index.html b/docs/index.html index 044527c..e259871 100644 --- a/docs/index.html +++ b/docs/index.html @@ -38,7 +38,7 @@ artMS - 1.7.5 + 1.7.6 @@ -160,7 +160,7 @@

How to Contribute to artMS

-

artMS is an open source project, therefore you are more than welcome to contribute and make the analysis of Mass Spectrometry data easier and better using this fantastic language and environment for statistical computing and graphics (i.e. R).

+

artMS is an open source project, therefore you are more than welcome to contribute and make the analysis of Mass Spectrometry data easier and better using this fantastic language and environment for statistical computing and graphics (i.e. R).

There are multiple options:

  • diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index b1d6128..9b92b9e 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -1,7 +1,7 @@ -pandoc: 2.3.1 +pandoc: 2.7.3 pkgdown: 1.5.1 pkgdown_sha: ~ articles: artMS_vignette: artMS_vignette.html -last_built: 2020-05-21T05:13Z +last_built: 2020-10-22T05:43Z diff --git a/docs/reference/artmsAnalysisQuantifications.html b/docs/reference/artmsAnalysisQuantifications.html index 7f42e8e..ff65a0c 100644 --- a/docs/reference/artmsAnalysisQuantifications.html +++ b/docs/reference/artmsAnalysisQuantifications.html @@ -81,7 +81,7 @@ artMS - 1.7.5 + 1.7.6
@@ -173,6 +173,7 @@

Analysis of the Relative Quantifications

plotTotalQuant = TRUE, plotClusteringAnalysis = TRUE, data_object = FALSE, + printPDF = TRUE, verbose = TRUE ) @@ -305,7 +306,7 @@

Arg plotHeatmapsChanges

(logical) if TRUE plots heatmaps of quantified -changes (both all and significant only)

+changes (both all and significant only). Only if printPDF is also TRUE

plotTotalQuant @@ -321,6 +322,11 @@

Arg data_object

(logical) flag to indicate whether the required files are data objects. Default is FALSE

+ + + printPDF +

If TRUE (default) prints out the pdfs. Warning: plot +objects are not returned due to the large number of them.

verbose diff --git a/docs/reference/artmsAnnotateSpecie.html b/docs/reference/artmsAnnotateSpecie.html index 99b461e..e67d555 100644 --- a/docs/reference/artmsAnnotateSpecie.html +++ b/docs/reference/artmsAnnotateSpecie.html @@ -77,7 +77,7 @@ artMS - 1.7.5 + 1.7.6 diff --git a/docs/reference/artmsAnnotationUniprot.html b/docs/reference/artmsAnnotationUniprot.html index 47dcfd9..de7bddd 100644 --- a/docs/reference/artmsAnnotationUniprot.html +++ b/docs/reference/artmsAnnotationUniprot.html @@ -75,7 +75,7 @@ artMS - 1.7.5 + 1.7.6 diff --git a/docs/reference/artmsAvgIntensityRT.html b/docs/reference/artmsAvgIntensityRT.html index 6ba7740..bb493f3 100644 --- a/docs/reference/artmsAvgIntensityRT.html +++ b/docs/reference/artmsAvgIntensityRT.html @@ -77,7 +77,7 @@ artMS - 1.7.5 + 1.7.6 diff --git a/docs/reference/artmsChangeColumnName.html b/docs/reference/artmsChangeColumnName.html index 3455d79..967f5e2 100644 --- a/docs/reference/artmsChangeColumnName.html +++ b/docs/reference/artmsChangeColumnName.html @@ -72,7 +72,7 @@ artMS - 1.7.5 + 1.7.6 diff --git a/docs/reference/artmsConvertMetabolomics.html b/docs/reference/artmsConvertMetabolomics.html index 17621ad..f9964c9 100644 --- a/docs/reference/artmsConvertMetabolomics.html +++ b/docs/reference/artmsConvertMetabolomics.html @@ -91,7 +91,7 @@ artMS - 1.7.5 + 1.7.6 diff --git a/docs/reference/artmsDataPlots.html b/docs/reference/artmsDataPlots.html index 2f9e047..6cd8c5e 100644 --- a/docs/reference/artmsDataPlots.html +++ b/docs/reference/artmsDataPlots.html @@ -73,7 +73,7 @@ artMS - 1.7.5 + 1.7.6 diff --git a/docs/reference/artmsEnrichLog2fc.html b/docs/reference/artmsEnrichLog2fc.html index b86d80c..b5b5e92 100644 --- a/docs/reference/artmsEnrichLog2fc.html +++ b/docs/reference/artmsEnrichLog2fc.html @@ -72,7 +72,7 @@ artMS - 1.7.5 + 1.7.6 diff --git a/docs/reference/artmsEnrichProfiler.html b/docs/reference/artmsEnrichProfiler.html index 27bdd4d..08eb56d 100644 --- a/docs/reference/artmsEnrichProfiler.html +++ b/docs/reference/artmsEnrichProfiler.html @@ -73,7 +73,7 @@ artMS - 1.7.5 + 1.7.6 diff --git a/docs/reference/artmsEvidenceToSAINTq.html b/docs/reference/artmsEvidenceToSAINTq.html index 9e4f320..643cb06 100644 --- a/docs/reference/artmsEvidenceToSAINTq.html +++ b/docs/reference/artmsEvidenceToSAINTq.html @@ -75,7 +75,7 @@ artMS - 1.7.5 + 1.7.6 diff --git a/docs/reference/artmsEvidenceToSaintExpress.html b/docs/reference/artmsEvidenceToSaintExpress.html index c45e8e2..b87dd8b 100644 --- a/docs/reference/artmsEvidenceToSaintExpress.html +++ b/docs/reference/artmsEvidenceToSaintExpress.html @@ -74,7 +74,7 @@ artMS - 1.7.5 + 1.7.6 diff --git a/docs/reference/artmsFilterEvidenceContaminants.html b/docs/reference/artmsFilterEvidenceContaminants.html index ddcd258..2e8cb2e 100644 --- a/docs/reference/artmsFilterEvidenceContaminants.html +++ b/docs/reference/artmsFilterEvidenceContaminants.html @@ -73,7 +73,7 @@ artMS - 1.7.5 + 1.7.6 diff --git a/docs/reference/artmsGeneratePhSiteExtended.html b/docs/reference/artmsGeneratePhSiteExtended.html index d84e5a1..75c0674 100644 --- a/docs/reference/artmsGeneratePhSiteExtended.html +++ b/docs/reference/artmsGeneratePhSiteExtended.html @@ -76,7 +76,7 @@ artMS - 1.7.5 + 1.7.6 diff --git a/docs/reference/artmsIsEvidenceNewVersion.html b/docs/reference/artmsIsEvidenceNewVersion.html index c79ca82..6ed73a3 100644 --- a/docs/reference/artmsIsEvidenceNewVersion.html +++ b/docs/reference/artmsIsEvidenceNewVersion.html @@ -77,7 +77,7 @@ artMS - 1.7.5 + 1.7.6 diff --git a/docs/reference/artmsIsSpeciesSupported.html b/docs/reference/artmsIsSpeciesSupported.html index f12ac49..56f9d1d 100644 --- a/docs/reference/artmsIsSpeciesSupported.html +++ b/docs/reference/artmsIsSpeciesSupported.html @@ -73,7 +73,7 @@ artMS - 1.7.5 + 1.7.6 diff --git a/docs/reference/artmsLeaveOnlyUniprotEntryID.html b/docs/reference/artmsLeaveOnlyUniprotEntryID.html index 8fe85e6..0663185 100644 --- a/docs/reference/artmsLeaveOnlyUniprotEntryID.html +++ b/docs/reference/artmsLeaveOnlyUniprotEntryID.html @@ -82,7 +82,7 @@ artMS - 1.7.5 + 1.7.6 diff --git a/docs/reference/artmsMapUniprot2Entrez.html b/docs/reference/artmsMapUniprot2Entrez.html index a0a0712..fd378c5 100644 --- a/docs/reference/artmsMapUniprot2Entrez.html +++ b/docs/reference/artmsMapUniprot2Entrez.html @@ -72,7 +72,7 @@ artMS - 1.7.5 + 1.7.6 diff --git a/docs/reference/artmsMergeEvidenceAndKeys.html b/docs/reference/artmsMergeEvidenceAndKeys.html index ec9f4b5..98244ad 100644 --- a/docs/reference/artmsMergeEvidenceAndKeys.html +++ b/docs/reference/artmsMergeEvidenceAndKeys.html @@ -72,7 +72,7 @@ artMS - 1.7.5 + 1.7.6 diff --git a/docs/reference/artmsMsstatsSummary.html b/docs/reference/artmsMsstatsSummary.html index 13d4cae..97c2658 100644 --- a/docs/reference/artmsMsstatsSummary.html +++ b/docs/reference/artmsMsstatsSummary.html @@ -83,7 +83,7 @@ artMS - 1.7.5 + 1.7.6 diff --git a/docs/reference/artmsPhosfateOutput.html b/docs/reference/artmsPhosfateOutput.html index 7f220a0..af56761 100644 --- a/docs/reference/artmsPhosfateOutput.html +++ b/docs/reference/artmsPhosfateOutput.html @@ -75,7 +75,7 @@ artMS - 1.7.5 + 1.7.6 diff --git a/docs/reference/artmsPhotonOutput.html b/docs/reference/artmsPhotonOutput.html index dd7f456..70042f9 100644 --- a/docs/reference/artmsPhotonOutput.html +++ b/docs/reference/artmsPhotonOutput.html @@ -75,7 +75,7 @@ artMS - 1.7.5 + 1.7.6 diff --git a/docs/reference/artmsPlotHeatmapQuant.html b/docs/reference/artmsPlotHeatmapQuant.html index ac89686..110282a 100644 --- a/docs/reference/artmsPlotHeatmapQuant.html +++ b/docs/reference/artmsPlotHeatmapQuant.html @@ -74,7 +74,7 @@ artMS - 1.7.5 + 1.7.6 diff --git a/docs/reference/artmsProtein2SiteConversion.html b/docs/reference/artmsProtein2SiteConversion.html index 09913eb..0fa6556 100644 --- a/docs/reference/artmsProtein2SiteConversion.html +++ b/docs/reference/artmsProtein2SiteConversion.html @@ -94,7 +94,7 @@ artMS - 1.7.5 + 1.7.6 diff --git a/docs/reference/artmsQualityControlEvidenceBasic.html b/docs/reference/artmsQualityControlEvidenceBasic.html index 330267d..5971f85 100644 --- a/docs/reference/artmsQualityControlEvidenceBasic.html +++ b/docs/reference/artmsQualityControlEvidenceBasic.html @@ -72,7 +72,7 @@ artMS - 1.7.5 + 1.7.6 diff --git a/docs/reference/artmsQualityControlEvidenceExtended.html b/docs/reference/artmsQualityControlEvidenceExtended.html index 8831e35..3a2d92a 100644 --- a/docs/reference/artmsQualityControlEvidenceExtended.html +++ b/docs/reference/artmsQualityControlEvidenceExtended.html @@ -73,7 +73,7 @@ artMS - 1.7.5 + 1.7.6 diff --git a/docs/reference/artmsQualityControlMetabolomics.html b/docs/reference/artmsQualityControlMetabolomics.html index b8fed8f..3c78946 100644 --- a/docs/reference/artmsQualityControlMetabolomics.html +++ b/docs/reference/artmsQualityControlMetabolomics.html @@ -73,7 +73,7 @@ artMS - 1.7.5 + 1.7.6 diff --git a/docs/reference/artmsQualityControlSummaryExtended.html b/docs/reference/artmsQualityControlSummaryExtended.html index 55c9e29..91d036a 100644 --- a/docs/reference/artmsQualityControlSummaryExtended.html +++ b/docs/reference/artmsQualityControlSummaryExtended.html @@ -73,7 +73,7 @@ artMS - 1.7.5 + 1.7.6 diff --git a/docs/reference/artmsQuantification.html b/docs/reference/artmsQuantification.html index d0be5d0..c4e4c20 100644 --- a/docs/reference/artmsQuantification.html +++ b/docs/reference/artmsQuantification.html @@ -77,7 +77,7 @@ artMS - 1.7.5 + 1.7.6 @@ -139,7 +139,13 @@

Relative quantification using MSstats

-
artmsQuantification(yaml_config_file, data_object = FALSE, verbose = TRUE)
+
artmsQuantification(
+  yaml_config_file,
+  data_object = FALSE,
+  printPDF = TRUE,
+  display_msstats = FALSE,
+  verbose = TRUE
+)

Arguments

@@ -151,7 +157,15 @@

Arg

+is a string to a file that should be opened or config object (yaml)

+ + + + + + + + @@ -167,7 +181,7 @@

Value

Examples

# \donttest{ -artmsQuantification("artms-ab-config.yaml")
#> Warning: cannot open file 'artms-ab-config.yaml': No such file or directory
#> Error in readLines(con): cannot open the connection
# } +artmsQuantification(yaml_config_file = "path/to/artms-ab-config.yaml")
#> Warning: cannot open file 'path/to/artms-ab-config.yaml': No such file or directory
#> Error in readLines(con): cannot open the connection
# }
diff --git a/docs/reference/artmsSILACtoLong.html b/docs/reference/artmsSILACtoLong.html index a2926f4..75f72f1 100644 --- a/docs/reference/artmsSILACtoLong.html +++ b/docs/reference/artmsSILACtoLong.html @@ -74,7 +74,7 @@ artMS - 1.7.5 + 1.7.6 diff --git a/docs/reference/artmsSpectralCounts.html b/docs/reference/artmsSpectralCounts.html index 0df3740..5d9fb06 100644 --- a/docs/reference/artmsSpectralCounts.html +++ b/docs/reference/artmsSpectralCounts.html @@ -72,7 +72,7 @@ artMS - 1.7.5 + 1.7.6 diff --git a/docs/reference/artmsVolcanoPlot.html b/docs/reference/artmsVolcanoPlot.html index b7406e5..62a610e 100644 --- a/docs/reference/artmsVolcanoPlot.html +++ b/docs/reference/artmsVolcanoPlot.html @@ -72,7 +72,7 @@ artMS - 1.7.5 + 1.7.6 diff --git a/docs/reference/artmsWriteConfigYamlFile.html b/docs/reference/artmsWriteConfigYamlFile.html index 28b4e61..651856b 100644 --- a/docs/reference/artmsWriteConfigYamlFile.html +++ b/docs/reference/artmsWriteConfigYamlFile.html @@ -75,7 +75,7 @@ artMS - 1.7.5 + 1.7.6 @@ -137,6 +137,7 @@

Write out a template file of the artMS configuration file (yaml)

artmsWriteConfigYamlFile(
   config_file_name = "artms_config_file.yaml",
+  overwrite = FALSE,
   verbose = TRUE
 )
@@ -148,6 +149,10 @@

Arg

+ + + + diff --git a/docs/reference/artms_config.html b/docs/reference/artms_config.html index 333f399..92e8d7c 100644 --- a/docs/reference/artms_config.html +++ b/docs/reference/artms_config.html @@ -74,7 +74,7 @@ artMS - 1.7.5 + 1.7.6 diff --git a/docs/reference/artms_data_corum_mito_database.html b/docs/reference/artms_data_corum_mito_database.html index 72bf2cd..2862426 100644 --- a/docs/reference/artms_data_corum_mito_database.html +++ b/docs/reference/artms_data_corum_mito_database.html @@ -78,7 +78,7 @@ artMS - 1.7.5 + 1.7.6 diff --git a/docs/reference/artms_data_pathogen_LPN.html b/docs/reference/artms_data_pathogen_LPN.html index 1d0e0ef..f30b297 100644 --- a/docs/reference/artms_data_pathogen_LPN.html +++ b/docs/reference/artms_data_pathogen_LPN.html @@ -75,7 +75,7 @@ artMS - 1.7.5 + 1.7.6 diff --git a/docs/reference/artms_data_pathogen_TB.html b/docs/reference/artms_data_pathogen_TB.html index 97106d3..1ffb981 100644 --- a/docs/reference/artms_data_pathogen_TB.html +++ b/docs/reference/artms_data_pathogen_TB.html @@ -75,7 +75,7 @@ artMS - 1.7.5 + 1.7.6 diff --git a/docs/reference/artms_data_ph_config.html b/docs/reference/artms_data_ph_config.html index e4f4fb3..0bbd13b 100644 --- a/docs/reference/artms_data_ph_config.html +++ b/docs/reference/artms_data_ph_config.html @@ -73,7 +73,7 @@ artMS - 1.7.5 + 1.7.6 diff --git a/docs/reference/artms_data_ph_contrast.html b/docs/reference/artms_data_ph_contrast.html index cb53eed..9790ff0 100644 --- a/docs/reference/artms_data_ph_contrast.html +++ b/docs/reference/artms_data_ph_contrast.html @@ -74,7 +74,7 @@ artMS - 1.7.5 + 1.7.6 diff --git a/docs/reference/artms_data_ph_evidence.html b/docs/reference/artms_data_ph_evidence.html index c1bdbf3..cccc676 100644 --- a/docs/reference/artms_data_ph_evidence.html +++ b/docs/reference/artms_data_ph_evidence.html @@ -79,7 +79,7 @@ artMS - 1.7.5 + 1.7.6 diff --git a/docs/reference/artms_data_ph_keys.html b/docs/reference/artms_data_ph_keys.html index ae19d74..e74c710 100644 --- a/docs/reference/artms_data_ph_keys.html +++ b/docs/reference/artms_data_ph_keys.html @@ -76,7 +76,7 @@ artMS - 1.7.5 + 1.7.6 diff --git a/docs/reference/artms_data_ph_msstats_modelqc.html b/docs/reference/artms_data_ph_msstats_modelqc.html index 4150e07..d770384 100644 --- a/docs/reference/artms_data_ph_msstats_modelqc.html +++ b/docs/reference/artms_data_ph_msstats_modelqc.html @@ -73,7 +73,7 @@ artMS - 1.7.5 + 1.7.6 diff --git a/docs/reference/artms_data_ph_msstats_results.html b/docs/reference/artms_data_ph_msstats_results.html index 6853325..bf9fc5a 100644 --- a/docs/reference/artms_data_ph_msstats_results.html +++ b/docs/reference/artms_data_ph_msstats_results.html @@ -75,7 +75,7 @@ artMS - 1.7.5 + 1.7.6 diff --git a/docs/reference/artms_data_randomDF.html b/docs/reference/artms_data_randomDF.html index 4a51c19..9064947 100644 --- a/docs/reference/artms_data_randomDF.html +++ b/docs/reference/artms_data_randomDF.html @@ -72,7 +72,7 @@ artMS - 1.7.5 + 1.7.6 diff --git a/docs/reference/index.html b/docs/reference/index.html index 10150d3..b89f899 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -71,7 +71,7 @@ artMS - 1.7.5 + 1.7.6 diff --git a/man/artmsAnalysisQuantifications.Rd b/man/artmsAnalysisQuantifications.Rd index a1f78dd..f630a00 100644 --- a/man/artmsAnalysisQuantifications.Rd +++ b/man/artmsAnalysisQuantifications.Rd @@ -30,6 +30,7 @@ artmsAnalysisQuantifications( plotTotalQuant = TRUE, plotClusteringAnalysis = TRUE, data_object = FALSE, + printPDF = TRUE, verbose = TRUE ) } @@ -119,7 +120,7 @@ log2fc and pvalues} imputation} \item{plotHeatmapsChanges}{(logical) if \code{TRUE} plots heatmaps of quantified -changes (both all and significant only)} +changes (both all and significant only). Only if \code{printPDF} is also \code{TRUE}} \item{plotTotalQuant}{(logical) if \code{TRUE} plots barplot of total number of quantifications per comparison} @@ -130,6 +131,9 @@ analysis between quantified comparisons (more than 1 comparison required)} \item{data_object}{(logical) flag to indicate whether the required files are data objects. Default is FALSE} +\item{printPDF}{If \code{TRUE} (default) prints out the pdfs. Warning: plot +objects are not returned due to the large number of them.} + \item{verbose}{(logical) \code{TRUE} (default) shows function messages} } \value{ diff --git a/man/artmsQuantification.Rd b/man/artmsQuantification.Rd index 6cc6249..6c0072b 100644 --- a/man/artmsQuantification.Rd +++ b/man/artmsQuantification.Rd @@ -4,13 +4,23 @@ \alias{artmsQuantification} \title{Relative quantification using MSstats} \usage{ -artmsQuantification(yaml_config_file, data_object = FALSE, verbose = TRUE) +artmsQuantification( + yaml_config_file, + data_object = FALSE, + printPDF = TRUE, + display_msstats = FALSE, + verbose = TRUE +) } \arguments{ \item{yaml_config_file}{(char) The yaml file name and location} \item{data_object}{(logical) flag to indicate whether the configuration file -is a string to a file that should be opened or} +is a string to a file that should be opened or config object (yaml)} + +\item{printPDF}{(logical) if \code{TRUE}, prints out pdf} + +\item{display_msstats}{(logical) if \code{TRUE}, prints MSstats outputs} \item{verbose}{(logical) \code{TRUE} (default) shows function messages} } @@ -29,7 +39,7 @@ Relative quantification using MSstats including: } \examples{ \donttest{ -artmsQuantification("artms-ab-config.yaml") +artmsQuantification(yaml_config_file = "path/to/artms-ab-config.yaml") } } \keyword{driver,} diff --git a/man/artmsWriteConfigYamlFile.Rd b/man/artmsWriteConfigYamlFile.Rd index 2c5ea58..7913e71 100644 --- a/man/artmsWriteConfigYamlFile.Rd +++ b/man/artmsWriteConfigYamlFile.Rd @@ -6,6 +6,7 @@ \usage{ artmsWriteConfigYamlFile( config_file_name = "artms_config_file.yaml", + overwrite = FALSE, verbose = TRUE ) } @@ -13,6 +14,8 @@ artmsWriteConfigYamlFile( \item{config_file_name}{(char) The name for the configuration file. It must have a \code{.yaml} extension. If \code{NULL}, it returns the config as a yaml object} +\item{overwrite}{(logical) Default FALSE} + \item{verbose}{(logical) \code{TRUE} (default) shows function messages} } \value{ diff --git a/vignettes/artMS_vignette.Rmd b/vignettes/artMS_vignette.Rmd index cb93fd8..721587c 100644 --- a/vignettes/artMS_vignette.Rmd +++ b/vignettes/artMS_vignette.Rmd @@ -35,7 +35,7 @@ large-scale proteomics (mass-spectrometry-based) datasets obtained using the popular proteomics software [MaxQuant](http://www.biochem.mpg.de/5111795/maxquant). -The functions available in `r Biocpkg("artMS")` can be grouped into the +The functions available in artMS, which can be grouped into the following categories: - Multiple quality control (QC) functions. @@ -47,10 +47,13 @@ clustering, PCA, summary plots, etc) [Photon](https://github.com/jdrudolph/photon), and [Phosfate](http://phosfate.com/) +[Click here for details about all the functions available in artMS](https://biodavidjm.github.io/artMS/reference/index.html). + For a graphical overview check [the slides presented at the 2019 SUMS-RAS](https://mass-spec.stanford.edu/sites/g/files/sbiybj8411/f/sites/default/files/2019SUMS-RAS_artMS_Jimenez-Morales.pdf) (Stanford University Mass Spectrometry - Research Application Symposium) + `r Biocpkg("artMS")` also perfoms basic quality control and relative quantification for **metabolomics** datasets obtained using the alignment table generated by
data_object

(logical) flag to indicate whether the configuration file -is a string to a file that should be opened or

printPDF

(logical) if TRUE, prints out pdf

display_msstats

(logical) if TRUE, prints MSstats outputs

verbose

(char) The name for the configuration file. It must have a .yaml extension. If NULL, it returns the config as a yaml object

overwrite

(logical) Default FALSE

verbose

(logical) TRUE (default) shows function messages