├── tests ├── testthat.R └── testthat │ └── test-evidence.R ├── data ├── artms_config.RData ├── artms_data_ph_keys.RData ├── artms_data_randomDF.RData ├── artms_data_pathogen_TB.RData ├── artms_data_ph_config.RData ├── artms_data_ph_contrast.RData ├── artms_data_ph_evidence.RData ├── artms_data_pathogen_LPN.RData ├── artms_data_ph_msstats_modelqc.RData ├── artms_data_ph_msstats_results.RData └── artms_data_corum_mito_database.RData ├── _pkgdown.yml ├── docs ├── reference │ ├── Rplot001.png │ ├── Rplot002.png │ ├── artmsVolcanoPlot-1.png │ ├── artmsPlotHeatmapQuant-1.png │ ├── artmsQualityControlEvidenceBasic-1.png │ ├── artmsQualityControlEvidenceBasic-2.png │ ├── artms_data_randomDF.html │ ├── artms_data_pathogen_TB.html │ ├── artms_data_ph_contrast.html │ ├── artms_data_ph_msstats_modelqc.html │ ├── artms_data_pathogen_LPN.html │ └── artms_data_ph_msstats_results.html ├── articles │ ├── artMS_vignette_files │ │ ├── figure-html │ │ │ ├── unnamed-chunk-4-1.png │ │ │ ├── unnamed-chunk-4-2.png │ │ │ ├── unnamed-chunk-4-3.png │ │ │ ├── unnamed-chunk-4-4.png │ │ │ ├── unnamed-chunk-4-5.png │ │ │ ├── unnamed-chunk-4-6.png │ │ │ ├── unnamed-chunk-6-1.png │ │ │ ├── unnamed-chunk-6-2.png │ │ │ ├── unnamed-chunk-6-3.png │ │ │ ├── unnamed-chunk-6-4.png │ │ │ ├── unnamed-chunk-6-5.png │ │ │ ├── unnamed-chunk-6-6.png │ │ │ └── unnamed-chunk-6-7.png │ │ └── header-attrs-2.9 │ │ │ └── header-attrs.js │ └── index.html ├── pkgdown.yml ├── link.svg ├── bootstrap-toc.css ├── docsearch.js ├── pkgdown.js ├── sitemap.xml ├── bootstrap-toc.js ├── 404.html └── authors.html ├── .Rbuildignore ├── man ├── artms_data_pathogen_TB.Rd ├── artms_data_randomDF.Rd ├── artms_data_pathogen_LPN.Rd ├── artms_data_ph_contrast.Rd ├── artms_data_ph_msstats_modelqc.Rd ├── artms_data_ph_msstats_results.Rd ├── artmsFilterEvidenceContaminants.Rd ├── artms_data_ph_evidence.Rd ├── artmsIsEvidenceNewVersion.Rd ├── artmsMapUniprot2Entrez.Rd ├── artmsChangeColumnName.Rd ├── artmsDataPlots.Rd ├── artms_data_corum_mito_database.Rd ├── artmsSILACtoLong.Rd ├── artmsPhotonOutput.Rd ├── artmsPhosfateOutput.Rd ├── artmsWriteConfigYamlFile.Rd ├── artmsSpectralCounts.Rd ├── artmsMergeEvidenceAndKeys.Rd ├── artms_data_ph_keys.Rd ├── artmsAnnotationUniprot.Rd ├── artmsVolcanoPlot.Rd ├── artmsAnnotateSpecie.Rd ├── artmsLeaveOnlyUniprotEntryID.Rd ├── artmsEvidenceToSaintExpress.Rd ├── artmsAvgIntensityRT.Rd ├── artmsGeneratePhSiteExtended.Rd ├── artmsIsSpeciesSupported.Rd ├── artmsEnrichLog2fc.Rd ├── artmsResultsWide.Rd ├── artmsConvertMetabolomics.Rd ├── artms_data_ph_config.Rd ├── artmsMsstatsSummary.Rd ├── artmsPlotHeatmapQuant.Rd ├── artmsEvidenceToSAINTq.Rd ├── artmsQuantification.Rd ├── artmsQualityControlMetabolomics.Rd ├── artmsQualityControlSummaryExtended.Rd ├── artms_config.Rd ├── artmsEnrichProfiler.Rd ├── artmsProtein2SiteConversion.Rd └── artmsQualityControlEvidenceBasic.Rd ├── .travis.yml ├── .gitignore ├── inst └── extdata │ └── artms_config.yaml ├── DESCRIPTION ├── NAMESPACE ├── R ├── metabolomics.R ├── avg_intensity_RT.R ├── writeExtras.R ├── otherApps.R ├── getMSstatsformat.R └── evidenceToSaintExpressFormat.R └── README.md /tests/testthat.R: -------------------------------------------------------------------------------- 1 | library(testthat) 2 | library(artMS) 3 | 4 | test_check("artMS") 5 | -------------------------------------------------------------------------------- /data/artms_config.RData: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/biodavidjm/artMS/HEAD/data/artms_config.RData -------------------------------------------------------------------------------- /_pkgdown.yml: -------------------------------------------------------------------------------- 1 | url: http://artms.org/ 2 | 3 | template: 4 | params: 5 | ganalytics: UA-26635029-4 6 | -------------------------------------------------------------------------------- /docs/reference/Rplot001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/biodavidjm/artMS/HEAD/docs/reference/Rplot001.png -------------------------------------------------------------------------------- /docs/reference/Rplot002.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/biodavidjm/artMS/HEAD/docs/reference/Rplot002.png -------------------------------------------------------------------------------- /data/artms_data_ph_keys.RData: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/biodavidjm/artMS/HEAD/data/artms_data_ph_keys.RData -------------------------------------------------------------------------------- /data/artms_data_randomDF.RData: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/biodavidjm/artMS/HEAD/data/artms_data_randomDF.RData -------------------------------------------------------------------------------- /data/artms_data_pathogen_TB.RData: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/biodavidjm/artMS/HEAD/data/artms_data_pathogen_TB.RData -------------------------------------------------------------------------------- /data/artms_data_ph_config.RData: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/biodavidjm/artMS/HEAD/data/artms_data_ph_config.RData -------------------------------------------------------------------------------- /data/artms_data_ph_contrast.RData: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/biodavidjm/artMS/HEAD/data/artms_data_ph_contrast.RData -------------------------------------------------------------------------------- /data/artms_data_ph_evidence.RData: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/biodavidjm/artMS/HEAD/data/artms_data_ph_evidence.RData -------------------------------------------------------------------------------- /data/artms_data_pathogen_LPN.RData: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/biodavidjm/artMS/HEAD/data/artms_data_pathogen_LPN.RData -------------------------------------------------------------------------------- /docs/reference/artmsVolcanoPlot-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/biodavidjm/artMS/HEAD/docs/reference/artmsVolcanoPlot-1.png -------------------------------------------------------------------------------- /data/artms_data_ph_msstats_modelqc.RData: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/biodavidjm/artMS/HEAD/data/artms_data_ph_msstats_modelqc.RData -------------------------------------------------------------------------------- /data/artms_data_ph_msstats_results.RData: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/biodavidjm/artMS/HEAD/data/artms_data_ph_msstats_results.RData -------------------------------------------------------------------------------- /data/artms_data_corum_mito_database.RData: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/biodavidjm/artMS/HEAD/data/artms_data_corum_mito_database.RData -------------------------------------------------------------------------------- /docs/reference/artmsPlotHeatmapQuant-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/biodavidjm/artMS/HEAD/docs/reference/artmsPlotHeatmapQuant-1.png -------------------------------------------------------------------------------- /.Rbuildignore: -------------------------------------------------------------------------------- 1 | ^Meta$ 2 | ^doc$ 3 | ^.*\.Rproj$ 4 | ^\.Rproj\.user$ 5 | ^data-raw$ 6 | codecov.yml 7 | .travis.yml 8 | ^.*\.git$ 9 | _pkgdown.yml -------------------------------------------------------------------------------- /docs/reference/artmsQualityControlEvidenceBasic-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/biodavidjm/artMS/HEAD/docs/reference/artmsQualityControlEvidenceBasic-1.png -------------------------------------------------------------------------------- /docs/reference/artmsQualityControlEvidenceBasic-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/biodavidjm/artMS/HEAD/docs/reference/artmsQualityControlEvidenceBasic-2.png -------------------------------------------------------------------------------- /docs/articles/artMS_vignette_files/figure-html/unnamed-chunk-4-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/biodavidjm/artMS/HEAD/docs/articles/artMS_vignette_files/figure-html/unnamed-chunk-4-1.png -------------------------------------------------------------------------------- /docs/articles/artMS_vignette_files/figure-html/unnamed-chunk-4-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/biodavidjm/artMS/HEAD/docs/articles/artMS_vignette_files/figure-html/unnamed-chunk-4-2.png -------------------------------------------------------------------------------- /docs/articles/artMS_vignette_files/figure-html/unnamed-chunk-4-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/biodavidjm/artMS/HEAD/docs/articles/artMS_vignette_files/figure-html/unnamed-chunk-4-3.png -------------------------------------------------------------------------------- /docs/articles/artMS_vignette_files/figure-html/unnamed-chunk-4-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/biodavidjm/artMS/HEAD/docs/articles/artMS_vignette_files/figure-html/unnamed-chunk-4-4.png -------------------------------------------------------------------------------- /docs/articles/artMS_vignette_files/figure-html/unnamed-chunk-4-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/biodavidjm/artMS/HEAD/docs/articles/artMS_vignette_files/figure-html/unnamed-chunk-4-5.png -------------------------------------------------------------------------------- /docs/articles/artMS_vignette_files/figure-html/unnamed-chunk-4-6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/biodavidjm/artMS/HEAD/docs/articles/artMS_vignette_files/figure-html/unnamed-chunk-4-6.png -------------------------------------------------------------------------------- /docs/articles/artMS_vignette_files/figure-html/unnamed-chunk-6-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/biodavidjm/artMS/HEAD/docs/articles/artMS_vignette_files/figure-html/unnamed-chunk-6-1.png -------------------------------------------------------------------------------- /docs/articles/artMS_vignette_files/figure-html/unnamed-chunk-6-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/biodavidjm/artMS/HEAD/docs/articles/artMS_vignette_files/figure-html/unnamed-chunk-6-2.png -------------------------------------------------------------------------------- /docs/articles/artMS_vignette_files/figure-html/unnamed-chunk-6-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/biodavidjm/artMS/HEAD/docs/articles/artMS_vignette_files/figure-html/unnamed-chunk-6-3.png -------------------------------------------------------------------------------- /docs/articles/artMS_vignette_files/figure-html/unnamed-chunk-6-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/biodavidjm/artMS/HEAD/docs/articles/artMS_vignette_files/figure-html/unnamed-chunk-6-4.png -------------------------------------------------------------------------------- /docs/articles/artMS_vignette_files/figure-html/unnamed-chunk-6-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/biodavidjm/artMS/HEAD/docs/articles/artMS_vignette_files/figure-html/unnamed-chunk-6-5.png -------------------------------------------------------------------------------- /docs/articles/artMS_vignette_files/figure-html/unnamed-chunk-6-6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/biodavidjm/artMS/HEAD/docs/articles/artMS_vignette_files/figure-html/unnamed-chunk-6-6.png -------------------------------------------------------------------------------- /docs/articles/artMS_vignette_files/figure-html/unnamed-chunk-6-7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/biodavidjm/artMS/HEAD/docs/articles/artMS_vignette_files/figure-html/unnamed-chunk-6-7.png -------------------------------------------------------------------------------- /docs/pkgdown.yml: -------------------------------------------------------------------------------- 1 | pandoc: 2.11.4 2 | pkgdown: 1.6.1 3 | pkgdown_sha: ~ 4 | articles: 5 | artMS_vignette: artMS_vignette.html 6 | last_built: 2021-07-14T07:23Z 7 | urls: 8 | reference: http://artms.org//reference 9 | article: http://artms.org//articles 10 | 11 | -------------------------------------------------------------------------------- /man/artms_data_pathogen_TB.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/data.R 3 | \docType{data} 4 | \name{artms_data_pathogen_TB} 5 | \alias{artms_data_pathogen_TB} 6 | \title{TB PATHOGEN: Mycobacterium tuberculosis 7 | (strain ATCC 35801 / TMC 107 / Erdman) UNIPROTS IDS} 8 | \format{ 9 | A data.frame of Entry IDs 10 | } 11 | \usage{ 12 | artms_data_pathogen_TB 13 | } 14 | \description{ 15 | TB PATHOGEN: Mycobacterium tuberculosis 16 | (strain ATCC 35801 / TMC 107 / Erdman) UNIPROTS IDS 17 | } 18 | \keyword{datasets} 19 | -------------------------------------------------------------------------------- /man/artms_data_randomDF.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/data.R 3 | \docType{data} 4 | \name{artms_data_randomDF} 5 | \alias{artms_data_randomDF} 6 | \title{Random data set} 7 | \format{ 8 | A data frame with 100 rows and 10 variables: 9 | \describe{ 10 | Dataset generated using this code 11 | 12 | \code{data.frame(replicate(10,sample(0:1,100,rep=TRUE)))} 13 | } 14 | } 15 | \usage{ 16 | artms_data_randomDF 17 | } 18 | \description{ 19 | Dataset randomly generated for testing purposes 20 | } 21 | \keyword{datasets} 22 | -------------------------------------------------------------------------------- /man/artms_data_pathogen_LPN.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/data.R 3 | \docType{data} 4 | \name{artms_data_pathogen_LPN} 5 | \alias{artms_data_pathogen_LPN} 6 | \title{LPN PATHOGEN: Legionella pneumophila subsp. pneumophila 7 | (strain Philadelphia 1 / ATCC 33152 / DSM 7513) UNIPROT IDS} 8 | \format{ 9 | A data.frame of Entry IDs 10 | } 11 | \usage{ 12 | artms_data_pathogen_LPN 13 | } 14 | \description{ 15 | LPN PATHOGEN: Legionella pneumophila subsp. pneumophila 16 | (strain Philadelphia 1 / ATCC 33152 / DSM 7513) UNIPROT IDS 17 | } 18 | \keyword{datasets} 19 | -------------------------------------------------------------------------------- /docs/articles/artMS_vignette_files/header-attrs-2.9/header-attrs.js: -------------------------------------------------------------------------------- 1 | // Pandoc 2.9 adds attributes on both header and div. We remove the former (to 2 | // be compatible with the behavior of Pandoc < 2.8). 3 | document.addEventListener('DOMContentLoaded', function(e) { 4 | var hs = document.querySelectorAll("div.section[class*='level'] > :first-child"); 5 | var i, h, a; 6 | for (i = 0; i < hs.length; i++) { 7 | h = hs[i]; 8 | if (!/^h[1-6]$/i.test(h.tagName)) continue; // it should be a header h1-h6 9 | a = h.attributes; 10 | while (a.length > 0) h.removeAttribute(a[0].name); 11 | } 12 | }); 13 | -------------------------------------------------------------------------------- /man/artms_data_ph_contrast.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/data.R 3 | \docType{data} 4 | \name{artms_data_ph_contrast} 5 | \alias{artms_data_ph_contrast} 6 | \title{Contrast example for the PH dataset} 7 | \format{ 8 | list with one comparison: "Cal33-HSC6" 9 | } 10 | \usage{ 11 | artms_data_ph_contrast 12 | } 13 | \description{ 14 | Contrast file with the relative quantification to be performed 15 | for the two conditions available in the example dataset: "Cal33-HSC6". 16 | See vignette for more details on how to prepare the contrast file. 17 | } 18 | \keyword{datasets} 19 | -------------------------------------------------------------------------------- /man/artms_data_ph_msstats_modelqc.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/data.R 3 | \docType{data} 4 | \name{artms_data_ph_msstats_modelqc} 5 | \alias{artms_data_ph_msstats_modelqc} 6 | \title{MSstats modelQC example} 7 | \format{ 8 | A data frame resulting from running the latest version of 9 | \code{MSstats::groupComparison} function required as input for 10 | artmsAnalysisQuantifications() 11 | } 12 | \usage{ 13 | artms_data_ph_msstats_modelqc 14 | } 15 | \description{ 16 | Normalized data obtained from the \code{artmsQuantification()} step 17 | of the PH dataset (global analysis) 18 | } 19 | \keyword{datasets} 20 | -------------------------------------------------------------------------------- /man/artms_data_ph_msstats_results.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/data.R 3 | \docType{data} 4 | \name{artms_data_ph_msstats_results} 5 | \alias{artms_data_ph_msstats_results} 6 | \title{MSstats results example} 7 | \format{ 8 | A data frame resulting from running the latest version of MSstats 9 | } 10 | \usage{ 11 | artms_data_ph_msstats_results 12 | } 13 | \description{ 14 | Relative quantification results obtained running MSstats 15 | on the available PH datasets (global analysis). 16 | Changes in protein phosphorylation were quantified between two conditions 17 | (check \code{artms_data_ph_contrast}) 18 | } 19 | \keyword{datasets} 20 | -------------------------------------------------------------------------------- /docs/link.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 8 | 12 | 13 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | # R for travis: see documentation at https://docs.travis-ci.com/user/languages/r 2 | 3 | # Use R language 4 | language: r 5 | 6 | #Define multiple R-versions, one from bioconductor 7 | r: 8 | - oldrel 9 | - release 10 | - devel 11 | - bioc-devel 12 | 13 | env: _R_CHECK_CRAN_INCOMING_=false 14 | 15 | cache: 16 | packages: true 17 | 18 | addons: 19 | apt: 20 | update: true 21 | packages: 22 | - libgit2-dev 23 | 24 | r_packages: 25 | - covr 26 | - devtools 27 | 28 | r_github_packages: 29 | - biodavidjm/artMS 30 | 31 | bioc_packages: 32 | - BiocStyle 33 | - biomaRt 34 | - ComplexHeatmap 35 | - limma 36 | - MSstats 37 | - org.Hs.eg.db 38 | - org.Mm.eg.db 39 | 40 | r_check_args: --no-build-vignettes --no-vignettes 41 | 42 | warnings_are_errors: true 43 | 44 | # after_success: 45 | # - Rscript -e 'library(covr); codecov()' 46 | -------------------------------------------------------------------------------- /man/artmsFilterEvidenceContaminants.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/MSstats_functions.R 3 | \name{artmsFilterEvidenceContaminants} 4 | \alias{artmsFilterEvidenceContaminants} 5 | \title{Remove contaminants and empty proteins from the MaxQuant evidence file} 6 | \usage{ 7 | artmsFilterEvidenceContaminants(x, verbose = TRUE) 8 | } 9 | \arguments{ 10 | \item{x}{(data.frame) of the Evidence file} 11 | 12 | \item{verbose}{(logical) \code{TRUE} (default) shows function messages} 13 | } 14 | \value{ 15 | (data.frame) without REV__ and CON__ Protein ids 16 | } 17 | \description{ 18 | Remove contaminants and erronously identified 'reverse' 19 | sequences by MaxQuant, in addition to empty protein ids 20 | } 21 | \examples{ 22 | ef <- artmsFilterEvidenceContaminants(x = artms_data_ph_evidence) 23 | } 24 | \keyword{cleanup,} 25 | \keyword{contaminants} 26 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | Meta 2 | doc 3 | 4 | # History files 5 | **.Rhistory 6 | **.Rapp.history 7 | **.Rprofile 8 | **.DS_Store 9 | 10 | # TESTS 11 | tests/testthat/*log 12 | tests/testthat/*txt 13 | tests/testthat/*pdf 14 | 15 | # MSstats files 16 | msstats.log* 17 | sessionInfo.txt 18 | # Session Data files 19 | .RData 20 | # Example code in package build process 21 | *-Ex.R 22 | # Output files from R CMD build 23 | /*.tar.gz 24 | # Output files from R CMD check 25 | /*.Rcheck/ 26 | # RStudio files 27 | .Rproj.user/ 28 | *.Rproj 29 | # produced vignettes 30 | vignettes/*.html 31 | vignettes/*.pdf 32 | # OAuth2 token, see https://github.com/hadley/httr/releases/tag/v0.3 33 | .httr-oauth 34 | # knitr and R markdown default cache directories 35 | /*_cache/ 36 | /cache/ 37 | # Temporary files created by R markdown 38 | *.utf8.md 39 | *.knit.md 40 | .Rproj.user 41 | # The PDF is too large to be included 42 | inst/doc 43 | -------------------------------------------------------------------------------- /man/artms_data_ph_evidence.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/data.R 3 | \docType{data} 4 | \name{artms_data_ph_evidence} 5 | \alias{artms_data_ph_evidence} 6 | \title{Evidence file example} 7 | \format{ 8 | A data frame with all the columns available in an evidence file 9 | generated with MaxQuant version 1.6.2.3 10 | } 11 | \usage{ 12 | artms_data_ph_evidence 13 | } 14 | \description{ 15 | Evidence file from a PH experiment consisting of two 16 | head and neck cancer cell lines ("Conditions" \code{"Cal33"} and \code{"HSC6"}). 17 | 18 | Unfortunately, the number of lines was reduced to 1/20 due 19 | to bioconductor limitations on data size, but it should be enough to test the 20 | qc and quantification functions. The number of total columns 21 | from the original evidence file was also reduced to 36 22 | (out of the original 66 columns). 23 | Check \code{colnames(artms_data_ph_evidence)} for details 24 | } 25 | \keyword{datasets} 26 | -------------------------------------------------------------------------------- /man/artmsIsEvidenceNewVersion.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/checkIfFile.R 3 | \name{artmsIsEvidenceNewVersion} 4 | \alias{artmsIsEvidenceNewVersion} 5 | \title{Check if a given evidencee file was generated by a new version of 6 | MaxQuant (v>1)} 7 | \usage{ 8 | artmsIsEvidenceNewVersion(evidence_file) 9 | } 10 | \arguments{ 11 | \item{evidence_file}{the evidence file name} 12 | } 13 | \value{ 14 | (logical) \code{TRUE} if it is a newer version of MaxQuant, 15 | \code{FALSE} otherwise 16 | } 17 | \description{ 18 | MaxQuant introduced changes in the column names and number 19 | of columns for the evidence file in version 1 (we think). 20 | This function check whether the evidence comes from the latest version 21 | of MaxQuant. 22 | } 23 | \examples{ 24 | artmsIsEvidenceNewVersion(evidence_file = artms_data_ph_evidence) 25 | } 26 | \keyword{check} 27 | \keyword{evidence,} 28 | \keyword{file,} 29 | \keyword{input,} 30 | \keyword{version} 31 | -------------------------------------------------------------------------------- /man/artmsMapUniprot2Entrez.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/annotations.R 3 | \name{artmsMapUniprot2Entrez} 4 | \alias{artmsMapUniprot2Entrez} 5 | \title{Map GENE SYMBOL, NAME, AND ENTREZID to a vector of Uniprot IDS} 6 | \usage{ 7 | artmsMapUniprot2Entrez(uniprotkb, species) 8 | } 9 | \arguments{ 10 | \item{uniprotkb}{(vector) Vector of UniprotKB IDs} 11 | 12 | \item{species}{(char) The species name. Species currently supported 13 | as part of artMS: check \code{?artmsIsSpeciesSupported()} to find out the 14 | list of supported species`} 15 | } 16 | \value{ 17 | (data.frame) with ENTREZID and GENENAMES mapped on UniprotKB ids 18 | } 19 | \description{ 20 | Map GENE SYMBOL, NAME, AND ENTREZID to a vector of Uniprot IDS 21 | } 22 | \examples{ 23 | # Load an example with human proteins 24 | exampleID <- c("Q6P996", "B1N8M6") 25 | artmsMapUniprot2Entrez(uniprotkb = exampleID, 26 | species = "HUMAN") 27 | } 28 | \keyword{annotation,} 29 | \keyword{ids} 30 | -------------------------------------------------------------------------------- /man/artmsChangeColumnName.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/MSstats_functions.R 3 | \name{artmsChangeColumnName} 4 | \alias{artmsChangeColumnName} 5 | \title{Change a specific column name in a given data.frame} 6 | \usage{ 7 | artmsChangeColumnName(dataset, oldname, newname) 8 | } 9 | \arguments{ 10 | \item{dataset}{(data.frame) with the column name you want to change} 11 | 12 | \item{oldname}{(char) the old column name} 13 | 14 | \item{newname}{(char) the new name for that column} 15 | } 16 | \value{ 17 | (data.frame) with the new specified column name 18 | } 19 | \description{ 20 | Making easier to change a column name in any data.frame 21 | } 22 | \examples{ 23 | artms_data_ph_evidence <- artmsChangeColumnName( 24 | dataset = artms_data_ph_evidence, 25 | oldname = "Phospho..STY.", 26 | newname = "PH_STY") 27 | } 28 | \keyword{columns} 29 | \keyword{data.frame,} 30 | \keyword{rename,} 31 | -------------------------------------------------------------------------------- /man/artmsDataPlots.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/plots.R 3 | \name{artmsDataPlots} 4 | \alias{artmsDataPlots} 5 | \title{Individual Normalized abundance dot plots for every protein} 6 | \usage{ 7 | artmsDataPlots(input_file, output_file, verbose = TRUE) 8 | } 9 | \arguments{ 10 | \item{input_file}{(char) File path and name to the \code{-normalized.txt} output 11 | file from MSstats} 12 | 13 | \item{output_file}{(char) Output file (path) name (add the \code{.pdf} extension)} 14 | 15 | \item{verbose}{(logical) \code{TRUE} (default) shows function messages} 16 | } 17 | \value{ 18 | (pdf) file with each individual protein abundance plot for each 19 | conditions 20 | } 21 | \description{ 22 | Protein abundance dot plots for each unique uniprot id. It can 23 | take a long time 24 | } 25 | \examples{ 26 | \dontrun{ 27 | artmsDataPlots(input_file = "results/ab-results-mss-normalized.txt", 28 | output_file = "results/ab-results-mss-normalized.pdf") 29 | } 30 | } 31 | \keyword{abundance,} 32 | \keyword{dotplots,} 33 | \keyword{plot} 34 | -------------------------------------------------------------------------------- /man/artms_data_corum_mito_database.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/data.R 3 | \docType{data} 4 | \name{artms_data_corum_mito_database} 5 | \alias{artms_data_corum_mito_database} 6 | \title{CORUM Protein Complexes database use for complex enrichment analysis} 7 | \format{ 8 | Tab delimited file. 9 | \describe{ 10 | To find out more about the format and columns available at CORUM, 11 | please visit this 12 | \href{http://mips.helmholtz-muenchen.de/corum/}{link} 13 | } 14 | } 15 | \usage{ 16 | artms_data_corum_mito_database 17 | } 18 | \description{ 19 | The list of protein complexes has been enriched with 20 | mitochondria proteins from mouse, as described in this paper: 21 | 22 | 2018 - Ruchi Masand, Esther Paulo, Dongmei Wu , Yangmeng Wang, 23 | Danielle L. Swaney, David Jimenez-Morales, Nevan J. Krogan, and Biao Wang 24 | Proteome Imbalance of Mitochondrial Electron Transport Chain in Brown 25 | Adipocytes Leads to Metabolic Benefits. 26 | Cell Metab. 2018 Mar 06; 27(3):616-629.e4 27 | } 28 | \details{ 29 | LAST CORUM DOWNLOAD DATE: 2017-08-01 30 | } 31 | \keyword{datasets} 32 | -------------------------------------------------------------------------------- /man/artmsSILACtoLong.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/MSstats_functions.R 3 | \name{artmsSILACtoLong} 4 | \alias{artmsSILACtoLong} 5 | \title{Convert the SILAC evidence file to MSstats format} 6 | \usage{ 7 | artmsSILACtoLong(evidence_file, output = NULL, verbose = TRUE) 8 | } 9 | \arguments{ 10 | \item{evidence_file}{(char) Text filepath to the evidence file} 11 | 12 | \item{output}{(char) Text filepath of the output name. If NULL it does not 13 | write the output} 14 | 15 | \item{verbose}{(logical) \code{TRUE} (default) shows function messages} 16 | } 17 | \value{ 18 | (data.frame) with SILAC data processed for MSstats (and output file) 19 | } 20 | \description{ 21 | Converting the evidence file from a SILAC search to a format 22 | compatible with MSstats. It basically modifies the Raw.files adding the 23 | Heavy and Light label 24 | } 25 | \examples{ 26 | \dontrun{ 27 | evidence2silac <- artmsSILACtoLong(evidence_file = "silac.evicence.txt", 28 | output = "silac-evidence.txt") 29 | } 30 | } 31 | \keyword{convert,} 32 | \keyword{evidence} 33 | \keyword{silac,} 34 | -------------------------------------------------------------------------------- /man/artmsPhotonOutput.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/otherApps.R 3 | \name{artmsPhotonOutput} 4 | \alias{artmsPhotonOutput} 5 | \title{Generate PHOTON Input file} 6 | \usage{ 7 | artmsPhotonOutput(inputFile, output_dir = ".", verbose = TRUE) 8 | } 9 | \arguments{ 10 | \item{inputFile}{(char) the \code{imputedL2fcExtended.txt} file name and location} 11 | 12 | \item{output_dir}{(char) Name of the folder to output results 13 | (Default: current. Recommended: "photon_input_files" or similar)} 14 | 15 | \item{verbose}{(logical) \code{TRUE} (default) to show function messages} 16 | } 17 | \value{ 18 | Multiple output files (inputs of phosfate) 19 | } 20 | \description{ 21 | It takes as input the \code{imputedL2fcExtended.txt} results 22 | generated by the \code{artmsAnalysisQuantifications()} function and generates 23 | the \href{https://github.com/jdrudolph/photon}{PHOTON} input file. 24 | Please, notice that the only species suported by PHOTON is humans. 25 | } 26 | \examples{ 27 | \dontrun{ 28 | artmsPhotonOutput(inputFile) 29 | } 30 | } 31 | \keyword{files} 32 | \keyword{generate,} 33 | \keyword{outputs,} 34 | -------------------------------------------------------------------------------- /man/artmsPhosfateOutput.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/otherApps.R 3 | \name{artmsPhosfateOutput} 4 | \alias{artmsPhosfateOutput} 5 | \title{Generate Phosfate Input file} 6 | \usage{ 7 | artmsPhosfateOutput(inputFile, output_dir = ".", verbose = TRUE) 8 | } 9 | \arguments{ 10 | \item{inputFile}{(char) the \code{imputedL2fcExtended.txt} file name and location} 11 | 12 | \item{output_dir}{(char) Name of the folder to output results 13 | (Default: current directory. Recommended: \code{phosfate_input})} 14 | 15 | \item{verbose}{(logical) \code{TRUE} (default) to show function messages} 16 | } 17 | \value{ 18 | Multiple output files (inputs of phosfate) 19 | } 20 | \description{ 21 | It takes as input the \code{imputedL2fcExtended.txt} results 22 | generated by the \code{artmsAnalysisQuantifications()} function and generates 23 | the \href{http://phosfate.com/}{Phosfate} input file (or data.frame) 24 | Please, notice that the only species suported by Phosfate is humans. 25 | } 26 | \examples{ 27 | \dontrun{ 28 | artmsPhosfateOutput(inputFile) 29 | } 30 | } 31 | \keyword{files} 32 | \keyword{generate,} 33 | \keyword{outputs,} 34 | -------------------------------------------------------------------------------- /man/artmsWriteConfigYamlFile.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/main.R 3 | \name{artmsWriteConfigYamlFile} 4 | \alias{artmsWriteConfigYamlFile} 5 | \title{Write out a template file of the artMS configuration file (yaml)} 6 | \usage{ 7 | artmsWriteConfigYamlFile( 8 | config_file_name = "artms_config_file.yaml", 9 | overwrite = FALSE, 10 | verbose = TRUE 11 | ) 12 | } 13 | \arguments{ 14 | \item{config_file_name}{(char) The name for the configuration file. It must 15 | have a \code{.yaml} extension. If \code{NULL}, it returns the config as a yaml object} 16 | 17 | \item{overwrite}{(logical) Default FALSE} 18 | 19 | \item{verbose}{(logical) \code{TRUE} (default) shows function messages} 20 | } 21 | \value{ 22 | A file (or yaml data object) of the artMS configuration file 23 | } 24 | \description{ 25 | Creates a template file of the artMS configuration file, which 26 | is required to run \code{artmsQuantification}. Check \code{?artms_config} and the 27 | vignettes to find out more about the details of the structure of the file 28 | and how to fill it up 29 | } 30 | \examples{ 31 | config_empty <- artmsWriteConfigYamlFile(config_file_name = NULL) 32 | } 33 | \keyword{config,} 34 | \keyword{yaml} 35 | -------------------------------------------------------------------------------- /man/artmsSpectralCounts.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/MSstats_functions.R 3 | \name{artmsSpectralCounts} 4 | \alias{artmsSpectralCounts} 5 | \title{Outputs the spectral counts from the MaxQuant evidence file.} 6 | \usage{ 7 | artmsSpectralCounts( 8 | evidence_file, 9 | keys_file, 10 | output_file = NULL, 11 | verbose = TRUE 12 | ) 13 | } 14 | \arguments{ 15 | \item{evidence_file}{(char) Maxquant evidence file or data object} 16 | 17 | \item{keys_file}{(char) Keys file with the experimental design or data object} 18 | 19 | \item{output_file}{(char) Output file name (add \code{.txt} extension). 20 | If \code{NULL} (default) it returns a data.frame object} 21 | 22 | \item{verbose}{(logical) \code{TRUE} (default) shows function messages} 23 | } 24 | \value{ 25 | A txt file with biological replicates, protein id, and spectral 26 | count columns 27 | } 28 | \description{ 29 | Outputs the spectral counts from the MaxQuant evidence file. 30 | } 31 | \examples{ 32 | summary_spectral_counts <- artmsSpectralCounts( 33 | evidence_file = artms_data_ph_evidence, 34 | keys_file = artms_data_ph_keys) 35 | } 36 | \keyword{evidence} 37 | \keyword{spectral_counts,} 38 | -------------------------------------------------------------------------------- /man/artmsMergeEvidenceAndKeys.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/MSstats_functions.R 3 | \name{artmsMergeEvidenceAndKeys} 4 | \alias{artmsMergeEvidenceAndKeys} 5 | \title{Merge evidence.txt (or summary.txt) with keys.txt files} 6 | \usage{ 7 | artmsMergeEvidenceAndKeys( 8 | x, 9 | keys, 10 | by = c("RawFile"), 11 | isSummary = FALSE, 12 | verbose = TRUE 13 | ) 14 | } 15 | \arguments{ 16 | \item{x}{(data.frame or char) The evidence data, either as data.frame or 17 | the file name (and path). It also works for the summary.txt file} 18 | 19 | \item{keys}{The keys data, either as a data.frame or file name (and path)} 20 | 21 | \item{by}{(vector) specifying the columns use to merge the evidence and keys. 22 | Default: \code{by=c('RawFile')}} 23 | 24 | \item{isSummary}{(logical) TRUE or FALSE (default)} 25 | 26 | \item{verbose}{(logical) \code{TRUE} (default) shows function messages} 27 | } 28 | \value{ 29 | (data.frame) with the evidence and keys merged 30 | } 31 | \description{ 32 | Merge the evidence and keys files on the given columns 33 | } 34 | \examples{ 35 | evidenceKeys <- artmsMergeEvidenceAndKeys(x = artms_data_ph_evidence, 36 | keys = artms_data_ph_keys) 37 | } 38 | \keyword{evidence,} 39 | \keyword{keys} 40 | \keyword{merge,} 41 | \keyword{summary,} 42 | -------------------------------------------------------------------------------- /tests/testthat/test-evidence.R: -------------------------------------------------------------------------------- 1 | context("Check Evidence file") 2 | 3 | test_that("checkIfFile",{ 4 | # Data.frame to test 5 | L3 <- LETTERS[1:3] 6 | fac <- sample(L3, 10, replace = TRUE) 7 | d <- data.frame(x = 1, y = 1:10, fac = fac) 8 | 9 | expect_true(is.data.frame(.artms_checkIfFile(d))) 10 | expect_error(.artms_checkIfFile(L3)) 11 | }) 12 | 13 | test_that("Check artmsQuantification() output", { 14 | # Get data ready 15 | artms_data_ph_config$files$evidence <- artms_data_ph_evidence 16 | artms_data_ph_config$files$keys <- artms_data_ph_keys 17 | artms_data_ph_config$files$contrasts <- artms_data_ph_contrast 18 | artms_data_ph_config$output_extras <- 0 19 | msresults <- artmsQuantification(yaml_config_file = artms_data_ph_config, 20 | data_object = TRUE, 21 | display_msstats = FALSE, 22 | verbose = TRUE, 23 | printPDF = FALSE, 24 | printTables = FALSE) 25 | # Test 26 | expect_equal( length(msresults), 5 ) 27 | expect_equal(dim(msresults$ComparisonResult)[1], 2) 28 | expect_equal(dim(msresults$ComparisonResult)[2], 11) 29 | expect_equal(dim(msresults$ModelQC)[1], 5) 30 | expect_equal(dim(msresults$ModelQC)[2], 13) 31 | expect_equal(length(msresults$FittedModel[[1]]), 13) 32 | }) 33 | 34 | 35 | -------------------------------------------------------------------------------- /man/artms_data_ph_keys.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/data.R 3 | \docType{data} 4 | \name{artms_data_ph_keys} 5 | \alias{artms_data_ph_keys} 6 | \title{Keys File Example} 7 | \format{ 8 | Tab delimited file with the following columns: 9 | \describe{ 10 | \item{Raw.file}{Raw file processed. Each one should be a unique 11 | biological (or technical) replicate} 12 | 13 | \item{IsotopeLabelType}{Type of labeling. \code{L} is used for label free 14 | experiments} 15 | 16 | \item{Condition}{Label for conditions. VERY IMPORTANT: Only alpha-numeric 17 | characters and \verb{underscore (_)} are allowed} 18 | 19 | \item{BioReplicate}{Label for the Biological replicates. VERY IMPORTANT: 20 | Use the same labeling for bioreplicate as the Condition, but adding a 21 | \verb{dash (-)} corresponding to the number of biological replicate. 22 | For example, for \code{Condition} \code{"Cal"}, use \code{Cal-1}, \code{Cal-2}, \code{Cal-3}, etc 23 | for the bioreplicates} 24 | 25 | \item{Run}{The MS run number} 26 | } 27 | } 28 | \usage{ 29 | artms_data_ph_keys 30 | } 31 | \description{ 32 | the \code{artMS} keys file provides the details of the experimental 33 | design for any given proteomics experiment. 34 | 35 | This particular example belongs to a PH experiment consisting of two 36 | head and neck cancer cell lines ("Conditions" \code{"Cal33"} and \code{"HSC6"}), 37 | with 2 biological replicates each (in this reduced version) 38 | } 39 | \keyword{datasets} 40 | -------------------------------------------------------------------------------- /man/artmsAnnotationUniprot.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/annotations.R 3 | \name{artmsAnnotationUniprot} 4 | \alias{artmsAnnotationUniprot} 5 | \title{Annotate table with Gene Symbol and Name based on Uniprot ID(s)} 6 | \usage{ 7 | artmsAnnotationUniprot(x, columnid, species, verbose = TRUE) 8 | } 9 | \arguments{ 10 | \item{x}{(data.frame) to be annotated (or file path and name)} 11 | 12 | \item{columnid}{(char) The column with the uniprotkb ids} 13 | 14 | \item{species}{(char) The species name. Check \code{?artmsMapUniprot2Entrez} 15 | to find out more about supported species.} 16 | 17 | \item{verbose}{(logical) \code{TRUE} (default) shows function messages} 18 | } 19 | \value{ 20 | (data.frame) with two new columns: \code{Gene} and \code{Protein.name} 21 | } 22 | \description{ 23 | Annotate gene name and symbol based on uniprot ids. It will 24 | take the column from your data.frame specified by the \code{columnid} argument, 25 | search for the gene symbol, name, and entrez based on the species (\code{species} 26 | argument) and merge the information back to the input data.frame 27 | } 28 | \examples{ 29 | # This example adds annotations to the example evidence file included in 30 | # artMS, based on the column 'Proteins'. 31 | 32 | evidence_anno <- artmsAnnotationUniprot(x = artms_data_ph_evidence, 33 | columnid = 'Proteins', 34 | species = 'human') 35 | } 36 | \keyword{annotation,} 37 | \keyword{uniprot} 38 | -------------------------------------------------------------------------------- /man/artmsVolcanoPlot.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/plots.R 3 | \name{artmsVolcanoPlot} 4 | \alias{artmsVolcanoPlot} 5 | \title{Volcano plot (log2fc / pvalues)} 6 | \usage{ 7 | artmsVolcanoPlot( 8 | mss_results, 9 | output_name = "volcano_plot.pdf", 10 | lfc_upper = 1, 11 | lfc_lower = -1, 12 | whatPvalue = "adj.pvalue", 13 | FDR = 0.05, 14 | PDF = TRUE, 15 | decimal_threshold = 16, 16 | verbose = TRUE 17 | ) 18 | } 19 | \arguments{ 20 | \item{mss_results}{(data.frame or file) Selected MSstats results} 21 | 22 | \item{output_name}{(char) Name for the output file (don't forget the \code{.pdf} 23 | extension)} 24 | 25 | \item{lfc_upper}{(numeric) log2fc upper threshold (positive value)} 26 | 27 | \item{lfc_lower}{(numeric) log2fc lower threshold (negative value)} 28 | 29 | \item{whatPvalue}{(char) \code{pvalue} or \code{adj.pvalue} (default)} 30 | 31 | \item{FDR}{(numeric) False Discovery Rate threshold} 32 | 33 | \item{PDF}{(logical) Option to generate pdf format. Default: \code{T}} 34 | 35 | \item{decimal_threshold}{(numeric) Decimal threshold for the pvalue. 36 | Default: 16 (10^-16)} 37 | 38 | \item{verbose}{(logical) \code{TRUE} (default) shows function messages} 39 | } 40 | \value{ 41 | (pdf) of a volcano plot 42 | } 43 | \description{ 44 | It generates a scatter-plot used to quickly identify changes 45 | } 46 | \examples{ 47 | artmsVolcanoPlot(mss_results = artms_data_ph_msstats_results, 48 | whatPvalue = "pvalue", 49 | PDF = FALSE) 50 | } 51 | \keyword{plot,} 52 | \keyword{volcano} 53 | -------------------------------------------------------------------------------- /man/artmsAnnotateSpecie.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/analysisQuantifications.R 3 | \name{artmsAnnotateSpecie} 4 | \alias{artmsAnnotateSpecie} 5 | \title{Adding a column with the species name} 6 | \usage{ 7 | artmsAnnotateSpecie(df, pathogen = "nopathogen", species) 8 | } 9 | \arguments{ 10 | \item{df}{(data.frame) with a \code{Protein} column (of uniprot ids)} 11 | 12 | \item{pathogen}{(char) Is there a pathogen in the dataset as well? 13 | if it does not, then use \code{pathogen = nopathogen} (default). Supported\code{tb} 14 | (Tuberculosis), 15 | \code{lpn} (Legionella)} 16 | 17 | \item{species}{(char) Host organism (supported for now: \code{human} or \code{mouse})} 18 | } 19 | \value{ 20 | (data.frame) The same data.frame but with an extra column 21 | specifying the species 22 | } 23 | \description{ 24 | Adding the species name to every protein. 25 | This makes more sense if there are more than one species in the dataset, 26 | which must be specified in the \code{pathogen} option. Influenza is a special 27 | case that it does not need to be specified, as far as the proteins were 28 | originally annotated as \code{INFLUENZAGENE_STRAIN} 29 | (strains covered \code{H1N1}, \code{H3N2}, \code{H5N1}), as for example, \code{NS1_H1N1} 30 | } 31 | \examples{ 32 | # Adding a new column with the main species of the data. Easy. 33 | # But the main functionality is to add both the host-species and a pathogen, 34 | # which is not illustrated in this example 35 | data_with_specie <- artmsAnnotateSpecie(df = artms_data_ph_msstats_results, 36 | species = "human") 37 | } 38 | \keyword{annotation,} 39 | \keyword{species} 40 | -------------------------------------------------------------------------------- /man/artmsLeaveOnlyUniprotEntryID.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/annotations.R 3 | \name{artmsLeaveOnlyUniprotEntryID} 4 | \alias{artmsLeaveOnlyUniprotEntryID} 5 | \title{Leave only the Entry ID from a typical full Uniprot IDs in a 6 | given column} 7 | \usage{ 8 | artmsLeaveOnlyUniprotEntryID(x, columnid) 9 | } 10 | \arguments{ 11 | \item{x}{(data.frame) that contains the \code{columnid}} 12 | 13 | \item{columnid}{(char) Column name with the full uniprot ids} 14 | } 15 | \value{ 16 | (data.frame) with only Entry IDs. 17 | } 18 | \description{ 19 | Downloading a Reference Uniprot fasta database includes several 20 | Uniprot IDs for every protein. If the regular expression available in 21 | Maxquant is not activated, the full id will be used in the Proteins, 22 | Lead Protein, and Leading Razor Protein columns. This script leaves only the 23 | Entry ID. 24 | 25 | For example, values in a Protein column like this: 26 | 27 | \verb{sp|P12345|Entry_name;sp|P54321|Entry_name2} 28 | 29 | will be replace by 30 | 31 | `P12345;P54321`` 32 | } 33 | \examples{ 34 | # Example of data frame with full uniprot ids and sequences 35 | p <- c("sp|A6NIE6|RN3P2_HUMAN;sp|Q9NYV6|RRN3_HUMAN", 36 | "sp|A7E2V4|ZSWM8_HUMAN", 37 | "sp|A5A6H4|ROA1_PANTR;sp|P09651|ROA1_HUMAN;sp|Q32P51|RA1L2_HUMAN", 38 | "sp|A0FGR8|ESYT2_HUMAN") 39 | s <- c("ALENDFFNSPPRK", "GWGSPGRPK", "SSGPYGGGGQYFAK", "VLVALASEELAK") 40 | evidence <- data.frame(Proteins = p, Sequences = s, stringsAsFactors = FALSE) 41 | 42 | # Replace the Proteins column with only Entry ids 43 | evidence <- artmsLeaveOnlyUniprotEntryID(x = evidence, columnid = "Proteins") 44 | } 45 | \keyword{annotation,} 46 | \keyword{ids} 47 | -------------------------------------------------------------------------------- /man/artmsEvidenceToSaintExpress.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/evidenceToSaintExpressFormat.R 3 | \name{artmsEvidenceToSaintExpress} 4 | \alias{artmsEvidenceToSaintExpress} 5 | \title{MaxQuant evidence file to SAINTexpress format} 6 | \usage{ 7 | artmsEvidenceToSaintExpress( 8 | evidence_file, 9 | keys_file, 10 | ref_proteome_file, 11 | quant_variable = c("msspc", "msint"), 12 | output_file, 13 | verbose = TRUE 14 | ) 15 | } 16 | \arguments{ 17 | \item{evidence_file}{(char) The evidence file path and name} 18 | 19 | \item{keys_file}{(char) Keys file with a SAINT column 20 | specifying test (\code{T}) and control (\code{C}) conditions} 21 | 22 | \item{ref_proteome_file}{(char) Reference proteome path file name in 23 | fasta format} 24 | 25 | \item{quant_variable}{(char) choose either 26 | \itemize{ 27 | \item \code{msspc} (spectral counts, default) or 28 | \item \code{msint} (MS Intensity) 29 | }} 30 | 31 | \item{output_file}{(char) Output file name (must have extension .txt)} 32 | 33 | \item{verbose}{(logical) \code{TRUE} (default) shows function messages} 34 | } 35 | \value{ 36 | The 3 required files by SAINTexpress: 37 | \itemize{ 38 | \item \code{interactions.txt} 39 | \item \code{preys.txt} 40 | \item \code{baits.txt} 41 | } 42 | } 43 | \description{ 44 | Converts the MaxQuant evidence file to the 3 required files 45 | by SAINTexpress. One can choose to either use the \verb{spectral counts} 46 | (use \code{msspc}) or the \code{intensities} (use \code{msint}) for the analysis. 47 | } 48 | \examples{ 49 | # Testing that the files cannot be empty 50 | artmsEvidenceToSaintExpress(evidence_file = NULL, 51 | keys_file = NULL, ref_proteome_file = NULL) 52 | } 53 | \keyword{APMS} 54 | \keyword{SAINT,} 55 | \keyword{SAINTexpress,} 56 | -------------------------------------------------------------------------------- /man/artmsAvgIntensityRT.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/avg_intensity_RT.R 3 | \name{artmsAvgIntensityRT} 4 | \alias{artmsAvgIntensityRT} 5 | \title{Summarize average intensity and retention time per protein} 6 | \usage{ 7 | artmsAvgIntensityRT( 8 | evidence_file, 9 | protein_file = NULL, 10 | output_file = FALSE, 11 | verbose = TRUE 12 | ) 13 | } 14 | \arguments{ 15 | \item{evidence_file}{(char) The filepath to the MaxQuant searched data 16 | (evidence) file (txt tab delimited file).} 17 | 18 | \item{protein_file}{(char) The file path to a file or vector containing 19 | a list of proteins of interest.} 20 | 21 | \item{output_file}{(char) The file name for the results 22 | (must have the extension \code{.txt}). If empty, then the 23 | results will be returned as an R object.} 24 | 25 | \item{verbose}{(logical) \code{TRUE} (default) shows function messages} 26 | } 27 | \value{ 28 | An R object with the results and a file with the results (if the 29 | output_file argument is provided). It contains averages of Intensity, 30 | Retention Time, Caliberated Retention Time 31 | } 32 | \description{ 33 | Input an evidence file from MaxQuant and a file 34 | containing a list of proteins of interest (optional). 35 | The function will summarize from the evidence file and report back the 36 | average intensity, average retention time, and the average caliberated 37 | retention time. If a list of proteins is provided, then only those proteins 38 | will be summarized and returned. 39 | } 40 | \examples{ 41 | ave_int <- artmsAvgIntensityRT(evidence_file = artms_data_ph_evidence) 42 | } 43 | \keyword{MaxQuant,} 44 | \keyword{caliberated} 45 | \keyword{evidence,} 46 | \keyword{intensity,} 47 | \keyword{retention} 48 | \keyword{summary,} 49 | \keyword{time,} 50 | -------------------------------------------------------------------------------- /man/artmsGeneratePhSiteExtended.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/analysisQuantifications.R 3 | \name{artmsGeneratePhSiteExtended} 4 | \alias{artmsGeneratePhSiteExtended} 5 | \title{Generate ph-site specific detailed file} 6 | \usage{ 7 | artmsGeneratePhSiteExtended( 8 | df, 9 | pathogen = "nopathogen", 10 | species, 11 | ptmType, 12 | output_name 13 | ) 14 | } 15 | \arguments{ 16 | \item{df}{(data.frame) of log2fc and imputed values} 17 | 18 | \item{pathogen}{(char) Is there a pathogen in the dataset as well? Available 19 | pathogens are \code{tb} (Tuberculosis), \code{lpn} (Legionella). If it is not, 20 | then use \code{nopathogen} (default).} 21 | 22 | \item{species}{(char) Main organism (supported for now: \code{human} or \code{mouse})} 23 | 24 | \item{ptmType}{(char) It must be a ptm-site quantification dataset. Either: 25 | yes: \code{ptmsites} (for site specific analysis), or 26 | \code{ptmph} (Jeff's script output evidence file).} 27 | 28 | \item{output_name}{(char) A output file name (extension \code{.txt} required)} 29 | } 30 | \value{ 31 | (data.frame) extended version of the ph-site 32 | } 33 | \description{ 34 | Generate extended detailed ph-site file, where every line is a 35 | ph site instead of a peptide. Therefore, if one peptide has multiple ph sites 36 | it will be breaking down in each of the sites. This file will help generate 37 | input files for tools as \href{http://phosfate.com/}{Phosfate} or 38 | \href{https://github.com/jdrudolph/photon}{PHOTON} 39 | } 40 | \examples{ 41 | \dontrun{ 42 | artmsGeneratePhSiteExtended(df = dfobject, 43 | species = "mouse", 44 | ptmType = "ptmsites", 45 | output_name = log2fc_file) 46 | } 47 | } 48 | \keyword{external,} 49 | \keyword{phosfate} 50 | \keyword{tools,} 51 | -------------------------------------------------------------------------------- /man/artmsIsSpeciesSupported.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/annotations.R 3 | \name{artmsIsSpeciesSupported} 4 | \alias{artmsIsSpeciesSupported} 5 | \title{Check if a species is supported and available} 6 | \usage{ 7 | artmsIsSpeciesSupported(species, verbose = TRUE) 8 | } 9 | \arguments{ 10 | \item{species}{(char) The species name. Species currently supported 11 | as part of artMS: 12 | \itemize{ 13 | \item HUMAN 14 | \item MOUSE 15 | } 16 | 17 | And the following species can be used as well, but the user needs to 18 | install the corresponding org.db package: 19 | \itemize{ 20 | \item ANOPHELES (\code{install.packages(org.Ag.eg.db)}) 21 | \item BOVINE (\code{install.packages(org.Bt.eg.db)}) 22 | \item WORM (\code{install.packages(org.Ce.eg.db)}) 23 | \item CANINE (\code{install.packages(org.Cf.eg.db)}) 24 | \item FLY (\code{install.packages(org.Dm.eg.db)}) 25 | \item ZEBRAFISH (\code{install.packages(org.Dr.eg.db)}) 26 | \item CHICKEN (\code{install.packages(org.Gg.eg.db)}) 27 | \item RHESUS (\code{install.packages(org.Mmu.eg.db)}) 28 | \item CHIMP (\code{install.packages(org.Pt.eg.db)}) 29 | \item RAT (\code{install.packages(org.Rn.eg.db)}) 30 | \item YEAST (\code{install.packages(org.Sc.sgd.db)}) 31 | \item PIG (\code{install.packages(org.Ss.eg.db)}) 32 | \item XENOPUS (\code{install.packages(org.Xl.eg.db)}) 33 | }} 34 | 35 | \item{verbose}{(logical) \code{TRUE} (default) shows function messages} 36 | } 37 | \value{ 38 | (string) Name of the package for the given species 39 | } 40 | \description{ 41 | Given a species name, it checkes whether is supported, and 42 | if supported, check whether the annotation package is installed. 43 | } 44 | \examples{ 45 | # Should return TRUE 46 | artmsIsSpeciesSupported(species = "HUMAN") 47 | artmsIsSpeciesSupported(species = "CHIMP") 48 | } 49 | \keyword{annotation,} 50 | \keyword{species} 51 | -------------------------------------------------------------------------------- /man/artmsEnrichLog2fc.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/enrichments.R 3 | \name{artmsEnrichLog2fc} 4 | \alias{artmsEnrichLog2fc} 5 | \title{Enrichment of changes in protein abundance or PTMs} 6 | \usage{ 7 | artmsEnrichLog2fc( 8 | dataset, 9 | species, 10 | background, 11 | heatmaps = FALSE, 12 | output_name = "enrichment.txt", 13 | verbose = TRUE 14 | ) 15 | } 16 | \arguments{ 17 | \item{dataset}{(data.frame) with a \code{Gene} and \verb{Comparison or Label} (with 18 | the name of the comparisons specified in the contrast file) columns} 19 | 20 | \item{species}{(char) Specie, only supported "human" or "mouse"} 21 | 22 | \item{background}{(vector) Background genes for the enrichment analysis.} 23 | 24 | \item{heatmaps}{(logical) if \code{TRUE} generates heatmaps (pdf), 25 | \code{FALSE} (default) otherwise.} 26 | 27 | \item{output_name}{(char) Name of the annotation files, which will be used 28 | as well for the heatmaps (if \code{heatmaps} is selected) 29 | Default \code{output_name = "enrichment.txt"}} 30 | 31 | \item{verbose}{(logical) \code{TRUE} (default) shows function messages} 32 | } 33 | \value{ 34 | (data.frame) Results from the enrichment analysis using Gprofiler 35 | and heatmaps (if selected) 36 | } 37 | \description{ 38 | Enrichment analysis of the selected proteins 39 | } 40 | \examples{ 41 | \dontrun{ 42 | # The data must be annotated (Protein and Gene columns) 43 | data_annotated <- artmsAnnotationUniprot( 44 | x = artms_data_ph_msstats_results, 45 | columnid = "Protein", 46 | species = "human") 47 | # And then the enrichment 48 | enrich_set <- artmsEnrichLog2fc( 49 | dataset = data_annotated, 50 | species = "human", 51 | background = unique(data_annotated$Gene)) 52 | } 53 | } 54 | \keyword{enrichment} 55 | -------------------------------------------------------------------------------- /man/artmsResultsWide.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/MSstats_functions.R 3 | \name{artmsResultsWide} 4 | \alias{artmsResultsWide} 5 | \title{Reshape the MSstats results file from long to wide format} 6 | \usage{ 7 | artmsResultsWide( 8 | results_msstats, 9 | output_file = NULL, 10 | select_pvalues = c("adjpvalue", "pvalue"), 11 | species, 12 | verbose = TRUE 13 | ) 14 | } 15 | \arguments{ 16 | \item{results_msstats}{(char) Input file name and location 17 | (MSstats \code{results.txt} file)} 18 | 19 | \item{output_file}{(char) Output file name and location 20 | (e.g. \code{results-wide.txt}). If \code{NULL} (default) returns an 21 | R object (data.frame)} 22 | 23 | \item{select_pvalues}{(char) Either 24 | \itemize{ 25 | \item \code{pvalue} or 26 | \item \code{adjpvalue} (default) 27 | }} 28 | 29 | \item{species}{(char) Specie name for annotation purposes. 30 | Check \code{?artmsMapUniprot2Entrez} to find out more about the 31 | supported species (e.g \code{species = "human"})} 32 | 33 | \item{verbose}{(logical) \code{TRUE} (default) shows function messages} 34 | } 35 | \value{ 36 | (output file tab delimited) reshaped file with unique protein ids 37 | and as many columns log2fc and adj.pvalues as comparisons available 38 | } 39 | \description{ 40 | Converts the normal MSStats results.txt file into "wide" format 41 | where each row represents a unique protein's results, and each column 42 | represents the comparison made by MSStats. The fold change and p-value 43 | of each comparison will be its own column. 44 | } 45 | \examples{ 46 | ph_results_wide <- artmsResultsWide( 47 | results_msstats = artms_data_ph_msstats_results, 48 | output_file = NULL, 49 | species = "human") 50 | } 51 | \keyword{msstats,} 52 | \keyword{reshape} 53 | \keyword{results,} 54 | \keyword{wide,} 55 | -------------------------------------------------------------------------------- /docs/bootstrap-toc.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap Table of Contents v0.4.1 (http://afeld.github.io/bootstrap-toc/) 3 | * Copyright 2015 Aidan Feldman 4 | * Licensed under MIT (https://github.com/afeld/bootstrap-toc/blob/gh-pages/LICENSE.md) */ 5 | 6 | /* modified from https://github.com/twbs/bootstrap/blob/94b4076dd2efba9af71f0b18d4ee4b163aa9e0dd/docs/assets/css/src/docs.css#L548-L601 */ 7 | 8 | /* All levels of nav */ 9 | nav[data-toggle='toc'] .nav > li > a { 10 | display: block; 11 | padding: 4px 20px; 12 | font-size: 13px; 13 | font-weight: 500; 14 | color: #767676; 15 | } 16 | nav[data-toggle='toc'] .nav > li > a:hover, 17 | nav[data-toggle='toc'] .nav > li > a:focus { 18 | padding-left: 19px; 19 | color: #563d7c; 20 | text-decoration: none; 21 | background-color: transparent; 22 | border-left: 1px solid #563d7c; 23 | } 24 | nav[data-toggle='toc'] .nav > .active > a, 25 | nav[data-toggle='toc'] .nav > .active:hover > a, 26 | nav[data-toggle='toc'] .nav > .active:focus > a { 27 | padding-left: 18px; 28 | font-weight: bold; 29 | color: #563d7c; 30 | background-color: transparent; 31 | border-left: 2px solid #563d7c; 32 | } 33 | 34 | /* Nav: second level (shown on .active) */ 35 | nav[data-toggle='toc'] .nav .nav { 36 | display: none; /* Hide by default, but at >768px, show it */ 37 | padding-bottom: 10px; 38 | } 39 | nav[data-toggle='toc'] .nav .nav > li > a { 40 | padding-top: 1px; 41 | padding-bottom: 1px; 42 | padding-left: 30px; 43 | font-size: 12px; 44 | font-weight: normal; 45 | } 46 | nav[data-toggle='toc'] .nav .nav > li > a:hover, 47 | nav[data-toggle='toc'] .nav .nav > li > a:focus { 48 | padding-left: 29px; 49 | } 50 | nav[data-toggle='toc'] .nav .nav > .active > a, 51 | nav[data-toggle='toc'] .nav .nav > .active:hover > a, 52 | nav[data-toggle='toc'] .nav .nav > .active:focus > a { 53 | padding-left: 28px; 54 | font-weight: 500; 55 | } 56 | 57 | /* from https://github.com/twbs/bootstrap/blob/e38f066d8c203c3e032da0ff23cd2d6098ee2dd6/docs/assets/css/src/docs.css#L631-L634 */ 58 | nav[data-toggle='toc'] .nav > .active > ul { 59 | display: block; 60 | } 61 | -------------------------------------------------------------------------------- /man/artmsConvertMetabolomics.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/metabolomics.R 3 | \name{artmsConvertMetabolomics} 4 | \alias{artmsConvertMetabolomics} 5 | \title{Convert Markview Metabolomics file (alignment table) into 6 | a artMS compatible format} 7 | \usage{ 8 | artmsConvertMetabolomics(input_file, out_file, id_file = NULL, verbose = TRUE) 9 | } 10 | \arguments{ 11 | \item{input_file}{(char) Markview input file} 12 | 13 | \item{out_file}{(char) Output file name} 14 | 15 | \item{id_file}{(char) KEGG database} 16 | 17 | \item{verbose}{(logical) \code{TRUE} (default) shows function messages} 18 | } 19 | \value{ 20 | (text file) Outputs the converted output name 21 | } 22 | \description{ 23 | \code{artMS} enables the relative quantification of untargeted 24 | polar metabolites using the alignment table generated by Markview. 25 | MarkerView is an ABSciex software that supports the files 26 | generated by Analyst software (\code{.wiff}) used to run our specific mass 27 | spectrometer (ABSciex Triple TOF 5600+). 28 | It also supports \code{.t2d} files generated by the 29 | Applied Biosystems 4700/4800 MALDI-TOF. 30 | MarkerView software is used to align mass spectrometry data from several 31 | samples for comparison. Using the import feature in the software, \code{.wiff} 32 | files (also \code{.t2d} MALDI-TOF files and tab-delimited \code{.txt} mass spectra data 33 | in mass-intensity format) are loaded for retention time alignment. 34 | Once the data files are selected, a series of windows will appear wherein 35 | peak finding, alignment, and filtering options can be entered and selected. 36 | These options include minimum spectral peak width, minimum retention time 37 | peak width, retention time and mass tolerance, and the ability to filter 38 | out peaks that do not appear in more than a user selected number of samples. 39 | 40 | `artmsConvertMetabolomics`` processes the markview file to enable 41 | QC analysis and relative quantification using the artMS functions 42 | } 43 | \examples{ 44 | # Testing that the arguments cannot be null 45 | artmsConvertMetabolomics(input_file = NULL, 46 | out_file = NULL) 47 | } 48 | \keyword{convert} 49 | \keyword{metabolomics,} 50 | -------------------------------------------------------------------------------- /docs/docsearch.js: -------------------------------------------------------------------------------- 1 | $(function() { 2 | 3 | // register a handler to move the focus to the search bar 4 | // upon pressing shift + "/" (i.e. "?") 5 | $(document).on('keydown', function(e) { 6 | if (e.shiftKey && e.keyCode == 191) { 7 | e.preventDefault(); 8 | $("#search-input").focus(); 9 | } 10 | }); 11 | 12 | $(document).ready(function() { 13 | // do keyword highlighting 14 | /* modified from https://jsfiddle.net/julmot/bL6bb5oo/ */ 15 | var mark = function() { 16 | 17 | var referrer = document.URL ; 18 | var paramKey = "q" ; 19 | 20 | if (referrer.indexOf("?") !== -1) { 21 | var qs = referrer.substr(referrer.indexOf('?') + 1); 22 | var qs_noanchor = qs.split('#')[0]; 23 | var qsa = qs_noanchor.split('&'); 24 | var keyword = ""; 25 | 26 | for (var i = 0; i < qsa.length; i++) { 27 | var currentParam = qsa[i].split('='); 28 | 29 | if (currentParam.length !== 2) { 30 | continue; 31 | } 32 | 33 | if (currentParam[0] == paramKey) { 34 | keyword = decodeURIComponent(currentParam[1].replace(/\+/g, "%20")); 35 | } 36 | } 37 | 38 | if (keyword !== "") { 39 | $(".contents").unmark({ 40 | done: function() { 41 | $(".contents").mark(keyword); 42 | } 43 | }); 44 | } 45 | } 46 | }; 47 | 48 | mark(); 49 | }); 50 | }); 51 | 52 | /* Search term highlighting ------------------------------*/ 53 | 54 | function matchedWords(hit) { 55 | var words = []; 56 | 57 | var hierarchy = hit._highlightResult.hierarchy; 58 | // loop to fetch from lvl0, lvl1, etc. 59 | for (var idx in hierarchy) { 60 | words = words.concat(hierarchy[idx].matchedWords); 61 | } 62 | 63 | var content = hit._highlightResult.content; 64 | if (content) { 65 | words = words.concat(content.matchedWords); 66 | } 67 | 68 | // return unique words 69 | var words_uniq = [...new Set(words)]; 70 | return words_uniq; 71 | } 72 | 73 | function updateHitURL(hit) { 74 | 75 | var words = matchedWords(hit); 76 | var url = ""; 77 | 78 | if (hit.anchor) { 79 | url = hit.url_without_anchor + '?q=' + escape(words.join(" ")) + '#' + hit.anchor; 80 | } else { 81 | url = hit.url + '?q=' + escape(words.join(" ")); 82 | } 83 | 84 | return url; 85 | } 86 | -------------------------------------------------------------------------------- /man/artms_data_ph_config.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/data.R 3 | \docType{data} 4 | \name{artms_data_ph_config} 5 | \alias{artms_data_ph_config} 6 | \title{artMS configuration for the available PH dataset} 7 | \format{ 8 | The configuration (\code{yaml}) file contains the following sections: 9 | \describe{ 10 | \item{files}{ 11 | \itemize{ 12 | \item \code{evidence} : Empty. To test an example, run \code{artms_data_ph_config$files$evidence <- artms_data_ph_evidence} 13 | \item \code{keys} : Empty To test an example datasets run \code{artms_data_ph_config$files$keys <- artms_data_ph_keys} 14 | \item \code{contrasts} : Empty. To test the example datasets, run \code{artms_data_ph_config$files$contrasts <- artms_data_ph_contrast} 15 | \item \code{summary} : 16 | \item \code{output} : "results.txt" 17 | } 18 | } 19 | 20 | \item{qc}{ 21 | \itemize{ 22 | \item basic: 0 23 | \item extended: 0 24 | \item extendedSummary: 0 25 | } 26 | } 27 | 28 | \item{data}{ 29 | \itemize{ 30 | \item enabled : 1 31 | \item silac: 32 | \itemize{ 33 | \item enabled : 0 34 | } 35 | \item filters: 36 | \itemize{ 37 | \item enabled : 1 38 | } 39 | \item contaminants : 1 40 | \item protein_groups : remove 41 | \item modifications : PH 42 | \item sample_plots : 1 43 | } 44 | } 45 | 46 | \item{msstats}{ 47 | \itemize{ 48 | \item enabled : 1 49 | \item msstats_input : # blank if not previous msstats input file is available 50 | \item profilePlots : none # before, after, before-after, none 51 | \item normalization_method : equalizeMedians 52 | \item normalization_reference : #should be a value in the Protein column 53 | \item summaryMethod : TMP 54 | \item censoredInt : NA 55 | \item cutoffCensored : minFeature 56 | \item MBimpute : 1 57 | \item feature_subset: all 58 | } 59 | } 60 | 61 | \item{output_extras}{ 62 | \itemize{ 63 | \item output_extras : 64 | \itemize{ 65 | \item enabled : 1 66 | } 67 | \item annotate : 68 | \itemize{ 69 | \item enabled: 1 70 | } 71 | \item species : HUMAN 72 | \item plots: 73 | \itemize{ 74 | \item volcano: 1 75 | \item heatmap: 1 76 | \item LFC : -1 1 77 | \item FDR : 0.05 78 | \item heatmap_cluster_cols : 0 79 | \item heatmap_display : log2FC} 80 | } 81 | } 82 | } 83 | } 84 | \usage{ 85 | artms_data_ph_config 86 | } 87 | \description{ 88 | The configuration file with default options to run the 89 | available PH dataset with `artmsQuantification()`` 90 | } 91 | \keyword{datasets} 92 | -------------------------------------------------------------------------------- /man/artmsMsstatsSummary.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/msstat_summary.R 3 | \name{artmsMsstatsSummary} 4 | \alias{artmsMsstatsSummary} 5 | \title{Summarize the MSStats results and data quantification} 6 | \usage{ 7 | artmsMsstatsSummary( 8 | evidence_file, 9 | prot_group_file, 10 | keys_file, 11 | results_file, 12 | return_df = FALSE, 13 | verbose = TRUE 14 | ) 15 | } 16 | \arguments{ 17 | \item{evidence_file}{(char or data.frame) The filepath to the MaxQuant 18 | searched data (evidence) file (txt tab delimited file). 19 | Only works for the newer versions of the evidence file.} 20 | 21 | \item{prot_group_file}{(char) The filepath to the MaxQuant 22 | \code{proteinGroups.txt} file (txt tab delimited file) or data.frame} 23 | 24 | \item{keys_file}{(char) The filepath to the keys file used with MSStats 25 | (txt tab delimited file).} 26 | 27 | \item{results_file}{(char) The filepath to the MSStats results file in t 28 | he default long format (txt tab delimited file or data.frame).} 29 | 30 | \item{return_df}{(data.frame) Whether or not to return the results 31 | to the R environment upon completion. This is useful if this is being 32 | used in an R pipeline and you want to feed the results directly into the 33 | next stage of analysis via an R environment/terminal. 34 | Regardless, the results will be written to file. Default = FALSE} 35 | 36 | \item{verbose}{(logical) \code{TRUE} (default) shows function messages} 37 | } 38 | \value{ 39 | (data.frame or txt file) with the summary 40 | } 41 | \description{ 42 | Converts the MSStats results file to wide format 43 | (unique Protein ID and columns are the comparisons), as well as adds 44 | BioReplicate information about 45 | \itemize{ 46 | \item the Number of Unique Peptides, 47 | \item Spectral Counts 48 | \item Intensities 49 | for each protein. 50 | In cases where there are multiple values for a Protein-BioReplicate 51 | pair due to minute changes in sequence, the maximum value is taken for the 52 | pair. Any pairs without a value are assigned a value of NA. 53 | } 54 | } 55 | \examples{ 56 | # Testing warning if files are not submitted 57 | test <- artmsMsstatsSummary(evidence_file = NULL, 58 | prot_group_file = NULL, 59 | keys_file = NULL, 60 | results_file = NULL) 61 | } 62 | \keyword{MSStats,} 63 | \keyword{MaxQuant,} 64 | \keyword{evidence,} 65 | \keyword{summary} 66 | -------------------------------------------------------------------------------- /man/artmsPlotHeatmapQuant.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/plots.R 3 | \name{artmsPlotHeatmapQuant} 4 | \alias{artmsPlotHeatmapQuant} 5 | \title{Outputs a heatmap of the MSStats results created using the log2fold 6 | changes} 7 | \usage{ 8 | artmsPlotHeatmapQuant( 9 | input_file, 10 | output_file = "quantifications_heatmap.pdf", 11 | species, 12 | labels = "*", 13 | cluster_cols = FALSE, 14 | display = "log2FC", 15 | lfc_lower = -2, 16 | lfc_upper = 2, 17 | whatPvalue = "adj.pvalue", 18 | FDR = 0.05, 19 | verbose = TRUE 20 | ) 21 | } 22 | \arguments{ 23 | \item{input_file}{(char) MSstats \code{results.txt} file and location (or 24 | data.frame of resuts)} 25 | 26 | \item{output_file}{(char) Output file name (pdf format) and location. 27 | Default:"quantifications_heatmap.pdf"} 28 | 29 | \item{species}{(char). Specie name to be able to add the Gene name. To find 30 | out more about the supported species check \code{?artmsMapUniprot2Entrez}} 31 | 32 | \item{labels}{(vector) of uniprot ids if only specific labes would like to 33 | be plotted. Default: all labels} 34 | 35 | \item{cluster_cols}{(boolean) \code{True} or \code{False} to cluster columns. 36 | Default: FALSE} 37 | 38 | \item{display}{Metric to be displayed. Options: 39 | \itemize{ 40 | \item \code{log2fc} (default) 41 | \item \code{adj.pvalue} 42 | \item \code{pvalue} 43 | }} 44 | 45 | \item{lfc_lower}{(int) Lower limit for the log2fc. Default: -2} 46 | 47 | \item{lfc_upper}{(int) Upper limit for the log2fc. Default: +2} 48 | 49 | \item{whatPvalue}{(char) \code{pvalue} or \code{adj.pvalue} (default)} 50 | 51 | \item{FDR}{(int) Upper limit false discovery rate (or pvalue). Default: 0.05} 52 | 53 | \item{verbose}{(logical) \code{TRUE} (default) shows function messages} 54 | } 55 | \value{ 56 | (pdf or ggplot2 object) heatmap of the MSStats results using the 57 | selected metric 58 | } 59 | \description{ 60 | Heatmap of the Relative Quantifications (MSStats results) 61 | } 62 | \examples{ 63 | # Unfortunately, the example does not contain any significant hits 64 | # Use for illustration purposes 65 | artmsPlotHeatmapQuant(input_file = artms_data_ph_msstats_results, 66 | species = "human", 67 | output_file = NULL, 68 | whatPvalue = "pvalue", 69 | lfc_lower = -1, 70 | lfc_upper = 1) 71 | } 72 | \keyword{heatmap,} 73 | \keyword{log2fc} 74 | -------------------------------------------------------------------------------- /inst/extdata/artms_config.yaml: -------------------------------------------------------------------------------- 1 | files: 2 | evidence: evidence.txt 3 | keys: keys.txt 4 | contrasts: contrast.txt 5 | summary: summary.txt # Optional 6 | output: results_folder_name/results.txt # The folder must exist 7 | qc: 8 | basic: 1 # 1 = yes; 0 = no 9 | extended: 1 # 1 = yes; 0 = no 10 | extendedSummary: 0 # 1 = yes; 0 = no; Requires the summary file 11 | data: 12 | enabled: 1 # 1 = yes; 0 = no 13 | silac: 14 | enabled: 0 # 1 for SILAC experiments 15 | filters: 16 | enabled: 1 17 | contaminants: 1 18 | protein_groups: remove #remove, keep 19 | modifications: AB # PH, UB, AB, APMS 20 | sample_plots: 1 # correlation plots 21 | msstats: # check ?MSstats::dataProcess() to find out more 22 | enabled: 1 # 1: activate this msstats section. 0: deactivate 23 | msstats_input: # provide a msstats file if available ("-mss.txt"), otherwise, leave it blank 24 | profilePlots: none # Options: before, after, before-after (recommended, but time consuming), none 25 | normalization_method: equalizeMedians # options: equalizeMedians, quantile, 0 (no normalization), globalStandards (if chosen, include a reference protein(s)), 26 | normalization_reference: # if globalStandards is chosen, then an UNIPROT ID must be provided (or several uniprot ids, comma separated) 27 | summaryMethod: TMP # "TMP"(default) means Tukey's median polish, which is robust estimation method. "linear" uses linear mixed model. "logOfSum" conducts log2 (sum of intensities) per run. 28 | MBimpute: 1 29 | censoredInt: NA 30 | feature_subset: all 31 | n_top_feature: 3 32 | logTrans: 2 33 | remove_uninformative_feature_outlier: FALSE 34 | min_feature_count: 2 35 | equalFeatureVar: TRUE 36 | remove50missing: FALSE 37 | fix_missing: 38 | maxQuantileforCensored: 0.999 39 | use_log_file: FALSE 40 | append: FALSE 41 | log_file_path: 42 | output_extras: 43 | enabled: 1 # if 0, it wont do anything in this section 44 | annotate: 45 | enabled: 1 # 1|0 whether to annotate the proteins in the results or not 46 | species: HUMAN # Supported species: HUMAN, MOUSE, ANOPHELES, ARABIDOPSIS, BOVINE, WORM, CANINE, FLY, ZEBRAFISH, ECOLI_STRAIN_K12, ECOLI_STRAIN_SAKAI, CHICKEN, RHESUS, MALARIA, CHIMP, RAT, YEAST, PIG, XENOPUS 47 | plots: 48 | volcano: 1 49 | heatmap: 1 50 | LFC: -0.58 0.58 # Range of minimal log2fc. Default log2fc: 0.58 (a fold change of 1.5) 51 | FDR: 0.05 # adjusted p-value, false discovery rate 52 | heatmap_cluster_cols: 0 53 | heatmap_display: log2FC # log2FC or pvalue 54 | -------------------------------------------------------------------------------- /DESCRIPTION: -------------------------------------------------------------------------------- 1 | Package: artMS 2 | Type: Package 3 | Title: Analytical R tools for Mass Spectrometry 4 | Version: 1.10.3 5 | Date: 2021-07-14 6 | Authors@R: c(person("David", "Jimenez-Morales", role = c("aut","cre"), 7 | email = "biodavidjm@gmail.com", 8 | comment = c(ORCID = "0000-0003-4356-6461")), 9 | person("Alexandre", "Rosa Campos", role = c("aut","ctb"), 10 | comment = c(ORCID = "0000-0003-3988-7764")), 11 | person("John", "Von Dollen", role = c("aut")), 12 | person("Nevan", "Krogan", role = c("aut"), 13 | comment = c(ORCID = "0000-0003-4902-337X")), 14 | person("Danielle", "Swaney", role = c("aut", "ctb"), 15 | comment = c(ORCID = "0000-0001-6119-6084"))) 16 | Description: artMS provides a set of tools for the analysis of proteomics 17 | label-free datasets. It takes as input the MaxQuant search result 18 | output (evidence.txt file) and performs quality control, 19 | relative quantification using MSstats, downstream analysis 20 | and integration. artMS also provides a set of functions to re-format 21 | and make it compatible with other analytical tools, including, SAINTq, 22 | SAINTexpress, Phosfate, and PHOTON. Check 23 | [http://artms.org](http://artms.org) for details. 24 | License: GPL (>= 3) + file LICENSE 25 | URL: http://artms.org 26 | BugReports: https://github.com/biodavidjm/artMS/issues 27 | Depends: R (>= 4.1.0) 28 | Imports: 29 | AnnotationDbi, 30 | bit64, 31 | circlize, 32 | cluster, 33 | corrplot, 34 | data.table, 35 | dplyr, 36 | getopt, 37 | ggdendro, 38 | ggplot2, 39 | gplots, 40 | ggrepel, 41 | graphics, 42 | grDevices, 43 | grid, 44 | limma, 45 | MSstats, 46 | openxlsx, 47 | org.Hs.eg.db, 48 | pheatmap, 49 | plotly, 50 | plyr, 51 | RColorBrewer, 52 | scales, 53 | seqinr, 54 | stats, 55 | stringr, 56 | tidyr, 57 | UpSetR, 58 | utils, 59 | VennDiagram, 60 | yaml 61 | Suggests: 62 | BiocStyle, 63 | ComplexHeatmap, 64 | factoextra, 65 | FactoMineR, 66 | gProfileR, 67 | knitr, 68 | PerformanceAnalytics, 69 | org.Mm.eg.db, 70 | rmarkdown, 71 | testthat 72 | Encoding: UTF-8 73 | LazyLoad: yes 74 | LazyData: true 75 | biocViews: Proteomics, 76 | DifferentialExpression, 77 | BiomedicalInformatics, 78 | SystemsBiology, 79 | MassSpectrometry, 80 | Annotation, 81 | QualityControl, 82 | GeneSetEnrichment, 83 | Clustering, 84 | Normalization, 85 | ImmunoOncology, 86 | MultipleComparison 87 | NeedsCompilation: no 88 | VignetteBuilder: knitr 89 | RoxygenNote: 7.1.1 90 | Roxygen: list(markdown = TRUE) 91 | -------------------------------------------------------------------------------- /man/artmsEvidenceToSAINTq.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/evidenceToSAINTqFormat.R 3 | \name{artmsEvidenceToSAINTq} 4 | \alias{artmsEvidenceToSAINTq} 5 | \title{MaxQuant evidence file to SAINTq format} 6 | \usage{ 7 | artmsEvidenceToSAINTq( 8 | evidence_file, 9 | keys_file, 10 | output_dir = "artms_saintq", 11 | sc_option = c("all", "msspc"), 12 | fractions = FALSE, 13 | quant_variable = c("msint", "msspc"), 14 | verbose = TRUE 15 | ) 16 | } 17 | \arguments{ 18 | \item{evidence_file}{(char or data.frame) The evidence file path and name, 19 | or data.frame} 20 | 21 | \item{keys_file}{(char) Keys file with a SAINT column specifying 22 | test (\code{T}) and control (\code{C}) conditions} 23 | 24 | \item{output_dir}{(char) New directory to create and save files. 25 | Default is current directory (recommended to provide a new folder name).} 26 | 27 | \item{sc_option}{(char). Filter peptides with spectral counts only. 28 | Two options: 29 | \itemize{ 30 | \item \code{msspc}: use only peptides with spectral_counts 31 | \item \code{all} (default): all peptides detected (including the one resulting from 32 | the MaxQuant 'Match between run' algorithm) 33 | }} 34 | 35 | \item{fractions}{(logical) \code{TRUE} for 2D proteomics (fractions). 36 | Default: \code{FALSE}} 37 | 38 | \item{quant_variable}{(char) Select the quantitative variable. 39 | Two options available: 40 | \itemize{ 41 | \item \code{msint}: MS Intensity (default) 42 | \item \code{msspc}: MS.MS.count (Spectral Counts) 43 | }} 44 | 45 | \item{verbose}{(logical) \code{TRUE} (default) shows function messages} 46 | } 47 | \value{ 48 | The input files requires to run SAINTq 49 | } 50 | \description{ 51 | Converts the MaxQuant evidence file to the required files 52 | by SAINTq. The user can choose to use either peptides with \verb{spectral counts} 53 | (use \code{msspc}) or the all the peptides (use \code{all}) for the analysis. 54 | The quantitative can be also chosen (either MS Intensity or Spectral Counts) 55 | } 56 | \details{ 57 | After running the script, the new specified folder should contain 58 | the folling files: 59 | \itemize{ 60 | \item saintq-config-peptides 61 | \item saintq-config-proteins 62 | \item saintq_input_peptides.txt 63 | \item saintq_input_proteins.txt 64 | } 65 | 66 | Then \code{cd} into the new folder and run either of the following two options 67 | (assuming that \code{saintq} is installed in your linux/unix/mac os x system): 68 | 69 | \verb{> saintq config-saintq-peptides} 70 | 71 | or 72 | 73 | \verb{> saintq config-saintq-proteins} 74 | } 75 | \examples{ 76 | # Testing that the files cannot be empty 77 | artmsEvidenceToSAINTq (evidence_file = NULL, 78 | keys_file = NULL, 79 | output_dir = NULL) 80 | } 81 | \keyword{APMS} 82 | \keyword{SAINT,} 83 | \keyword{SAINTq,} 84 | -------------------------------------------------------------------------------- /man/artmsQuantification.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/main.R 3 | \name{artmsQuantification} 4 | \alias{artmsQuantification} 5 | \title{Relative quantification using MSstats} 6 | \usage{ 7 | artmsQuantification( 8 | yaml_config_file, 9 | data_object = FALSE, 10 | printPDF = TRUE, 11 | printTables = TRUE, 12 | display_msstats = FALSE, 13 | return_results_object = FALSE, 14 | verbose = TRUE 15 | ) 16 | } 17 | \arguments{ 18 | \item{yaml_config_file}{(char, required) The yaml file name and location} 19 | 20 | \item{data_object}{(logical) flag to indicate whether the configuration file 21 | is a string to a file that should be opened or config object (yaml). 22 | Default is \code{FALSE}. Choose \code{TRUE} if \code{yaml_config_file} is a yaml object} 23 | 24 | \item{printPDF}{(logical) if \code{TRUE} (default), prints out pdf} 25 | 26 | \item{printTables}{(logical) \code{TRUE} (default) print results tables} 27 | 28 | \item{display_msstats}{(logical) if \code{TRUE}, prints MSstats outputs (default is \code{FALSE})} 29 | 30 | \item{return_results_object}{(logical) Default is \code{FALSE}. 31 | If \code{TRUE}, it returns a list of data frames with MSstats results, including: 32 | \itemize{ 33 | \item \code{comparisonResult}: comparison results 34 | \item \code{ModelQC} 35 | \item \code{FittedModel}: fit model details 36 | \item \code{power}: power calculations 37 | \item \code{sample_size}: sample size estimations 38 | }} 39 | 40 | \item{verbose}{(logical) \code{TRUE} (default) shows function messages} 41 | } 42 | \value{ 43 | The relative quantification of the conditions and comparisons 44 | specified in the keys/contrast file resulting from running MSstats, in 45 | addition to quality control plots (if selected) 46 | } 47 | \description{ 48 | Relative quantification using MSstats including: 49 | \itemize{ 50 | \item plots 51 | \item quantifications (log2fc, pvalues, etc) 52 | \item normalized abundance values 53 | } 54 | } 55 | \examples{ 56 | # Recommended 57 | # artmsQuantification(yaml_config_file = "your-config-file.yaml") 58 | 59 | # Example to test this function using the example dataset available in artMS 60 | # Step 1: Add evidence, keys, and contrast to configuration object 61 | artms_data_ph_config$files$evidence <- artms_data_ph_evidence 62 | artms_data_ph_config$files$keys <- artms_data_ph_keys 63 | artms_data_ph_config$files$contrasts <- artms_data_ph_contrast 64 | 65 | # Step 2: Run the quantification step 66 | quant_results <- artmsQuantification(yaml_config_file = artms_data_ph_config, 67 | data_object = TRUE, 68 | display_msstats = FALSE, 69 | printPDF = FALSE, 70 | printTables = FALSE) 71 | # Check the list of data frames "quant_results". Nothing should be printed out. 72 | } 73 | \keyword{driver,} 74 | \keyword{function} 75 | \keyword{main,} 76 | -------------------------------------------------------------------------------- /man/artmsQualityControlMetabolomics.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/qualityControlMetabolomics.R 3 | \name{artmsQualityControlMetabolomics} 4 | \alias{artmsQualityControlMetabolomics} 5 | \title{Quality Control analysis of the evidence-like metabolomics dataset} 6 | \usage{ 7 | artmsQualityControlMetabolomics( 8 | evidence_file, 9 | keys_file, 10 | met_exp = c("MV"), 11 | output_name = "qcPlots_metab", 12 | plotINTDIST = FALSE, 13 | plotCORMAT = TRUE, 14 | plotINTMISC = TRUE, 15 | printPDF = TRUE, 16 | verbose = TRUE 17 | ) 18 | } 19 | \arguments{ 20 | \item{evidence_file}{(char or data.frame) The evidence file path and name, or 21 | data.frame} 22 | 23 | \item{keys_file}{(char or data.frame) The keys file path and name or 24 | data.frame} 25 | 26 | \item{met_exp}{(char) Metabolomics experiment. Only one option available 27 | (so far): 28 | \itemize{ 29 | \item \code{MV}: Markview output 30 | }} 31 | 32 | \item{output_name}{(char) prefix output name (no extension). 33 | Default: "qcPlots_metab"} 34 | 35 | \item{plotINTDIST}{if \code{TRUE} (default) plots both \emph{Box-dot plot} 36 | and \emph{Jitter plot} of biological replicates based on MS (raw) 37 | intensity values.} 38 | 39 | \item{plotCORMAT}{if \code{TRUE} (default) generates up to 3 pdf files for 40 | technical replicates, biological replicates, and conditions. Each pdf file 41 | contains: 42 | \itemize{ 43 | \item \emph{Correlation matrix} for all the biological replicates using 44 | MS Intensity values, 45 | \item \emph{Clustering matrix} of the MS Intensities and correlation distribution 46 | \item \emph{histogram} of the distribution of correlations 47 | }} 48 | 49 | \item{plotINTMISC}{if \code{TRUE} (default) plots several pages, including 50 | bar plots of \emph{Total Sum of Intensities in BioReplicates}, 51 | \emph{Total Sum of Intensities in Conditions}, 52 | \emph{Total Feature Counts in BioReplicates}, 53 | \emph{Total Feature Counts in conditions} separated by categories 54 | (INT: has a intensity value NOINT: no intensity value ) 55 | \emph{Box plots} of MS Intensity values per 56 | biological replicates and conditions; \emph{bar plots} of total intensity 57 | by bioreplicates and conditions; Barplots of 58 | \emph{total feature counts} by bioreplicates and conditions.} 59 | 60 | \item{printPDF}{If \code{TRUE} (default) prints out the pdfs. Warning: plot 61 | objects are not returned due to the large number of them.} 62 | 63 | \item{verbose}{(logical) \code{TRUE} (default) shows function messages} 64 | } 65 | \value{ 66 | Quality control files and plots for metabolomics 67 | } 68 | \description{ 69 | Quality Control analysis of the evidence-like metabolomics 70 | dataset 71 | } 72 | \examples{ 73 | # Testing that input arguments cannot be null 74 | artmsQualityControlMetabolomics(evidence_file = NULL, 75 | keys_file = NULL, 76 | met_exp = "MV") 77 | } 78 | \keyword{QC,} 79 | \keyword{control,} 80 | \keyword{evidence,} 81 | \keyword{metabolomics} 82 | \keyword{quality,} 83 | -------------------------------------------------------------------------------- /man/artmsQualityControlSummaryExtended.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/qualityControlSummaryExtended.R 3 | \name{artmsQualityControlSummaryExtended} 4 | \alias{artmsQualityControlSummaryExtended} 5 | \title{Quality Control of the MaxQuant summary.txt file} 6 | \usage{ 7 | artmsQualityControlSummaryExtended( 8 | summary_file, 9 | keys_file, 10 | output_dir = "qc_summary", 11 | output_name = "qcExtended_summary", 12 | isFractions = FALSE, 13 | plotMS1SCANS = TRUE, 14 | plotMS2 = TRUE, 15 | plotMSMS = TRUE, 16 | plotISOTOPE = TRUE, 17 | printPDF = TRUE, 18 | verbose = TRUE 19 | ) 20 | } 21 | \arguments{ 22 | \item{summary_file}{(char or data.frame) The evidence file path and name, or 23 | data.frame} 24 | 25 | \item{keys_file}{(char or data.frame) The keys file path and name or 26 | data.frame} 27 | 28 | \item{output_dir}{(char) Name for the folder to output the results plots. 29 | Default is "qc_summary".} 30 | 31 | \item{output_name}{(char) prefix output name (no extension). 32 | Default: "qcExtended_summary"} 33 | 34 | \item{isFractions}{(logical) \code{TRUE} if it is a 2D experiment (fractions). 35 | Default: \code{FALSE}} 36 | 37 | \item{plotMS1SCANS}{(logical) \code{TRUE} generates MS1 scan counts plot: 38 | Page 1 shows the number of MS1 scans in each BioReplicate. 39 | If replicates are present, Page 2 shows the mean number of MS1 scans 40 | per condition with error bar showing the standard error of the mean. 41 | If isFractions \code{TRUE}, each fraction is a stack on the individual bar graphs.} 42 | 43 | \item{plotMS2}{(logical) \code{TRUE} generates MS2 scan counts plot: 44 | Page 1 shows the number of MSs scans in each BioReplicate. 45 | If replicates are present, Page 2 shows the mean number of MS1 scans per 46 | condition with error bar showing the standard error of the mean. 47 | If isFractions \code{TRUE}, each fraction is a stack on the individual bar graphs.} 48 | 49 | \item{plotMSMS}{(logical) \code{TRUE} generates MS2 identification rate (\%) plot: 50 | Page 1 shows the fraction of MS2 scans confidently identified in each 51 | BioReplicate. If replicates are present, Page 2 shows the mean rate of MS2 52 | scans confidently identified per condition with error bar showing the 53 | standard error of the mean. 54 | If isFractions \code{TRUE}, each fraction is a stack on the individual bar graphs.} 55 | 56 | \item{plotISOTOPE}{(logical) \code{TRUE} generates Isotope Pattern counts plot: 57 | Page 1 shows the number of Isotope Patterns with charge greater than 1 in 58 | each BioReplicate. If replicates are present, Page 2 shows the mean number 59 | of Isotope Patterns with charge greater than 1 per condition with error bar 60 | showing the standard error of the mean. 61 | If isFractions \code{TRUE}, each fraction is a stack on the individual bar graphs.} 62 | 63 | \item{printPDF}{If \code{TRUE} (default) prints out the pdfs. Warning: plot 64 | objects are not returned due to the large number of them.} 65 | 66 | \item{verbose}{(logical) \code{TRUE} (default) shows function messages} 67 | } 68 | \value{ 69 | A number of plots from the summary file 70 | } 71 | \description{ 72 | Performs quality control based on the information available in 73 | the MaxQuant summary.txt file. 74 | } 75 | \examples{ 76 | # Testing warning if files are not submitted 77 | test <- artmsQualityControlSummaryExtended(summary_file = NULL, 78 | keys_file = NULL) 79 | } 80 | \keyword{keys} 81 | \keyword{qc,} 82 | \keyword{summary,} 83 | -------------------------------------------------------------------------------- /NAMESPACE: -------------------------------------------------------------------------------- 1 | # Generated by roxygen2: do not edit by hand 2 | 3 | export(artmsAnalysisQuantifications) 4 | export(artmsAnnotateSpecie) 5 | export(artmsAnnotationUniprot) 6 | export(artmsAvgIntensityRT) 7 | export(artmsChangeColumnName) 8 | export(artmsConvertMetabolomics) 9 | export(artmsDataPlots) 10 | export(artmsEnrichLog2fc) 11 | export(artmsEnrichProfiler) 12 | export(artmsEvidenceToSAINTq) 13 | export(artmsEvidenceToSaintExpress) 14 | export(artmsFilterEvidenceContaminants) 15 | export(artmsGeneratePhSiteExtended) 16 | export(artmsIsEvidenceNewVersion) 17 | export(artmsIsSpeciesSupported) 18 | export(artmsLeaveOnlyUniprotEntryID) 19 | export(artmsMapUniprot2Entrez) 20 | export(artmsMergeEvidenceAndKeys) 21 | export(artmsMsstatsSummary) 22 | export(artmsPhosfateOutput) 23 | export(artmsPhotonOutput) 24 | export(artmsPlotHeatmapQuant) 25 | export(artmsProtein2SiteConversion) 26 | export(artmsQualityControlEvidenceBasic) 27 | export(artmsQualityControlEvidenceExtended) 28 | export(artmsQualityControlMetabolomics) 29 | export(artmsQualityControlSummaryExtended) 30 | export(artmsQuantification) 31 | export(artmsResultsWide) 32 | export(artmsSILACtoLong) 33 | export(artmsSpectralCounts) 34 | export(artmsVolcanoPlot) 35 | export(artmsWriteConfigYamlFile) 36 | import(AnnotationDbi, except = c(head)) 37 | import(MSstats) 38 | import(RColorBrewer) 39 | import(UpSetR) 40 | import(VennDiagram) 41 | import(bit64) 42 | import(circlize) 43 | import(data.table) 44 | import(getopt) 45 | import(ggdendro) 46 | import(ggplot2) 47 | import(ggrepel) 48 | import(grid) 49 | import(limma) 50 | import(openxlsx) 51 | import(org.Hs.eg.db) 52 | import(pheatmap) 53 | import(plotly, except = c(last_plot, mutate, arrange, 54 | rename, summarise, select, add_heatmap)) 55 | import(seqinr, except = c(zscore, count, a)) 56 | import(stringr) 57 | import(yaml) 58 | importFrom(cluster,pam) 59 | importFrom(corrplot,corrplot) 60 | importFrom(dplyr,arrange) 61 | importFrom(dplyr,count) 62 | importFrom(dplyr,desc) 63 | importFrom(dplyr,everything) 64 | importFrom(dplyr,mutate) 65 | importFrom(dplyr,one_of) 66 | importFrom(gplots,heatmap.2) 67 | importFrom(grDevices,colorRampPalette) 68 | importFrom(grDevices,dev.off) 69 | importFrom(grDevices,pdf) 70 | importFrom(graphics,barplot) 71 | importFrom(graphics,hist) 72 | importFrom(graphics,lines) 73 | importFrom(graphics,pairs) 74 | importFrom(graphics,panel.smooth) 75 | importFrom(graphics,par) 76 | importFrom(graphics,plot) 77 | importFrom(graphics,rect) 78 | importFrom(graphics,strwidth) 79 | importFrom(graphics,text) 80 | importFrom(plyr,ddply) 81 | importFrom(plyr,rename) 82 | importFrom(plyr,summarise) 83 | importFrom(scales,percent) 84 | importFrom(stats,IQR) 85 | importFrom(stats,aggregate) 86 | importFrom(stats,as.dendrogram) 87 | importFrom(stats,as.dist) 88 | importFrom(stats,complete.cases) 89 | importFrom(stats,cor) 90 | importFrom(stats,dist) 91 | importFrom(stats,fisher.test) 92 | importFrom(stats,hclust) 93 | importFrom(stats,kmeans) 94 | importFrom(stats,median) 95 | importFrom(stats,order.dendrogram) 96 | importFrom(stats,phyper) 97 | importFrom(stats,prcomp) 98 | importFrom(stats,qt) 99 | importFrom(stats,quantile) 100 | importFrom(stats,sd) 101 | importFrom(tidyr,pivot_longer) 102 | importFrom(tidyr,pivot_wider) 103 | importFrom(tidyr,unnest) 104 | importFrom(utils,capture.output) 105 | importFrom(utils,combn) 106 | importFrom(utils,globalVariables) 107 | importFrom(utils,head) 108 | importFrom(utils,read.delim) 109 | importFrom(utils,sessionInfo) 110 | importFrom(utils,setTxtProgressBar) 111 | importFrom(utils,txtProgressBar) 112 | importFrom(utils,write.table) 113 | -------------------------------------------------------------------------------- /man/artms_config.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/data.R 3 | \docType{data} 4 | \name{artms_config} 5 | \alias{artms_config} 6 | \title{artMS configuration template} 7 | \format{ 8 | The configuration (\code{yaml}) file contains the following sections: 9 | \describe{ 10 | \item{files}{ 11 | \itemize{ 12 | \item \code{evidence} : /path/to/the/evidence.txt 13 | \item \code{keys} : /path/to/the/keys.txt 14 | \item \code{contrasts} : /path/to/the/contrast.txt 15 | \item \code{summary} : /path/to/the/summary.txt 16 | \item \code{output} : /path/to/the/output/results/results.txt} 17 | } 18 | 19 | \item{qc}{ 20 | \itemize{ 21 | \item basic: 1 # 1 = yes; 0 = no 22 | \item extended: 1 # 1 = yes; 0 = no 23 | \item extendedSummary: 0 # 1 = yes; 0 = no 24 | } 25 | } 26 | 27 | \item{data}{ 28 | \itemize{ 29 | \item enabled : 1 # 1 = yes; 0 = no 30 | \item silac: 31 | \itemize{ 32 | \item enabled : 0 # 1 for SILAC experiments 33 | } 34 | \item filters: 35 | \itemize{ 36 | \item enabled : 1 37 | } 38 | \item contaminants : 1 39 | \item protein_groups : remove #remove, keep 40 | \item modifications : ab # PH, UB, AB, APMS 41 | \item sample_plots : 1 # correlation plots } 42 | } 43 | 44 | \item{msstats}{ 45 | \itemize{ 46 | \item enabled : 1 47 | \item msstats_input : # blank if not previous msstats input file is available 48 | \item profilePlots : none # before, after, before-after, none 49 | \item normalization_method : equalizeMedians # globalStandards 50 | (include a reference protein(s) ), equalizeMedians, quantile, 0 51 | \item normalization_reference : #should be a value in the Protein column 52 | \item summaryMethod : TMP # "TMP"(default) means Tukey's median polish, 53 | which is robust estimation method. "linear" uses linear mixed model. 54 | "logOfSum" conducts log2 (sum of intensities) per run. 55 | \item censoredInt : NA # Missing values are censored or at random. 'NA' 56 | (default) assumes that all 'NA's in 'Intensity' column are censored. 57 | '0' uses zero intensities as censored intensity. In this case, 58 | NA intensities are missing at random. The output from Skyline 59 | should use '0'. Null assumes that all NA intensites are randomly missing. 60 | \item MBimpute : 1 # only for summaryMethod="TMP" and censoredInt='NA' or '0'. 61 | TRUE (default) imputes 'NA' or '0' (depending on censoredInt option) by 62 | Accelated failure model. FALSE uses the values assigned by cutoffCensored 63 | \item For all othe features, please check documentation for MSstats' dataProcess function 64 | } 65 | } 66 | 67 | \item{output_extras}{ 68 | \itemize{ 69 | \item output_extras : 70 | \itemize{ 71 | \item enabled : 1 # if 0, it wont do anything in this section 72 | } 73 | \item annotate : 74 | \itemize{ 75 | \item enabled: 1 # 1|0 whether to annotate the proteins in the results or not 76 | } 77 | \item species : HUMAN # Supported species: HUMAN, MOUSE, ANOPHELES, ARABIDOPSIS, 78 | BOVINE, WORM, CANINE, FLY, ZEBRAFISH, ECOLI_STRAIN_K12, ECOLI_STRAIN_SAKAI, 79 | CHICKEN, RHESUS, MALARIA, CHIMP, RAT, YEAST, PIG, XENOPUS 80 | \item plots: 81 | \itemize{ 82 | \item volcano: 1 83 | \item heatmap: 1 84 | \item LFC : -1.5 1.5 # Range of minimal log2fc 85 | \item FDR : 0.05 86 | \item heatmap_cluster_cols : 0 87 | \item heatmap_display : log2FC # log2FC or pvalue} 88 | } 89 | } 90 | } 91 | } 92 | \usage{ 93 | artms_config 94 | } 95 | \description{ 96 | The configuration file in \code{yaml} format contains 97 | the configuration details required to run \code{artmsQuantification()}, which 98 | includes quality control functions 99 | } 100 | \keyword{datasets} 101 | -------------------------------------------------------------------------------- /docs/pkgdown.js: -------------------------------------------------------------------------------- 1 | /* http://gregfranko.com/blog/jquery-best-practices/ */ 2 | (function($) { 3 | $(function() { 4 | 5 | $('.navbar-fixed-top').headroom(); 6 | 7 | $('body').css('padding-top', $('.navbar').height() + 10); 8 | $(window).resize(function(){ 9 | $('body').css('padding-top', $('.navbar').height() + 10); 10 | }); 11 | 12 | $('[data-toggle="tooltip"]').tooltip(); 13 | 14 | var cur_path = paths(location.pathname); 15 | var links = $("#navbar ul li a"); 16 | var max_length = -1; 17 | var pos = -1; 18 | for (var i = 0; i < links.length; i++) { 19 | if (links[i].getAttribute("href") === "#") 20 | continue; 21 | // Ignore external links 22 | if (links[i].host !== location.host) 23 | continue; 24 | 25 | var nav_path = paths(links[i].pathname); 26 | 27 | var length = prefix_length(nav_path, cur_path); 28 | if (length > max_length) { 29 | max_length = length; 30 | pos = i; 31 | } 32 | } 33 | 34 | // Add class to parent
  • , and enclosing
  • if in dropdown 35 | if (pos >= 0) { 36 | var menu_anchor = $(links[pos]); 37 | menu_anchor.parent().addClass("active"); 38 | menu_anchor.closest("li.dropdown").addClass("active"); 39 | } 40 | }); 41 | 42 | function paths(pathname) { 43 | var pieces = pathname.split("/"); 44 | pieces.shift(); // always starts with / 45 | 46 | var end = pieces[pieces.length - 1]; 47 | if (end === "index.html" || end === "") 48 | pieces.pop(); 49 | return(pieces); 50 | } 51 | 52 | // Returns -1 if not found 53 | function prefix_length(needle, haystack) { 54 | if (needle.length > haystack.length) 55 | return(-1); 56 | 57 | // Special case for length-0 haystack, since for loop won't run 58 | if (haystack.length === 0) { 59 | return(needle.length === 0 ? 0 : -1); 60 | } 61 | 62 | for (var i = 0; i < haystack.length; i++) { 63 | if (needle[i] != haystack[i]) 64 | return(i); 65 | } 66 | 67 | return(haystack.length); 68 | } 69 | 70 | /* Clipboard --------------------------*/ 71 | 72 | function changeTooltipMessage(element, msg) { 73 | var tooltipOriginalTitle=element.getAttribute('data-original-title'); 74 | element.setAttribute('data-original-title', msg); 75 | $(element).tooltip('show'); 76 | element.setAttribute('data-original-title', tooltipOriginalTitle); 77 | } 78 | 79 | if(ClipboardJS.isSupported()) { 80 | $(document).ready(function() { 81 | var copyButton = ""; 82 | 83 | $(".examples, div.sourceCode").addClass("hasCopyButton"); 84 | 85 | // Insert copy buttons: 86 | $(copyButton).prependTo(".hasCopyButton"); 87 | 88 | // Initialize tooltips: 89 | $('.btn-copy-ex').tooltip({container: 'body'}); 90 | 91 | // Initialize clipboard: 92 | var clipboardBtnCopies = new ClipboardJS('[data-clipboard-copy]', { 93 | text: function(trigger) { 94 | return trigger.parentNode.textContent; 95 | } 96 | }); 97 | 98 | clipboardBtnCopies.on('success', function(e) { 99 | changeTooltipMessage(e.trigger, 'Copied!'); 100 | e.clearSelection(); 101 | }); 102 | 103 | clipboardBtnCopies.on('error', function() { 104 | changeTooltipMessage(e.trigger,'Press Ctrl+C or Command+C to copy'); 105 | }); 106 | }); 107 | } 108 | })(window.jQuery || window.$) 109 | -------------------------------------------------------------------------------- /R/metabolomics.R: -------------------------------------------------------------------------------- 1 | #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2 | #' @title Convert Markview Metabolomics file (alignment table) into 3 | #' a artMS compatible format 4 | #' 5 | #' @description `artMS` enables the relative quantification of untargeted 6 | #' polar metabolites using the alignment table generated by Markview. 7 | 8 | #' MarkerView is an ABSciex software that supports the files 9 | #' generated by Analyst software (`.wiff`) used to run our specific mass 10 | #' spectrometer (ABSciex Triple TOF 5600+). 11 | #' It also supports `.t2d` files generated by the 12 | #' Applied Biosystems 4700/4800 MALDI-TOF. 13 | 14 | #' MarkerView software is used to align mass spectrometry data from several 15 | #' samples for comparison. Using the import feature in the software, `.wiff` 16 | #' files (also `.t2d` MALDI-TOF files and tab-delimited `.txt` mass spectra data 17 | #' in mass-intensity format) are loaded for retention time alignment. 18 | #' Once the data files are selected, a series of windows will appear wherein 19 | #' peak finding, alignment, and filtering options can be entered and selected. 20 | #' These options include minimum spectral peak width, minimum retention time 21 | #' peak width, retention time and mass tolerance, and the ability to filter 22 | #' out peaks that do not appear in more than a user selected number of samples. 23 | #' 24 | #' `artmsConvertMetabolomics`` processes the markview file to enable 25 | #' QC analysis and relative quantification using the artMS functions 26 | #' 27 | #' @param input_file (char) Markview input file 28 | #' @param out_file (char) Output file name 29 | #' @param id_file (char) KEGG database 30 | #' @param verbose (logical) `TRUE` (default) shows function messages 31 | #' @return (text file) Outputs the converted output name 32 | #' @keywords metabolomics, convert 33 | #' @examples 34 | #' # Testing that the arguments cannot be null 35 | #' artmsConvertMetabolomics(input_file = NULL, 36 | #' out_file = NULL) 37 | #' @export 38 | artmsConvertMetabolomics <- function(input_file, 39 | out_file, 40 | id_file = NULL, 41 | verbose = TRUE){ 42 | 43 | if(missing(input_file)) 44 | stop("Input file name is missed") 45 | if(missing(out_file)) 46 | stop(" is missed") 47 | 48 | if(is.null(input_file) & is.null(out_file)){ 49 | return("Both and are required") 50 | } 51 | 52 | if(verbose) message(">> Reading in data from: ", input_file," ") 53 | 54 | x <- fread(input_file) 55 | tmp <- data.table::melt(data=x, id=c(seq_len(7)), 56 | variable.name="RawFile", 57 | value.name="Intensity") 58 | 59 | tmp[,'Row'] = NULL 60 | tmp[,'Index'] = NULL 61 | setnames(tmp, c(1,3), c('Modified.sequence', 'Retention time')) 62 | tmp$Modified.sequence <- gsub(' \\([0-9]+\\)', '', tmp$Modified.sequence) 63 | tmp$Proteins <- tmp$Modified.sequence 64 | tmp$Charge <- 1 65 | 66 | tmp <- as.data.frame(tmp, stringsAsFactors = FALSE) 67 | 68 | # annotate with known id's 69 | if(!is.null(id_file)){ 70 | ids <- read.delim(id_file, stringsAsFactors = FALSE, sep='\t') 71 | ids$KEGG <- gsub('\\\xca','',ids$KEGG) 72 | #### This could be optimized!!!!! 73 | for( i in seq_len(length(ids$KEGG)) ){ 74 | idx <- tmp$'m/z' %in% ids$m.z[i] 75 | tmp$Proteins[idx] = ids$KEGG[i] 76 | } 77 | } 78 | 79 | if(verbose) message(">> Writing out data to:", out_file, "... ") 80 | write.table(as.data.frame(tmp, stringsAsFactors = FALSE), 81 | out_file, 82 | row.names = FALSE, 83 | col.names = TRUE, 84 | sep ='\t', 85 | quote = FALSE) 86 | if(verbose) message('>> CONVERSION COMPLETE! ') 87 | } 88 | 89 | 90 | -------------------------------------------------------------------------------- /man/artmsEnrichProfiler.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/enrichments.R 3 | \name{artmsEnrichProfiler} 4 | \alias{artmsEnrichProfiler} 5 | \title{Enrichment analysis using GprofileR} 6 | \usage{ 7 | artmsEnrichProfiler( 8 | x, 9 | categorySource = c("GO"), 10 | species, 11 | background = NA, 12 | verbose = TRUE 13 | ) 14 | } 15 | \arguments{ 16 | \item{x}{(list, data.frame) List of protein ids. It can be anything: 17 | either a list of ids, or you could also send a data.frame and it will find 18 | the columns with the IDs. Is not cool? Multiple list can be also sent 19 | simultaneously, as for example running: 20 | \code{tmp <- split(enrichment$Gene, enrichment$cl_number, drop= TRUE)}} 21 | 22 | \item{categorySource}{(vector) Resources providing the terms on which 23 | the enrichment will be performed. The supported resources by gprofiler are: 24 | \itemize{ 25 | \item GO (GO:BP, GO:MF, GO:CC): Gene Ontology (see more below) 26 | \item KEGG: Biological pathways 27 | \item REAC: Biological pathways (Reactome) 28 | \item TF: Regulatory motifs in DNA (TRANSFAC TFBS) 29 | \item MI: Regulatory motifs in DNA (miRBase microRNAs) 30 | \item CORUM: protein complexes database 31 | \item HP: Human Phenotype Ontology 32 | \item HPA: Protein databases (Human Protein Atlas) 33 | \item OMIM: Online Mendelian Inheritance in Man annotations: 34 | \item BIOGRID: BioGRID protein-protein interactions 35 | The type of annotations for Gene Ontology: 36 | \item Inferred from experiment (IDA, IPI, IMP, IGI, IEP) 37 | \item Direct assay (IDA) / Mutant phenotype (IMP] 38 | \item Genetic interaction (IGI) / Physical interaction (IPI) 39 | \item Traceable author (TAS) / Non-traceable author (NAS) / 40 | Inferred by curator (IC) 41 | \item Expression pattern (IEP) / Sequence or structural similarity (ISS) 42 | / Genomic context (IGC) 43 | \item Biological aspect of ancestor (IBA) / Rapid divergence (IRD) 44 | \item Reviewed computational analysis (RCA) / Electronic annotation (IEA) 45 | \item No biological data (ND) / Not annotated or not in background (NA) 46 | }} 47 | 48 | \item{species}{(char) Specie code: Organism names are constructed by 49 | concatenating the first letter of the name and the family name. 50 | Example: human - ’hsapiens’, mouse - ’mmusculus’. Check gProfileR to find out 51 | more about supported species.} 52 | 53 | \item{background}{(vector) gene list to use as background for the enrichment 54 | analysis. Default: \code{NA}} 55 | 56 | \item{verbose}{(logical) \code{TRUE} (default) shows function messages} 57 | } 58 | \value{ 59 | The enrichment results as provided by gprofiler 60 | } 61 | \description{ 62 | This function simplifies the enrichment analysis performed by 63 | the excellent tool GprofileR. 64 | } 65 | \details{ 66 | This function uses the following \code{gprofiler} arguments as default: 67 | \itemize{ 68 | \item ordered_query = FALSE 69 | \item significant = TRUE 70 | \item exclude_iea = TRUE 71 | \item underrep = FALSE 72 | \item evcodes = FALSE 73 | \item region_query = FALSE 74 | \item max_p_value = 0.05 75 | \item min_set_size = 0 76 | \item max_set_size = 0 77 | \item min_isect_size = 0 78 | \item correction_method = "analytical" #Options: "gSCS", "fdr", "bonferroni" 79 | \item hier_filtering = "none" 80 | \item domain_size = "known" # annotated or known 81 | \item numeric_ns = "" 82 | \item png_fn = NULL 83 | \item include_graph = TRUE 84 | } 85 | } 86 | \examples{ 87 | \dontrun{ 88 | # annotate the MSstats results to get the Gene name 89 | data_annotated <- artmsAnnotationUniprot( 90 | x = artms_data_ph_msstats_results, 91 | columnid = "Protein", 92 | species = "human") 93 | 94 | # Filter the list of genes with a log2fc > 2 95 | filtered_data <- 96 | unique(data_annotated$Gene[which(data_annotated$log2FC > 2)]) 97 | 98 | # And perform enrichment analysis 99 | data_annotated_enrich <- artmsEnrichProfiler( 100 | x = filtered_data, 101 | categorySource = c('KEGG'), 102 | species = "hsapiens", 103 | background = unique(data_annotated$Gene)) 104 | } 105 | } 106 | \keyword{enrichment} 107 | -------------------------------------------------------------------------------- /R/avg_intensity_RT.R: -------------------------------------------------------------------------------- 1 | # ============================================================================== 2 | #' @title Summarize average intensity and retention time per protein 3 | #' 4 | #' @description Input an evidence file from MaxQuant and a file 5 | #' containing a list of proteins of interest (optional). 6 | #' The function will summarize from the evidence file and report back the 7 | #' average intensity, average retention time, and the average caliberated 8 | #' retention time. If a list of proteins is provided, then only those proteins 9 | #' will be summarized and returned. 10 | #' @param evidence_file (char) The filepath to the MaxQuant searched data 11 | #' (evidence) file (txt tab delimited file). 12 | #' @param protein_file (char) The file path to a file or vector containing 13 | #' a list of proteins of interest. 14 | #' @param output_file (char) The file name for the results 15 | #' (must have the extension `.txt`). If empty, then the 16 | #' results will be returned as an R object. 17 | #' @param verbose (logical) `TRUE` (default) shows function messages 18 | #' @return An R object with the results and a file with the results (if the 19 | #' output_file argument is provided). It contains averages of Intensity, 20 | #' Retention Time, Caliberated Retention Time 21 | #' @keywords MaxQuant, evidence, summary, intensity, retention time, caliberated 22 | #' @examples 23 | #' ave_int <- artmsAvgIntensityRT(evidence_file = artms_data_ph_evidence) 24 | #' @export 25 | artmsAvgIntensityRT <- function(evidence_file, 26 | protein_file = NULL, 27 | output_file = FALSE, 28 | verbose = TRUE) { 29 | 30 | 31 | if(any(missing(evidence_file))) 32 | stop("Missed evidence_file required argument. 33 | Please, check the help of this function to find out more") 34 | 35 | # read in data 36 | if(verbose) message(">> READING IN FILES... ") 37 | dat <- .artms_checkIfFile(evidence_file, is.evidence = TRUE) 38 | 39 | if (!is.null(protein_file)) { 40 | if(verbose) message(">> FILTERING OUT UNWANTED PROTEINS... ") 41 | proteins <- .artms_checkIfFile(protein_file) 42 | 43 | # pull out only cases where the proteins appear 44 | query <- paste(t(proteins), collapse = "|") 45 | idx <- grep(query, dat$Proteins) 46 | dat <- dat[idx,] 47 | } 48 | 49 | if(verbose) message(">> COMPUTING AVERAGES... ") 50 | # Compute the average Intensity 51 | dat.avg <- 52 | aggregate(data = dat[, c("Proteins", 53 | "Modified.sequence", 54 | "Charge", 55 | "Intensity")], 56 | Intensity ~ ., 57 | mean, na.rm = TRUE) 58 | # Compute the average Retention Time 59 | dat.ret <- 60 | aggregate(data = dat[, c("Proteins", 61 | "Modified.sequence", 62 | "Charge", 63 | "Retention.time")], 64 | Retention.time ~., 65 | mean, na.rm = TRUE) 66 | # Compute the average Calibrated retention time 67 | dat.cal <- 68 | aggregate(data = dat[, c("Proteins", 69 | "Modified.sequence", 70 | "Charge", 71 | "Calibrated.retention.time")], 72 | Calibrated.retention.time ~ ., 73 | mean, 74 | na.rm = TRUE) 75 | 76 | if(verbose) message(">> MERGING RESULTS... ") 77 | results <- 78 | merge( 79 | dat.avg, 80 | dat.ret, 81 | by = c("Proteins", "Modified.sequence", "Charge"), 82 | all.y = TRUE 83 | ) 84 | results <- 85 | merge( 86 | results, 87 | dat.cal, 88 | by = c("Proteins", "Modified.sequence", "Charge"), 89 | all.y = TRUE 90 | ) 91 | # add 'Avg' to names 92 | names(results)[4:6] = paste0("Avg_", names(results)[5:7]) 93 | 94 | if(verbose) message(">> SUMMARIZATION COMPLETE!! ") 95 | 96 | if (output_file) { 97 | # write out results 98 | if(verbose) message("--- WRITING OUT RESULTS TO ", output_file, " ") 99 | write.table( 100 | results, 101 | output_file, 102 | quote = FALSE, 103 | row.names = FALSE, 104 | sep = "\t" 105 | ) 106 | return(results) 107 | } else{ 108 | return(results) 109 | } 110 | } 111 | -------------------------------------------------------------------------------- /man/artmsProtein2SiteConversion.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/protein2SiteConversion.R 3 | \name{artmsProtein2SiteConversion} 4 | \alias{artmsProtein2SiteConversion} 5 | \title{Converts the Protein ID column of the evidence 6 | file selected by the user to mod-site-specific notation: 7 | \code{ProteinID} to \code{ProteinID_AAnumber} notation} 8 | \usage{ 9 | artmsProtein2SiteConversion( 10 | evidence_file, 11 | ref_proteome_file, 12 | column_name = c("Leading razor protein", "Leading proteins", "Proteins"), 13 | output_file, 14 | mod_type, 15 | overwrite_evidence = FALSE, 16 | verbose = TRUE 17 | ) 18 | } 19 | \arguments{ 20 | \item{evidence_file}{(char) The evidence file name and location} 21 | 22 | \item{ref_proteome_file}{(char) The reference proteome used as database 23 | to search the \code{evidence.txt} file with MaxQuant. It will be used to map the 24 | modified peptide to the protein sequence and find the site location. 25 | Therefore, it does not use the MaxQuant's \verb{Phospho (STY)Sites.txt}} 26 | 27 | \item{column_name}{(char) The Protein Column Name to map. Options: 28 | \itemize{ 29 | \item \verb{Leadind razor protein} (default) 30 | \item \verb{Leading protein} 31 | \item \code{Proteins} 32 | It only supports Uniprot Entry IDs and RefSeq, but it might work for 33 | other database IDs 34 | }} 35 | 36 | \item{output_file}{(char) Output file name 37 | (\code{ptmsites-evidence.txt} recommended)} 38 | 39 | \item{mod_type}{(char) The posttranslational modification. Options: 40 | \itemize{ 41 | \item \code{UB}: Protein Ubiquitination 42 | \item \code{PH}: Protein Phosphorylation 43 | \item \code{AC}: Protein Acetylation 44 | \item \code{PTM:XXX:yy} : User defined PTM. Replace XXX with 1 or more 1-letter amino 45 | acid codes on which to find modifications (all uppercase). Replace yy with 46 | modification name used within the evidence file (require lowercase characters). 47 | Example: \code{PTM:STY:ph} will find modifications on aa S,T,Y with this 48 | format \verb{_AAGGAPS(ph)PPPPVR_}. This would be equivalent to \code{mod_type = PH} 49 | }} 50 | 51 | \item{overwrite_evidence}{(logical) if is the same 52 | as , \code{overwrite_evidence = FALSE} (default) doesn't allow to 53 | overwrite the evidence file. Otherwise, \code{overwrite_evidence = TRUE} allows 54 | to overwrite the evidence_file (this option might be activated if the user 55 | allows to use the same \code{ptm-sites-evidence.txt} file to re-annotate all 56 | the Protein IDs columns)} 57 | 58 | \item{verbose}{(logical) \code{TRUE} (default) shows function messages} 59 | } 60 | \value{ 61 | (file) Return a new evidence file with the specified Protein id 62 | column modified by adding the sequence site location(s) + postranslational 63 | modification(s) to the uniprot entry / refseq id. 64 | 65 | Output ID examples: \code{A34890_ph3}; \code{Q64890_ph24_ph456}; 66 | \code{Q64890_ub34_ub129_ub234}; \code{Q64890_ac35}. 67 | } 68 | \description{ 69 | It enables the modified-peptide specific quantification by 70 | converting the Protein column of the evidence file selected by the user 71 | to an \code{ProteinID_AAnumber}notation. 72 | In this way, each of the modified peptides can be quantified 73 | independently across conditions. 74 | 75 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 76 | 77 | WARNING: we have detected a version of MaxQuant (>1.6.3.0) outputs a` 78 | "Modified sequence" column of the evidence file that has two important 79 | changes for the annotation of phosphorylation: 80 | \itemize{ 81 | \item Uses \code{p} instead of \code{(ph)} 82 | \item The modified residue (i.e. \code{STY}) is the residue on the right of the \code{p}, 83 | instead of the residue to the left of \code{(ph)}, as usual. 84 | We have introduced a modification to detect and address this issue, but 85 | we advice the user to double check both the new evidence file with the 86 | introduce new notation and the \code{-mapping.txt} file and check that there 87 | are no NA values for the notation of phophopeptides. 88 | } 89 | 90 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 91 | } 92 | \examples{ 93 | # Testing warning if files are not submitted. 94 | artmsProtein2SiteConversion(evidence_file = NULL, ref_proteome_file = NULL, 95 | output_file = NULL) 96 | } 97 | \keyword{ac} 98 | \keyword{convert,} 99 | \keyword{evidence,} 100 | \keyword{ph,} 101 | \keyword{ptm,} 102 | \keyword{ub,} 103 | -------------------------------------------------------------------------------- /docs/sitemap.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | http://artms.org//index.html 5 | 6 | 7 | http://artms.org//reference/artmsAnalysisQuantifications.html 8 | 9 | 10 | http://artms.org//reference/artmsAnnotateSpecie.html 11 | 12 | 13 | http://artms.org//reference/artmsAnnotationUniprot.html 14 | 15 | 16 | http://artms.org//reference/artmsAvgIntensityRT.html 17 | 18 | 19 | http://artms.org//reference/artmsChangeColumnName.html 20 | 21 | 22 | http://artms.org//reference/artmsConvertMetabolomics.html 23 | 24 | 25 | http://artms.org//reference/artmsDataPlots.html 26 | 27 | 28 | http://artms.org//reference/artmsEnrichLog2fc.html 29 | 30 | 31 | http://artms.org//reference/artmsEnrichProfiler.html 32 | 33 | 34 | http://artms.org//reference/artmsEvidenceToSAINTq.html 35 | 36 | 37 | http://artms.org//reference/artmsEvidenceToSaintExpress.html 38 | 39 | 40 | http://artms.org//reference/artmsFilterEvidenceContaminants.html 41 | 42 | 43 | http://artms.org//reference/artmsGeneratePhSiteExtended.html 44 | 45 | 46 | http://artms.org//reference/artmsIsEvidenceNewVersion.html 47 | 48 | 49 | http://artms.org//reference/artmsIsSpeciesSupported.html 50 | 51 | 52 | http://artms.org//reference/artmsLeaveOnlyUniprotEntryID.html 53 | 54 | 55 | http://artms.org//reference/artmsMapUniprot2Entrez.html 56 | 57 | 58 | http://artms.org//reference/artmsMergeEvidenceAndKeys.html 59 | 60 | 61 | http://artms.org//reference/artmsMsstatsSummary.html 62 | 63 | 64 | http://artms.org//reference/artmsPhosfateOutput.html 65 | 66 | 67 | http://artms.org//reference/artmsPhotonOutput.html 68 | 69 | 70 | http://artms.org//reference/artmsPlotHeatmapQuant.html 71 | 72 | 73 | http://artms.org//reference/artmsProtein2SiteConversion.html 74 | 75 | 76 | http://artms.org//reference/artmsQualityControlEvidenceBasic.html 77 | 78 | 79 | http://artms.org//reference/artmsQualityControlEvidenceExtended.html 80 | 81 | 82 | http://artms.org//reference/artmsQualityControlMetabolomics.html 83 | 84 | 85 | http://artms.org//reference/artmsQualityControlSummaryExtended.html 86 | 87 | 88 | http://artms.org//reference/artmsQuantification.html 89 | 90 | 91 | http://artms.org//reference/artmsResultsWide.html 92 | 93 | 94 | http://artms.org//reference/artmsSILACtoLong.html 95 | 96 | 97 | http://artms.org//reference/artmsSpectralCounts.html 98 | 99 | 100 | http://artms.org//reference/artmsVolcanoPlot.html 101 | 102 | 103 | http://artms.org//reference/artmsWriteConfigYamlFile.html 104 | 105 | 106 | http://artms.org//reference/artms_config.html 107 | 108 | 109 | http://artms.org//reference/artms_data_corum_mito_database.html 110 | 111 | 112 | http://artms.org//reference/artms_data_pathogen_LPN.html 113 | 114 | 115 | http://artms.org//reference/artms_data_pathogen_TB.html 116 | 117 | 118 | http://artms.org//reference/artms_data_ph_config.html 119 | 120 | 121 | http://artms.org//reference/artms_data_ph_contrast.html 122 | 123 | 124 | http://artms.org//reference/artms_data_ph_evidence.html 125 | 126 | 127 | http://artms.org//reference/artms_data_ph_keys.html 128 | 129 | 130 | http://artms.org//reference/artms_data_ph_msstats_modelqc.html 131 | 132 | 133 | http://artms.org//reference/artms_data_ph_msstats_results.html 134 | 135 | 136 | http://artms.org//reference/artms_data_randomDF.html 137 | 138 | 139 | http://artms.org//articles/artMS_vignette.html 140 | 141 | 142 | -------------------------------------------------------------------------------- /R/writeExtras.R: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------------ 2 | # @title Write extras 3 | # @description Extras after MSstats, as annotations, volcano plots, heatmaps 4 | # @param results MSstats results 5 | # @param config The configuration object (yaml) 6 | # 7 | # @return Extras as selected in the yaml file, including: 8 | # - volcano plot (pdf) 9 | # - Adding annotations (gene symbol based on uniprot) 10 | # @keywords extras, annotations, volcano 11 | .artms_writeExtras <- function(results, 12 | config, 13 | verbose = TRUE) { 14 | 15 | if (length(results) == 0 | !exists('results')) { 16 | stop("No results found to annotate!") 17 | } 18 | 19 | # Annotation 20 | if (config$output_extras$annotate$enabled) { 21 | message(">> ANNOTATING THE RESULTS (adding gene symbols and protein names)") 22 | if(!is.null(config$output_extras$annotate$species)){ 23 | results_ann <- artmsAnnotationUniprot(x = results, 24 | columnid = 'Protein', 25 | species = config$output_extras$annotate$species) 26 | output_annotated_file <- gsub(".txt", "-annotated.txt", config$files$output) 27 | write.table(results_ann, output_annotated_file, quote = FALSE, 28 | row.names = FALSE, 29 | col.names = TRUE, 30 | sep = "\t") 31 | } else { 32 | if(verbose) message("--- Cannot find species name in the file name 33 | (Add specie to field 'output_extras > annotate > species' in the config file)") 34 | results_ann <- results 35 | } 36 | }else{ 37 | results_ann <- results 38 | } 39 | 40 | lfc_lower <- as.numeric(unlist(strsplit(config$output_extras$plots$LFC, split = " "))[1]) 41 | lfc_upper <- as.numeric(unlist(strsplit(config$output_extras$plots$LFC, split = " "))[2]) 42 | 43 | ## This option was originally available in the config file but 44 | ## it was removed 45 | config$output_extras$plots$comparisons <- "all" 46 | ## ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 47 | 48 | selected_labels <- config$output_extras$plots$comparisons 49 | if (is.null(selected_labels) || selected_labels == 'all') 50 | selected_labels = '*' 51 | 52 | # remove the Inf, -Inf log2FC hits. 53 | results_ann <- results_ann[!is.infinite(results_ann$log2FC), ] 54 | 55 | ## select data points by LFC & FDR criterium in single condition and 56 | ## adding corresponding data points from the other conditions 57 | sign_hits <- .artms_significantHits(results_ann, 58 | labels = selected_labels, 59 | LFC = c(lfc_lower, lfc_upper), 60 | FDR = config$output_extras$plots$FDR) 61 | 62 | if (dim(sign_hits)[1] == 0){ 63 | message("--(-) No significant hits detected in this experiment. aborting plots. ") 64 | }else{ 65 | sign_labels <- unique(sign_hits$Label) 66 | if(verbose) message( sprintf( 67 | "-- Selected hits for plots with LFC between %s and %s at %s FDR:%s ", 68 | lfc_lower, 69 | lfc_upper, 70 | config$output_extras$plots$FDR, 71 | nrow(sign_hits) / length(sign_labels))) 72 | 73 | ## REPRESENTING RESULTS AS HEATMAP, if enabled 74 | if (config$output_extras$plots$heatmap) { 75 | # Heatmap only for > 1 comparison 76 | if (dim(sign_hits)[1] > 1) { 77 | if(verbose) message(">> PLOTTING HEATMAP FOR SIGNIFICANT CHANGES ") 78 | heat_labels <- .artms_prettyPrintHeatmapLabels(uniprot_acs = sign_hits$Protein, 79 | uniprot_ids = sign_hits$name, 80 | gene_names = sign_hits$Gene.names) 81 | 82 | heat_data_w <- .artms_plotHeat(mss_F = sign_hits, 83 | out_file = gsub('.txt', '-sign.pdf', config$files$output), 84 | names = heat_labels, 85 | cluster_cols = config$output_extras$plots$heatmap_cluster_cols, 86 | display = config$output_extras$plots$heatmap_display, 87 | verbose = verbose) 88 | } 89 | } 90 | } 91 | 92 | if (config$output_extras$plots$volcano) { 93 | if(verbose) message(">> PLOTTING VOLCANO PLOT ") 94 | file_name <- gsub('.txt', '-volcano.pdf', config$files$output) 95 | artmsVolcanoPlot( 96 | mss_results = results_ann[grep(selected_labels, results_ann$Label), ], 97 | lfc_upper = lfc_upper, lfc_lower = lfc_lower, 98 | FDR = config$output_extras$plots$FDR, 99 | output_name = file_name, 100 | verbose = verbose 101 | ) 102 | } 103 | } 104 | 105 | 106 | 107 | -------------------------------------------------------------------------------- /R/otherApps.R: -------------------------------------------------------------------------------- 1 | #------------------------------------------------------------------------------- 2 | #' @title Generate Phosfate Input file 3 | #' 4 | #' @description It takes as input the `imputedL2fcExtended.txt` results 5 | #' generated by the `artmsAnalysisQuantifications()` function and generates 6 | #' the [Phosfate](http://phosfate.com/) input file (or data.frame) 7 | #' Please, notice that the only species suported by Phosfate is humans. 8 | #' @param inputFile (char) the `imputedL2fcExtended.txt` file name and location 9 | #' @param output_dir (char) Name of the folder to output results 10 | #' (Default: current directory. Recommended: `phosfate_input`) 11 | #' @param verbose (logical) `TRUE` (default) to show function messages 12 | #' @return Multiple output files (inputs of phosfate) 13 | #' @keywords generate, outputs, files 14 | #' @examples \dontrun{ 15 | #' artmsPhosfateOutput(inputFile) 16 | #' } 17 | #' @export 18 | artmsPhosfateOutput <- function(inputFile, 19 | output_dir = ".", 20 | verbose = TRUE){ 21 | 22 | df <- .artms_checkIfFile(inputFile) 23 | 24 | # Check the existance of the columns that are needed. 25 | checkColumns <- c('Protein', 'PTMsite', 'iLog2FC', 'Comparison') 26 | 27 | if (any( !checkColumns %in% colnames(df)) ) { 28 | stop("One (or many) column names are not found: ", 29 | sprintf('%s, ',checkColumns)) 30 | } 31 | 32 | # create output directory if it doesn't exist 33 | if(!dir.exists(output_dir)){ 34 | dir.create(output_dir, recursive = TRUE) 35 | } 36 | 37 | conditions <- unique(df$Comparison) 38 | 39 | for ( i in seq_len(length(conditions)) ){ 40 | if(verbose) message("+---", i, conditions[i], appendLF = FALSE) 41 | df.select <- df[which(df$Comparison == conditions[i]),] 42 | df.out <- df.select[c('Protein','PTMsite','iLog2FC')] 43 | fileout <- gsub(".txt","", inputFile) 44 | fileout <- paste0(fileout,"-",conditions[i],".txt") 45 | fileout <- paste0(output_dir,"/",fileout) 46 | write.table(df.out, fileout, col.names = FALSE, 47 | row.names = FALSE, 48 | quote = FALSE, sep = ",") 49 | if(verbose) message(":", fileout, " is out ") 50 | } 51 | } 52 | 53 | #------------------------------------------------------------------------------- 54 | #' @title Generate PHOTON Input file 55 | #' 56 | #' @description It takes as input the `imputedL2fcExtended.txt` results 57 | #' generated by the `artmsAnalysisQuantifications()` function and generates 58 | #' the [PHOTON](https://github.com/jdrudolph/photon) input file. 59 | #' Please, notice that the only species suported by PHOTON is humans. 60 | #' @param inputFile (char) the `imputedL2fcExtended.txt` file name and location 61 | #' @param output_dir (char) Name of the folder to output results 62 | #' (Default: current. Recommended: "photon_input_files" or similar) 63 | #' @param verbose (logical) `TRUE` (default) to show function messages 64 | #' @return Multiple output files (inputs of phosfate) 65 | #' @keywords generate, outputs, files 66 | #' @examples \dontrun{ 67 | #' artmsPhotonOutput(inputFile) 68 | #' } 69 | #' @export 70 | artmsPhotonOutput <- function(inputFile, 71 | output_dir = ".", 72 | verbose = TRUE){ 73 | 74 | df <- .artms_checkIfFile(inputFile) 75 | 76 | # Check the existance of the columns that are needed. 77 | checkColumns <- c('Gene', 'PTMsite', 'iLog2FC', 'EntrezID') 78 | 79 | if (any( !checkColumns %in% colnames(df)) ) { 80 | stop("One (or many) column names are not found: ",sprintf('%s, ',checkColumns)) 81 | } 82 | 83 | # create output directory if it doesn't exist 84 | if(!dir.exists(output_dir)){ 85 | dir.create(output_dir, recursive = TRUE) 86 | } 87 | 88 | conditions <- unique(df$Comparison) 89 | 90 | for ( i in seq_len(length(conditions)) ){ 91 | if(verbose) message("+---", i, conditions[i], appendLF = FALSE) 92 | df.select <- df[which(df$Comparison == conditions[i]),] 93 | 94 | # first, filter by pvalue 95 | df.select <- df.select[which(df.select$iPvalue < 0.05),] 96 | 97 | # Photon takes this input columns: GeneID,Amino.Acid,Position,avg,Symbol 98 | df.out <- df.select[c('Gene','PTMsite','iLog2FC','EntrezID')] 99 | df.out$Amino.Acid <- df.select$PTMaa 100 | df.out <- artmsChangeColumnName(df.out, "EntrezID", "GeneID") 101 | df.out <- artmsChangeColumnName(df.out, "PTMsite", "Position") 102 | df.out <- artmsChangeColumnName(df.out, "iLog2FC", "avg") 103 | df.out <- artmsChangeColumnName(df.out, "Gene", "Symbol") 104 | 105 | df.out <- df.out[c('GeneID', 'Amino.Acid', 'Position', 'avg', 'Symbol')] 106 | if(any(grep(";", df.out$Symbol))){ 107 | if(verbose) message("\t---(-) Removed multiple ids from column 'Protein' ") 108 | df.out <- df.out[-grep(";", df.out$Symbol),] 109 | } 110 | fileout <- gsub(".txt","", inputFile) 111 | fileout <- paste0("photon.",conditions[i],".csv") 112 | fileout <- paste0(output_dir,"/",fileout) 113 | write.table(df.out, fileout, 114 | col.names = TRUE, row.names = FALSE, 115 | quote = FALSE, sep = ",") 116 | if(verbose) message(":",fileout," is out ") 117 | } 118 | } 119 | 120 | 121 | -------------------------------------------------------------------------------- /man/artmsQualityControlEvidenceBasic.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/qualityControlEvidenceBasic.R 3 | \name{artmsQualityControlEvidenceBasic} 4 | \alias{artmsQualityControlEvidenceBasic} 5 | \title{Quality Control analysis of the MaxQuant evidence file} 6 | \usage{ 7 | artmsQualityControlEvidenceBasic( 8 | evidence_file, 9 | keys_file, 10 | prot_exp = c("AB", "PH", "UB", "AC", "APMS", "PTM:XXX:yy"), 11 | output_dir = "qc_basic", 12 | output_name = "qcBasic_evidence", 13 | isSILAC = FALSE, 14 | plotINTDIST = FALSE, 15 | plotREPRO = FALSE, 16 | plotCORMAT = TRUE, 17 | plotINTMISC = TRUE, 18 | plotPTMSTATS = TRUE, 19 | printPDF = TRUE, 20 | verbose = TRUE 21 | ) 22 | } 23 | \arguments{ 24 | \item{evidence_file}{(char or data.frame) The evidence file path and name, or 25 | data.frame} 26 | 27 | \item{keys_file}{(char or data.frame) The keys file path and name or 28 | data.frame} 29 | 30 | \item{prot_exp}{(char) Proteomics experiment. 6 options available: 31 | \itemize{ 32 | \item \code{APMS}: affinity purification mass spectrometry 33 | \item \code{AB}: protein abundance 34 | \item \code{PH}: protein phosphorylation 35 | \item \code{UB}: protein ubiquitination (aka ubiquitylation) 36 | \item \code{AC}: protein acetylation 37 | \item \code{PTM:XXX:yy} : User defined PTM. Replace XXX with 1 or more 1-letter amino 38 | acid codes on which to find modifications (all uppercase). Replace yy with 39 | modification name used within the evidence file (require lowercase characters). 40 | Example for phosphorylation: \code{PTM:STY:ph} will find modifications on 41 | aa S,T,Y with this example format \verb{_AAGGAPS(ph)PPPPVR_}. This means that 42 | the user could select phosphorylation as \code{PH} or \code{PTM:STY:ph} 43 | }} 44 | 45 | \item{output_dir}{(char) Name for the folder to output the results plots. 46 | Default is "qc_basic".} 47 | 48 | \item{output_name}{(char) prefix output name (no extension). 49 | Default: "qcBasic_evidence"} 50 | 51 | \item{isSILAC}{if \code{TRUE} processes SILAC input files. Default is \code{FALSE}} 52 | 53 | \item{plotINTDIST}{if \code{TRUE} plots both \emph{Box-dot plot} 54 | and \emph{Jitter plot} of biological replicates based on MS (raw) 55 | intensity values, otherwise \code{FALSE} (default)} 56 | 57 | \item{plotREPRO}{if \code{TRUE} plots a correlation dotplot for all the 58 | combinations of biological replicates of conditions, based on MS Intensity 59 | values using features (peptide+charge). Otherwise \code{FALSE} (default)} 60 | 61 | \item{plotCORMAT}{if \code{TRUE} (default) plots a 62 | \itemize{ 63 | \item \emph{Correlation matrix} for all the biological replicates using 64 | MS Intensity values, 65 | \item \emph{Clustering matrix} of the MS Intensities 66 | }} 67 | 68 | \item{plotINTMISC}{if \code{TRUE} (default) plots several pages, including 69 | bar plots of \emph{Total Sum of Intensities in BioReplicates}, 70 | \emph{Total Sum of Intensities in Conditions}, 71 | \emph{Total Peptide Counts in BioReplicates}, 72 | \emph{Total Peptide Counts in conditions} separated by categories: 73 | \code{CON}: contaminants, \code{PROT} peptides, \code{REV} reversed sequences used by 74 | MaxQuant to estimate the FDR; \emph{Box plots} of MS Intensity values per 75 | biological replicates and conditions; \emph{bar plots} of total intensity 76 | (excluding contaminants) by bioreplicates and conditions; Barplots of 77 | \emph{total feature counts} by bioreplicates and conditions.} 78 | 79 | \item{plotPTMSTATS}{IF \code{TRUE} (default) plots stats related to the 80 | selected modification, including: 81 | \emph{bar plot of peptide counts and intensities}, broken by \code{PTM/other} 82 | categories; bar plots of \emph{total sum-up of MS intensity values} by 83 | other/PTM categories.} 84 | 85 | \item{printPDF}{If \code{TRUE} (default) prints out the pdfs. Warning: plot 86 | objects are not returned due to the large number of them.} 87 | 88 | \item{verbose}{(logical) \code{TRUE} (default) shows function messages} 89 | } 90 | \value{ 91 | Quality control files and plots 92 | } 93 | \description{ 94 | Quality Control analysis of the MaxQuant evidence file 95 | } 96 | \examples{ 97 | artmsQualityControlEvidenceBasic(evidence_file = artms_data_ph_evidence, 98 | keys_file = artms_data_ph_keys, 99 | prot_exp = "PH", 100 | isSILAC = FALSE, 101 | plotINTDIST = FALSE, 102 | plotREPRO = TRUE, 103 | plotCORMAT = FALSE, 104 | plotINTMISC = FALSE, 105 | plotPTMSTATS = FALSE, 106 | printPDF = FALSE, 107 | verbose = FALSE) 108 | 109 | # But we recommend the following test: 110 | # 1. Go to a working directory: 111 | # setwd("/path/to/your/working/directory/") 112 | # 2. Run the following command to print out all the pdf files 113 | # artmsQualityControlEvidenceBasic(evidence_file = artms_data_ph_evidence, 114 | # keys_file = artms_data_ph_keys, 115 | # prot_exp = "PH") 116 | # 3. Check your working directory and you should find pdf files with 117 | # all the QC plots 118 | } 119 | \keyword{QC,} 120 | \keyword{control,} 121 | \keyword{evidence} 122 | \keyword{quality,} 123 | -------------------------------------------------------------------------------- /docs/bootstrap-toc.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap Table of Contents v0.4.1 (http://afeld.github.io/bootstrap-toc/) 3 | * Copyright 2015 Aidan Feldman 4 | * Licensed under MIT (https://github.com/afeld/bootstrap-toc/blob/gh-pages/LICENSE.md) */ 5 | (function() { 6 | 'use strict'; 7 | 8 | window.Toc = { 9 | helpers: { 10 | // return all matching elements in the set, or their descendants 11 | findOrFilter: function($el, selector) { 12 | // http://danielnouri.org/notes/2011/03/14/a-jquery-find-that-also-finds-the-root-element/ 13 | // http://stackoverflow.com/a/12731439/358804 14 | var $descendants = $el.find(selector); 15 | return $el.filter(selector).add($descendants).filter(':not([data-toc-skip])'); 16 | }, 17 | 18 | generateUniqueIdBase: function(el) { 19 | var text = $(el).text(); 20 | var anchor = text.trim().toLowerCase().replace(/[^A-Za-z0-9]+/g, '-'); 21 | return anchor || el.tagName.toLowerCase(); 22 | }, 23 | 24 | generateUniqueId: function(el) { 25 | var anchorBase = this.generateUniqueIdBase(el); 26 | for (var i = 0; ; i++) { 27 | var anchor = anchorBase; 28 | if (i > 0) { 29 | // add suffix 30 | anchor += '-' + i; 31 | } 32 | // check if ID already exists 33 | if (!document.getElementById(anchor)) { 34 | return anchor; 35 | } 36 | } 37 | }, 38 | 39 | generateAnchor: function(el) { 40 | if (el.id) { 41 | return el.id; 42 | } else { 43 | var anchor = this.generateUniqueId(el); 44 | el.id = anchor; 45 | return anchor; 46 | } 47 | }, 48 | 49 | createNavList: function() { 50 | return $(''); 51 | }, 52 | 53 | createChildNavList: function($parent) { 54 | var $childList = this.createNavList(); 55 | $parent.append($childList); 56 | return $childList; 57 | }, 58 | 59 | generateNavEl: function(anchor, text) { 60 | var $a = $(''); 61 | $a.attr('href', '#' + anchor); 62 | $a.text(text); 63 | var $li = $('
  • '); 64 | $li.append($a); 65 | return $li; 66 | }, 67 | 68 | generateNavItem: function(headingEl) { 69 | var anchor = this.generateAnchor(headingEl); 70 | var $heading = $(headingEl); 71 | var text = $heading.data('toc-text') || $heading.text(); 72 | return this.generateNavEl(anchor, text); 73 | }, 74 | 75 | // Find the first heading level (`

    `, then `

    `, etc.) that has more than one element. Defaults to 1 (for `

    `). 76 | getTopLevel: function($scope) { 77 | for (var i = 1; i <= 6; i++) { 78 | var $headings = this.findOrFilter($scope, 'h' + i); 79 | if ($headings.length > 1) { 80 | return i; 81 | } 82 | } 83 | 84 | return 1; 85 | }, 86 | 87 | // returns the elements for the top level, and the next below it 88 | getHeadings: function($scope, topLevel) { 89 | var topSelector = 'h' + topLevel; 90 | 91 | var secondaryLevel = topLevel + 1; 92 | var secondarySelector = 'h' + secondaryLevel; 93 | 94 | return this.findOrFilter($scope, topSelector + ',' + secondarySelector); 95 | }, 96 | 97 | getNavLevel: function(el) { 98 | return parseInt(el.tagName.charAt(1), 10); 99 | }, 100 | 101 | populateNav: function($topContext, topLevel, $headings) { 102 | var $context = $topContext; 103 | var $prevNav; 104 | 105 | var helpers = this; 106 | $headings.each(function(i, el) { 107 | var $newNav = helpers.generateNavItem(el); 108 | var navLevel = helpers.getNavLevel(el); 109 | 110 | // determine the proper $context 111 | if (navLevel === topLevel) { 112 | // use top level 113 | $context = $topContext; 114 | } else if ($prevNav && $context === $topContext) { 115 | // create a new level of the tree and switch to it 116 | $context = helpers.createChildNavList($prevNav); 117 | } // else use the current $context 118 | 119 | $context.append($newNav); 120 | 121 | $prevNav = $newNav; 122 | }); 123 | }, 124 | 125 | parseOps: function(arg) { 126 | var opts; 127 | if (arg.jquery) { 128 | opts = { 129 | $nav: arg 130 | }; 131 | } else { 132 | opts = arg; 133 | } 134 | opts.$scope = opts.$scope || $(document.body); 135 | return opts; 136 | } 137 | }, 138 | 139 | // accepts a jQuery object, or an options object 140 | init: function(opts) { 141 | opts = this.helpers.parseOps(opts); 142 | 143 | // ensure that the data attribute is in place for styling 144 | opts.$nav.attr('data-toggle', 'toc'); 145 | 146 | var $topContext = this.helpers.createChildNavList(opts.$nav); 147 | var topLevel = this.helpers.getTopLevel(opts.$scope); 148 | var $headings = this.helpers.getHeadings(opts.$scope, topLevel); 149 | this.helpers.populateNav($topContext, topLevel, $headings); 150 | } 151 | }; 152 | 153 | $(function() { 154 | $('nav[data-toggle="toc"]').each(function(i, el) { 155 | var $nav = $(el); 156 | Toc.init($nav); 157 | }); 158 | }); 159 | })(); 160 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # artMS 2 | 3 | ___Analytical R Tools for Mass Spectrometry___ 4 | 5 | --- 6 | 7 | [![Build Status](https://travis-ci.com/biodavidjm/artMS.svg?branch=master)](https://travis-ci.com/biodavidjm/artMS) 8 | [![codecov](https://codecov.io/github/biodavidjm/artMS/branch/master/graphs/badge.svg)](https://codecov.io/github/biodavidjm/artMS) 9 | [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.8093247.svg)](https://doi.org/10.5281/zenodo.8093247) 10 | 11 | ## Overview 12 | 13 | `artMS` ([http://artms.org/](http://artms.org/)) is an R 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 package 14 | [MaxQuant](http://www.biochem.mpg.de/5111795/maxquant). The [functions available in artMS](https://biodavidjm.github.io/artMS/reference/index.html) can be grouped into 4 major categories: 15 | 16 | - Multiple quality control (QC). 17 | - Relative quantification using [MSstats](http://msstats.org/). 18 | - Downstream analysis and integration of quantifications (enrichment, clustering, PCA, summary plots, etc) 19 | - Generation of input files for other tools, including [SAINTq and SAINTexpress](http://saint-apms.sourceforge.net/Main.html), [Photon](https://github.com/jdrudolph/photon), and [Phosfate](http://phosfate.com/) 20 | 21 | 22 | `artMS` performs the different analyses taking as input the following files: 23 | 24 | - `evidence.txt` file: The output of the quantitative proteomics software 25 | package `MaxQuant`. 26 | - `keys.txt` (tab-delimited) txt file generated by the user describing the experimental designed (check below to learn how to create it). 27 | - `contrast.txt` (tab-delimited) txt file generated by the user with the comparisons between conditions to be quantified (check below to learn how to create it). 28 | - `config.yaml`: a configuration file which enables the customization of a number of parameters for the quantification (and other operations, including QC analyses, charts and annotations). A configuration file template can be generated by running `artmsWriteConfigYamlFile()` 29 | 30 | 31 | 32 | ## How to install 33 | 34 | ### Bioconductor 35 | 36 | `artMS version >= 1.10.1` had many changes to adjust for changes in MSstats. This version requires: 37 | 38 | - Install `R version >= 4.1.0` (check the R version running on your system by executing the function `getRversion()`) 39 | - Bioconductor: `BiocManager::install("BiocVersion")` 40 | - artMS: `BiocManager::install("artMS")` 41 | - If you are planning to use the `artmsAnalysisQuantifications()` to perform a comprehensive downstream analysis of the quantitative results, then install the following packages: 42 | 43 | ``` 44 | # From bioconductor: 45 | BiocManager::install(c("ComplexHeatmap", "org.Mm.eg.db")) 46 | 47 | # From CRAN: 48 | install.packages(c("factoextra", "FactoMineR", "gProfileR", "PerformanceAnalytics")) 49 | ``` 50 | 51 | Extra: Why Bioconductor? [Here you can find a nice summary of many good reasons](https://bioinformatics.stackexchange.com/questions/639/why-bioconductor)). 52 | 53 | ### Development version from Github (unstable) 54 | 55 | Assuming that you have an `R (>= 4.1)` version running on your system, 56 | follow these steps: 57 | 58 | ``` 59 | install.packages("devtools") 60 | library(devtools) 61 | install_github("biodavidjm/artMS") 62 | ``` 63 | 64 | Once installed, the package can be loaded and attached to your current 65 | workspace as follows: 66 | 67 | ```{r, eval=TRUE} 68 | library(artMS) 69 | ``` 70 | 71 | Once installed, we suggest you to do a quick test by running the quality control functions using the "evidence" (`artms_data_ph_evidence`) and "keys" (`artms_data_ph_keys`) files included in `artMS` as test datasets. 72 | 73 | ``` 74 | # First go to a local working directory: several pdfs will be generated 75 | # setwd("/path/to/your/working/directory/") 76 | 77 | # And run: 78 | artmsQualityControlEvidenceBasic(evidence_file = artms_data_ph_evidence, 79 | keys_file = artms_data_ph_keys, 80 | prot_exp = "PH") 81 | ``` 82 | 83 | (To learn more about these testing datasets, check the documentation by running `?artms_data_ph_keys` or `?artms_data_ph_evidence` on the R console) 84 | 85 | 86 | Once the QC is done, go to the folder `"/path/to/your/working/directory/"` and check out all the generated QC (pdf) files available in the `qc_basic` folder 87 | 88 | ## How to Contribute to artMS 89 | 90 | `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`). 91 | 92 | There are multiple options: 93 | 94 | - [Submit issues to this repo](https://github.com/biodavidjm/artMS/issues) reporting problems, bugs, or suggesting new features. 95 | - Fork and make pull requests. To find out more about this option, 96 | some very useful guides for beginners can be found here 97 | and there (or even beyond). When submitting a Pull Request, don't forget to select @biodavidjm as the reviewer 98 | 99 | __Tips__: Do you need to remember the basics of markdown? [Check out this fantastic link](https://commonmark.org/help/tutorial/index.html). 100 | 101 | 102 | ## artMS Help available online 103 | 104 | - The vignette can also be accessed at [http://artms.org](http://artms.org) 105 | - Errors or warnings? Please, 106 | submit them as a new issue 107 | at the official Github repository 108 | - Any other inquiries: 109 | 110 | 111 | 112 | 113 | 114 | -------------------------------------------------------------------------------- /docs/articles/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Articles • artMS 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 55 | 56 | 57 | 58 | 59 | 66 | 67 | 68 | 69 | 70 | 71 |
    72 |
    73 | 124 | 125 | 126 | 127 |
    128 | 129 |
    130 |
    131 | 134 | 135 |
    136 |

    All vignettes

    137 |

    138 | 139 |
    140 |
    artMS: Analytical R Tools for Mass Spectrometry
    141 |
    142 |
    143 |
    144 |
    145 |
    146 | 147 | 148 |
    149 | 152 | 153 |
    154 |

    Site built with pkgdown 1.6.1.

    155 |
    156 | 157 |
    158 |
    159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | -------------------------------------------------------------------------------- /docs/404.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Page not found (404) • artMS 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 55 | 56 | 57 | 58 | 59 | 66 | 67 | 68 | 69 | 70 | 71 |
    72 |
    73 | 124 | 125 | 126 | 127 |
    128 | 129 |
    130 |
    131 | 134 | 135 | Content not found. Please use links in the navbar. 136 | 137 |
    138 | 139 | 144 | 145 |
    146 | 147 | 148 | 149 |
    150 | 153 | 154 |
    155 |

    Site built with pkgdown 1.6.1.

    156 |
    157 | 158 |
    159 |
    160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | -------------------------------------------------------------------------------- /R/getMSstatsformat.R: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------------ 2 | # @title Generate MSstats format object and file 3 | # 4 | # @description Takes as input a reduced version of the Evidence file and 5 | # generates the input data.frame required by MSstats. 6 | # It processes fractionated data as well. 7 | # @param data_f (data.frame) of the filtered Maxquant evidence file. 8 | # @param output_name (char) Output file name (to generate the output files). 9 | # '.txt' extension required 10 | # @param data_object (logical) if TRUE the output_name cannot be the evidence file 11 | # since it would be an data_object 12 | # @param printTables (logical) `TRUE` (default) prints results tables 13 | # @param verbose (logical) `TRUE` (default) shows function messages 14 | # @return (data.frame) MSstats compatible format 15 | # @keywords internal, MSstats, format, input, fractions 16 | .artms_getMSstatsFormat <- function(data_f, 17 | output_name, 18 | data_object = FALSE, 19 | printTables = TRUE, 20 | verbose = TRUE) { 21 | 22 | Run = PeptideSequence = Condition_BioReplicate_Run = NULL 23 | 24 | if(verbose) message(">> CONVERTING THE DATA TO MSSTATS FORMAT ") 25 | 26 | if(any(missing(data_f) | 27 | missing(output_name))) 28 | stop("Missed (one or many) required argument(s) 29 | Please, check the help of this function to find out more") 30 | 31 | if(data_object){ 32 | output_name <- "artms_evidence.txt" 33 | }else{ 34 | if (!grepl(".txt", output_name)) { 35 | stop("Argument must have the extension '.txt'") 36 | } 37 | } 38 | 39 | data_f <- artmsChangeColumnName(data_f, 40 | "Modified.sequence", 41 | "PeptideSequence") 42 | 43 | data_f$PeptideSequence <- gsub("_", "", data_f$PeptideSequence) 44 | 45 | if(verbose) 46 | message("-- Selecting Sequence Type: MaxQuant 'Modified.sequence' column") 47 | 48 | # DEAL WITH FRACTIONS FIRST 49 | if( !("Fraction" %in% colnames(data_f)) ){ 50 | if(verbose) message("\t(+) column added (with value 1, MSstats requirement)") 51 | data_f$Fraction <- 1 52 | } 53 | 54 | predmss <- data_f[, c("Proteins", 55 | "PeptideSequence", 56 | "Charge", 57 | "IsotopeLabelType", 58 | "Condition", 59 | "BioReplicate", 60 | "Fraction", 61 | "Run", 62 | "Intensity")] 63 | 64 | # step required by MSstats to add 'NA' intensity values for those 65 | # features not found in certain bioreplicates/runs 66 | # If this is not done, MSstats will still works, 67 | # but it will generate a gigantic warning. 68 | if(verbose) 69 | message("-- Adding NA values for missing values (required by MSstats) ") 70 | 71 | ##LEGACY 72 | # predmss_dc <- data.table::dcast(data = setDT(predmss), 73 | # Proteins+PeptideSequence+Charge+IsotopeLabelType~Condition+ 74 | # BioReplicate + Run, 75 | # value.var = "Intensity", 76 | # fun.aggregate = sum, 77 | # sep = "___") 78 | predmss_dc <- predmss %>% 79 | dplyr::mutate(Condition_BioReplicate_Run = paste(Condition, BioReplicate, Run, Fraction, sep = "___") ) %>% 80 | tidyr::pivot_wider(id_cols = c(Proteins, PeptideSequence, Charge, IsotopeLabelType), 81 | names_from = Condition_BioReplicate_Run, 82 | values_from = Intensity, 83 | values_fn = list(Intensity = sum), values_fill = list(Intensity = NA)) 84 | 85 | 86 | ##LEGACY 87 | # predmss_melt <- data.table::melt(data = predmss_dc, 88 | # id.vars = c('Proteins', 89 | # 'PeptideSequence', 90 | # 'Charge', 91 | # 'IsotopeLabelType'), 92 | # value.name = "Intensity") 93 | predmss_melt <- predmss_dc %>% 94 | tidyr::pivot_longer(cols = -c(Proteins, PeptideSequence, Charge, IsotopeLabelType), 95 | names_to = "variable", 96 | values_to = "Intensity") 97 | 98 | # And put back the condition, bioreplicate and run columns 99 | predmss_melt$Condition <- gsub("(.*)(___)(.*)(___)(.*)(___)(.*)", "\\1", predmss_melt$variable) 100 | predmss_melt$BioReplicate <- gsub("(.*)(___)(.*)(___)(.*)(___)(.*)", "\\3", predmss_melt$variable) 101 | predmss_melt$Run <- gsub("(.*)(___)(.*)(___)(.*)(___)(.*)", "\\5", predmss_melt$variable) 102 | predmss_melt$Fraction <- gsub("(.*)(___)(.*)(___)(.*)(___)(.*)", "\\7", predmss_melt$variable) 103 | 104 | # After the data has been aggregated, then we add the columns 105 | predmss_melt$ProductCharge <- NA 106 | predmss_melt$FragmentIon <- NA 107 | 108 | # Names required by MSstats 109 | predmss_melt <- artmsChangeColumnName(predmss_melt, "Proteins", "ProteinName") 110 | predmss_melt <- artmsChangeColumnName(predmss_melt, "Charge", "PrecursorCharge") 111 | 112 | # And re-sort it as msstats likes it 113 | dmss <- predmss_melt[, c("ProteinName", 114 | "PeptideSequence", 115 | "PrecursorCharge", 116 | "FragmentIon", 117 | "ProductCharge", 118 | "IsotopeLabelType", 119 | "Condition", 120 | "BioReplicate", 121 | "Run", 122 | "Fraction", 123 | "Intensity")] 124 | 125 | ## sanity check for zero's 126 | if ( nrow(dmss[!is.na(dmss$Intensity) & dmss$Intensity == 0, ]) > 0) { 127 | dmss[!is.na(dmss$Intensity) & dmss$Intensity == 0, ]$Intensity = NA 128 | } 129 | 130 | dmss <- as.data.frame(dmss) 131 | if(printTables){ 132 | if(verbose) message("-- Write out the MSstats input file (-mss.txt) ") 133 | write.table(dmss, 134 | file = gsub('.txt', '-mss.txt', output_name), 135 | eol = "\n", 136 | sep = "\t", 137 | quote = FALSE, 138 | row.names = FALSE, 139 | col.names = TRUE) 140 | } 141 | return(dmss) 142 | } -------------------------------------------------------------------------------- /docs/reference/artms_data_randomDF.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Random data set — artms_data_randomDF • artMS 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 56 | 57 | 58 | 59 | 60 | 67 | 68 | 69 | 70 | 71 | 72 |
    73 |
    74 | 125 | 126 | 127 | 128 |
    129 | 130 |
    131 |
    132 | 137 | 138 |
    139 |

    Dataset randomly generated for testing purposes

    140 |
    141 | 142 |
    artms_data_randomDF
    143 | 144 | 145 |

    Format

    146 | 147 |

    A data frame with 100 rows and 10 variables:

    148 | Dataset generated using this code 149 | 150 | data.frame(replicate(10,sample(0:1,100,rep=TRUE))) 151 | 152 |
    153 | 154 | 155 |
    156 | 161 |
    162 | 163 | 164 |
    165 | 168 | 169 |
    170 |

    Site built with pkgdown 1.6.1.

    171 |
    172 | 173 |
    174 |
    175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | -------------------------------------------------------------------------------- /docs/authors.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Authors • artMS 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 55 | 56 | 57 | 58 | 59 | 66 | 67 | 68 | 69 | 70 | 71 |
    72 |
    73 | 124 | 125 | 126 | 127 |
    128 | 129 |
    130 |
    131 | 134 | 135 |
      136 |
    • 137 |

      David Jimenez-Morales. Author, maintainer. 138 |

      139 |
    • 140 |
    • 141 |

      Alexandre Rosa Campos. Author, contributor. 142 |

      143 |
    • 144 |
    • 145 |

      John Von Dollen. Author. 146 |

      147 |
    • 148 |
    • 149 |

      Nevan Krogan. Author. 150 |

      151 |
    • 152 |
    • 153 |

      Danielle Swaney. Author, contributor. 154 |

      155 |
    • 156 |
    157 | 158 |
    159 | 160 |
    161 | 162 | 163 | 164 |
    165 | 168 | 169 |
    170 |

    Site built with pkgdown 1.6.1.

    171 |
    172 | 173 |
    174 |
    175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | -------------------------------------------------------------------------------- /docs/reference/artms_data_pathogen_TB.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | TB PATHOGEN: Mycobacterium tuberculosis 10 | (strain ATCC 35801 / TMC 107 / Erdman) UNIPROTS IDS — artms_data_pathogen_TB • artMS 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 45 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 59 | 60 | 61 | 62 | 63 | 70 | 71 | 72 | 73 | 74 | 75 |
    76 |
    77 | 128 | 129 | 130 | 131 |
    132 | 133 |
    134 |
    135 | 141 | 142 |
    143 |

    TB PATHOGEN: Mycobacterium tuberculosis 144 | (strain ATCC 35801 / TMC 107 / Erdman) UNIPROTS IDS

    145 |
    146 | 147 |
    artms_data_pathogen_TB
    148 | 149 | 150 |

    Format

    151 | 152 |

    A data.frame of Entry IDs

    153 | 154 |
    155 | 160 |
    161 | 162 | 163 |
    164 | 167 | 168 |
    169 |

    Site built with pkgdown 1.6.1.

    170 |
    171 | 172 |
    173 |
    174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | -------------------------------------------------------------------------------- /docs/reference/artms_data_ph_contrast.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Contrast example for the PH dataset — artms_data_ph_contrast • artMS 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 58 | 59 | 60 | 61 | 62 | 69 | 70 | 71 | 72 | 73 | 74 |
    75 |
    76 | 127 | 128 | 129 | 130 |
    131 | 132 |
    133 |
    134 | 139 | 140 |
    141 |

    Contrast file with the relative quantification to be performed 142 | for the two conditions available in the example dataset: "Cal33-HSC6". 143 | See vignette for more details on how to prepare the contrast file.

    144 |
    145 | 146 |
    artms_data_ph_contrast
    147 | 148 | 149 |

    Format

    150 | 151 |

    list with one comparison: "Cal33-HSC6"

    152 | 153 |
    154 | 159 |
    160 | 161 | 162 |
    163 | 166 | 167 |
    168 |

    Site built with pkgdown 1.6.1.

    169 |
    170 | 171 |
    172 |
    173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | -------------------------------------------------------------------------------- /docs/reference/artms_data_ph_msstats_modelqc.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | MSstats modelQC example — artms_data_ph_msstats_modelqc • artMS 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 57 | 58 | 59 | 60 | 61 | 68 | 69 | 70 | 71 | 72 | 73 |
    74 |
    75 | 126 | 127 | 128 | 129 |
    130 | 131 |
    132 |
    133 | 138 | 139 |
    140 |

    Normalized data obtained from the artmsQuantification() step 141 | of the PH dataset (global analysis)

    142 |
    143 | 144 |
    artms_data_ph_msstats_modelqc
    145 | 146 | 147 |

    Format

    148 | 149 |

    A data frame resulting from running the latest version of 150 | MSstats::groupComparison function required as input for 151 | artmsAnalysisQuantifications()

    152 | 153 |
    154 | 159 |
    160 | 161 | 162 |
    163 | 166 | 167 |
    168 |

    Site built with pkgdown 1.6.1.

    169 |
    170 | 171 |
    172 |
    173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | -------------------------------------------------------------------------------- /docs/reference/artms_data_pathogen_LPN.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | LPN PATHOGEN: Legionella pneumophila subsp. pneumophila 10 | (strain Philadelphia 1 / ATCC 33152 / DSM 7513) UNIPROT IDS — artms_data_pathogen_LPN • artMS 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 45 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 59 | 60 | 61 | 62 | 63 | 70 | 71 | 72 | 73 | 74 | 75 |
    76 |
    77 | 128 | 129 | 130 | 131 |
    132 | 133 |
    134 |
    135 | 141 | 142 |
    143 |

    LPN PATHOGEN: Legionella pneumophila subsp. pneumophila 144 | (strain Philadelphia 1 / ATCC 33152 / DSM 7513) UNIPROT IDS

    145 |
    146 | 147 |
    artms_data_pathogen_LPN
    148 | 149 | 150 |

    Format

    151 | 152 |

    A data.frame of Entry IDs

    153 | 154 |
    155 | 160 |
    161 | 162 | 163 |
    164 | 167 | 168 |
    169 |

    Site built with pkgdown 1.6.1.

    170 |
    171 | 172 |
    173 |
    174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | -------------------------------------------------------------------------------- /docs/reference/artms_data_ph_msstats_results.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | MSstats results example — artms_data_ph_msstats_results • artMS 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 59 | 60 | 61 | 62 | 63 | 70 | 71 | 72 | 73 | 74 | 75 |
    76 |
    77 | 128 | 129 | 130 | 131 |
    132 | 133 |
    134 |
    135 | 140 | 141 |
    142 |

    Relative quantification results obtained running MSstats 143 | on the available PH datasets (global analysis). 144 | Changes in protein phosphorylation were quantified between two conditions 145 | (check artms_data_ph_contrast)

    146 |
    147 | 148 |
    artms_data_ph_msstats_results
    149 | 150 | 151 |

    Format

    152 | 153 |

    A data frame resulting from running the latest version of MSstats

    154 | 155 |
    156 | 161 |
    162 | 163 | 164 |
    165 | 168 | 169 |
    170 |

    Site built with pkgdown 1.6.1.

    171 |
    172 | 173 |
    174 |
    175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | -------------------------------------------------------------------------------- /R/evidenceToSaintExpressFormat.R: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------------ 2 | #' @title MaxQuant evidence file to SAINTexpress format 3 | #' 4 | #' @description Converts the MaxQuant evidence file to the 3 required files 5 | #' by SAINTexpress. One can choose to either use the `spectral counts` 6 | #' (use `msspc`) or the `intensities` (use `msint`) for the analysis. 7 | #' @param evidence_file (char) The evidence file path and name 8 | #' @param keys_file (char) Keys file with a SAINT column 9 | #' specifying test (`T`) and control (`C`) conditions 10 | #' @param output_file (char) Output file name (must have extension .txt) 11 | #' @param ref_proteome_file (char) Reference proteome path file name in 12 | #' fasta format 13 | #' @param quant_variable (char) choose either 14 | #' - `msspc` (spectral counts, default) or 15 | #' - `msint` (MS Intensity) 16 | #' @param verbose (logical) `TRUE` (default) shows function messages 17 | #' @return The 3 required files by SAINTexpress: 18 | #' - `interactions.txt` 19 | #' - `preys.txt` 20 | #' - `baits.txt` 21 | #' @keywords SAINT, SAINTexpress, APMS 22 | #' @examples 23 | #' # Testing that the files cannot be empty 24 | #' artmsEvidenceToSaintExpress(evidence_file = NULL, 25 | #' keys_file = NULL, ref_proteome_file = NULL) 26 | #' @export 27 | artmsEvidenceToSaintExpress <- function(evidence_file, 28 | keys_file, 29 | ref_proteome_file, 30 | quant_variable = c('msspc','msint'), 31 | output_file, 32 | verbose = TRUE) { 33 | if(verbose) message(">> CONVERTING TO SAINTexpress FORMAT ") 34 | 35 | if(is.null(evidence_file) & is.null(keys_file) & is.null(ref_proteome_file)){ 36 | return("The evidence_file, keys_file, and ref_proteome_file 37 | must not be empty") 38 | } 39 | 40 | if(any(missing(evidence_file) | 41 | missing(keys_file) | 42 | missing(ref_proteome_file) | 43 | missing(output_file))) 44 | stop("Missed (one or many) required argument(s) 45 | Please, check the help of this function to find out more") 46 | 47 | if (!grepl(".txt", output_file)) { 48 | stop( 49 | "Argument must have the extension '.txt'" 50 | ) 51 | } 52 | 53 | if(!file.exists(ref_proteome_file)){ 54 | stop("The file ", ref_proteome_file, " does not exist ") 55 | } 56 | 57 | x <- fread(evidence_file, integer64 = 'double') 58 | keys <- fread(keys_file, integer64 = 'double') 59 | 60 | # Check Raw.file column 61 | x <- .artms_checkRawFileColumnName(x) 62 | keys <- .artms_checkRawFileColumnName(keys) 63 | 64 | # Check MS.MS 65 | x <- .artms_checkMSMSColumnName(x) 66 | 67 | 68 | if(verbose) message('>> VERIFYING DATA AND KEYS ') 69 | if (any( 70 | !c( 71 | 'RawFile', 72 | 'IsotopeLabelType', 73 | 'Condition', 74 | 'BioReplicate', 75 | 'Run', 76 | 'SAINT' 77 | ) %in% colnames(keys) 78 | )) { 79 | stop( 80 | 'colnames in keys not conform to schema 81 | \tRawFile\tIsotopeLabelType\tCondition\tBioReplicate\tRun\tSAINT ' 82 | ) 83 | } 84 | 85 | saint_baits <- keys[, c('BioReplicate', 'Condition', 'SAINT'), with = FALSE] 86 | 87 | x <- artmsMergeEvidenceAndKeys(x, 88 | keys, 89 | by = c('RawFile'), 90 | verbose = verbose) 91 | 92 | data_f <- artmsFilterEvidenceContaminants(x = x, verbose = verbose) 93 | data_f <- .artms_removeMaxQProteinGroups(data_f) 94 | 95 | quant_variable <- match.arg(quant_variable) 96 | if(verbose) message(">> AGGREGATING ON ", quant_variable, " VALUES... ") 97 | ## aggregate over technical replicates if necessary 98 | if (quant_variable == 'msspc') { 99 | setnames(data_f, 'MS/MS Count', 'spectral_counts') 100 | data_f_agg <- 101 | aggregate( 102 | spectral_counts ~ BioReplicate+Condition+Proteins+Sequence+Charge, 103 | data = data_f, 104 | FUN = max 105 | ) 106 | data_f_agg <- 107 | aggregate( 108 | spectral_counts ~ BioReplicate + Condition + Proteins, 109 | data = data_f_agg, 110 | FUN = sum 111 | ) 112 | } else if (quant_variable == 'msint') { 113 | data_f_agg <- 114 | aggregate( 115 | Intensity ~ BioReplicate + Condition + Proteins + Sequence + Charge, 116 | data = data_f, 117 | FUN = max 118 | ) 119 | data_f_agg <- 120 | aggregate(Intensity ~ BioReplicate + Condition + Proteins, 121 | data = data_f_agg, 122 | FUN = sum) 123 | } else{ 124 | stop(" Wrong value for variable to quantify. 125 | Please use 'msspc' or 'msint'") 126 | } 127 | 128 | ## IP name, bait name, prey name, and spectral counts or intensity values 129 | saint_interactions <- data_f_agg 130 | 131 | ref_proteome <- read.fasta( 132 | file = ref_proteome_file, 133 | seqtype = "AA", 134 | as.string = TRUE, 135 | set.attributes = TRUE, 136 | legacy.mode = TRUE, 137 | seqonly = FALSE, 138 | strip.desc = FALSE 139 | ) 140 | p_lengths <- c() 141 | p_names <- c() 142 | for (e in ref_proteome) { 143 | p_lengths <- c(p_lengths, nchar(e[1])) 144 | p_names <- c(p_names, attr(e, 'name')) 145 | } 146 | ref_table <- data.table(names = p_names, lengths = p_lengths) 147 | ref_table[, uniprot_ac := gsub('([a-z,0-9,A-Z]+\\|{1})([A-Z,0-9,\\_]+)(\\|[A-Z,a-z,0-9,_]+)', 148 | '\\2', 149 | names)] 150 | ref_table[, uniprot_id := gsub('([a-z,0-9,A-Z]+\\|{1})([a-z,0-9,A-Z]+\\|{1})([A-Z,a-z,0-9,_]+)', 151 | '\\3', 152 | names)] 153 | 154 | unique_preys <- data.table(uniprot_ac = unique(data_f_agg$Proteins)) 155 | saint_preys <- ref_table[, c('uniprot_ac', 'lengths', 'uniprot_id'), 156 | with = FALSE] 157 | saint_preys <- merge(unique_preys, saint_preys, by = 'uniprot_ac', 158 | all.x = TRUE) 159 | missing_lengths <- nrow(saint_preys[is.na(saint_preys$uniprot_id), ]) 160 | saint_preys[is.na(saint_preys$uniprot_id), ]$uniprot_id = saint_preys[is.na(saint_preys$uniprot_id), ]$uniprot_ac 161 | if (missing_lengths > 0) { 162 | if(verbose) 163 | message( 164 | sprintf( 165 | "--- WARNING! COMPUTING %s MISSING LENGTHS WITH THE MEDIAN LENGTH FROM THE DATASET ", 166 | missing_lengths)) 167 | saint_preys[is.na(saint_preys$lengths), ]$lengths = median(saint_preys$lengths, na.rm = TRUE) 168 | } 169 | 170 | ## WRITE 171 | write.table( 172 | saint_baits, 173 | file = gsub('.txt', '-saint-baits.txt', output_file), 174 | eol = '\n', 175 | sep = '\t', 176 | quote = FALSE, 177 | row.names = FALSE, 178 | col.names = FALSE 179 | ) 180 | write.table( 181 | saint_preys, 182 | file = gsub('.txt', '-saint-preys.txt', output_file), 183 | eol = '\n', 184 | sep = '\t', 185 | quote = FALSE, 186 | row.names = FALSE, 187 | col.names = FALSE 188 | ) 189 | write.table( 190 | saint_interactions, 191 | file = gsub('.txt', '-saint-interactions.txt', output_file), 192 | eol = '\n', 193 | sep = '\t', 194 | quote = FALSE, 195 | row.names = FALSE, 196 | col.names = FALSE 197 | ) 198 | if(verbose){ 199 | message(">> OUTPUT FILES: ") 200 | message("--- ", gsub('.txt', '-saint-baits.txt', output_file)) 201 | message("--- ", gsub('.txt', '-saint-preys.txt', output_file)) 202 | message("--- ", gsub('.txt', '-saint-interactions.txt', output_file)) 203 | } 204 | } 205 | --------------------------------------------------------------------------------