Skip to content

Commit

Permalink
Merge pull request #9 from fmicompbio/add-seq
Browse files Browse the repository at this point in the history
Add sequence windows
  • Loading branch information
csoneson committed Jul 2, 2023
2 parents f1e5580 + 87c5e59 commit 27eb897
Show file tree
Hide file tree
Showing 112 changed files with 3,100 additions and 1,201 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
config:
- { os: macOS-latest, bioc: 'release', curlConfigPath: '/usr/bin/'}
- { os: windows-latest, bioc: 'release'}
- { os: ubuntu-latest, image: "bioconductor/bioconductor_docker:RELEASE_3_16", cran: "https://demo.rstudiopm.com/all/__linux__/xenial/latest"}
- { os: ubuntu-latest, image: "bioconductor/bioconductor_docker:RELEASE_3_17", cran: "https://demo.rstudiopm.com/all/__linux__/xenial/latest"}

env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
Expand Down
12 changes: 9 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: einprot
Type: Package
Title: A collection of proteomics analysis utilities and workflows
Version: 0.7.1
Version: 0.7.4
Authors@R: c(
person("Charlotte", "Soneson", email = "charlotte.soneson@fmi.ch",
role = c("aut", "cre"), comment = c(ORCID = "0000-0003-3833-2169")),
Expand All @@ -12,7 +12,7 @@ Authors@R: c(
role = c("cph")))
Description: The einprot package contains utilities for performing analysis
of proteomics data. It provides end-to-end analysis workflows for data
quantified using MaxQuant and Proteome Discoverer, as well as
quantified using MaxQuant, FragPipe and Proteome Discoverer. It also has
functionality for assembling databases of known protein complexes.
License: MIT + file LICENSE
Encoding: UTF-8
Expand Down Expand Up @@ -70,7 +70,12 @@ Imports:
tidyselect,
GGally,
scuttle,
stringdist
stringdist,
shiny,
writexl,
tools,
grid,
ggseqlogo
RoxygenNote: 7.2.3
Suggests:
BiocManager,
Expand All @@ -79,3 +84,4 @@ Suggests:
matrixStats
Config/testthat/edition: 3
VignetteBuilder: knitr
biocViews: Proteomics, DataImport
26 changes: 26 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export(filterFragPipe)
export(filterMaxQuant)
export(filterPDTMT)
export(fixFeatureIds)
export(formatTableColumns)
export(getCalibrationFrompdAnalysis)
export(getColumnNames)
export(getContaminantsDatabaseFrompdAnalysis)
Expand All @@ -34,6 +35,8 @@ export(getUniProtToIDMapping)
export(getValidationInfoFrompdAnalysis)
export(importExperiment)
export(listComplexDBs)
export(makeAbundanceExport)
export(makeAbundanceHeatmap)
export(makeComplexDB)
export(makeDbLinkTable)
export(makeIntensityBoxplots)
Expand Down Expand Up @@ -61,14 +64,17 @@ export(runPDTMTptmAnalysis)
export(runPTMTest)
export(runTest)
export(saText)
export(seqLogoApp)
export(testText)
import(STRINGdb)
importFrom(BiocSingular,ExactParam)
importFrom(ComplexHeatmap,Heatmap)
importFrom(ComplexHeatmap,columnAnnotation)
importFrom(ComplexHeatmap,draw)
importFrom(ComplexUpset,upset)
importFrom(DT,DTOutput)
importFrom(DT,datatable)
importFrom(DT,renderDT)
importFrom(ExploreModelMatrix,VisualizeDesign)
importFrom(GGally,ggpairs)
importFrom(IRanges,CharacterList)
Expand Down Expand Up @@ -108,6 +114,7 @@ importFrom(dplyr,everything)
importFrom(dplyr,filter)
importFrom(dplyr,full_join)
importFrom(dplyr,group_by)
importFrom(dplyr,if_any)
importFrom(dplyr,last_col)
importFrom(dplyr,left_join)
importFrom(dplyr,matches)
Expand Down Expand Up @@ -157,6 +164,7 @@ importFrom(ggplot2,geom_smooth)
importFrom(ggplot2,geom_text)
importFrom(ggplot2,geom_vline)
importFrom(ggplot2,ggplot)
importFrom(ggplot2,ggsave)
importFrom(ggplot2,ggtitle)
importFrom(ggplot2,labs)
importFrom(ggplot2,layer_data)
Expand All @@ -174,8 +182,11 @@ importFrom(ggplot2,theme)
importFrom(ggplot2,theme_bw)
importFrom(ggplot2,theme_minimal)
importFrom(ggrepel,geom_text_repel)
importFrom(ggseqlogo,ggseqlogo)
importFrom(ggseqlogo,theme_logo)
importFrom(grDevices,dev.off)
importFrom(grDevices,pdf)
importFrom(grid,gpar)
importFrom(htmltools,tagList)
importFrom(iSEEu,registerAveAbFields)
importFrom(iSEEu,registerFeatureSetCollections)
Expand Down Expand Up @@ -215,6 +226,18 @@ importFrom(scales,percent)
importFrom(scales,percent_format)
importFrom(scater,runPCA)
importFrom(scuttle,makePerCellDF)
importFrom(shiny,downloadButton)
importFrom(shiny,downloadHandler)
importFrom(shiny,fluidPage)
importFrom(shiny,mainPanel)
importFrom(shiny,plotOutput)
importFrom(shiny,reactive)
importFrom(shiny,renderPlot)
importFrom(shiny,renderText)
importFrom(shiny,shinyApp)
importFrom(shiny,sidebarLayout)
importFrom(shiny,sidebarPanel)
importFrom(shiny,textOutput)
importFrom(stats,median)
importFrom(stats,model.matrix)
importFrom(stats,p.adjust)
Expand All @@ -231,6 +254,7 @@ importFrom(tidyr,pivot_wider)
importFrom(tidyr,separate_rows)
importFrom(tidyr,unnest)
importFrom(tidyselect,any_of)
importFrom(tools,file_ext)
importFrom(utils,combn)
importFrom(utils,download.file)
importFrom(utils,head)
Expand All @@ -241,6 +265,8 @@ importFrom(utils,stack)
importFrom(utils,tail)
importFrom(utils,unzip)
importFrom(utils,write.table)
importFrom(utils,zip)
importFrom(writexl,write_xlsx)
importFrom(xfun,Rscript_call)
importFrom(xml2,read_xml)
importFrom(xml2,xml_attr)
Expand Down
22 changes: 22 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
# einprot 0.7.4

* Add argument to allow limiting the labeling to only features with positive/negative logFCs
* Add function to generate heatmaps
* Add function to create summary of abundance values for significant features
* Add argument to define the assays(s) to use for exported values and barplots
* Harmonize treatment of merged groups in runTest and plotVolcano
* Sort exported test results by p-value instead of logFC

# einprot 0.7.3

* Combine download buttons and pagelength selection for tables
* Add check and stop if no features are left after filtering

# einprot 0.7.2

* Add option to export link table to csv
* Add summary table with sequence windows to PTM workflow
* Add shiny app to generate sequence logos for PTMs
* Add link to workflow overview in table of contents
* Include link to top feature sets for each comparison in table of contents

# einprot 0.7.1

* Add scale and subset_row arguments to doPCA
Expand Down
13 changes: 11 additions & 2 deletions R/addSampleAnnots.R
Original file line number Diff line number Diff line change
@@ -1,24 +1,33 @@
#' Add sample annotations to SummarizedExperiment object
#'
#' Add sample annotations from an external annotation table to an existing
#' `SummarizedExperiment` object.
#'
#' @param sce A \code{SummarizedExperiment} object (or a derivative).
#' @param sampleAnnot A \code{data.frame} with sample annotations. Must
#' have at least columns named \code{sample} (which must contain
#' all the column names of \code{sce}) and \code{group} (which contains
#' the group assignment for each sample).
#'
#' @return An object of the same type as \code{sce} with additional sample
#' @returns An object of the same type as \code{sce} with additional sample
#' annotations.
#'
#' @examples
#' ## Import example data
#' mqFile <- system.file("extdata", "mq_example", "1356_proteinGroups.txt",
#' package = "einprot")
#' samples <- c("Adnp_IP04", "Adnp_IP05", "Adnp_IP06",
#' "Chd4BF_IP07", "Chd4BF_IP08", "Chd4BF_IP09",
#' "RBC_ctrl_IP01", "RBC_ctrl_IP02", "RBC_ctrl_IP03")
#' out <- importExperiment(inFile = mqFile, iColPattern = "^iBAQ\\.",
#' includeOnlySamples = samples)
#'
#' ## Define sample annotations
#' sampleAnnot <- data.frame(sample = samples,
#' group = gsub("_IP.*", "", samples))
#' group = gsub("_IP.*", "", samples),
#' random = sample(seq_len(9), 9))
#'
#' ## Add sample annotations to SCE
#' sce <- addSampleAnnots(out$sce, sampleAnnot = sampleAnnot)
#' SummarizedExperiment::colData(sce) ## group information added to sce
#'
Expand Down
22 changes: 14 additions & 8 deletions R/checkArgumentsFragPipe.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
templateRmd, outputDir, outputBaseName, reportTitle, reportAuthor,
forceOverwrite, experimentInfo, species, fragpipeDir,
idCol, labelCol, geneIdCol, proteinIdCol, stringIdCol,
iColPattern, sampleAnnot, includeOnlySamples,
excludeSamples, minScore, minPeptides, imputeMethod, mergeGroups,
iColPattern, sampleAnnot, includeOnlySamples, excludeSamples, minScore,
minPeptides, imputeMethod, assaysForExport, mergeGroups,
comparisons, ctrlGroup, allPairwiseComparisons, singleFit,
subtractBaseline, baselineGroup, normMethod, spikeFeatures, stattest,
minNbrValidValues, minlFC, samSignificance, nperm, volcanoAdjPvalThr,
volcanoLog2FCThr, volcanoMaxFeatures, volcanoS0, volcanoFeaturesToLabel,
addInteractiveVolcanos, interactiveDisplayColumns, interactiveGroupColumn,
complexFDRThr, maxNbrComplexesToPlot, seed,
volcanoLog2FCThr, volcanoMaxFeatures, volcanoLabelSign, volcanoS0,
volcanoFeaturesToLabel, addInteractiveVolcanos, interactiveDisplayColumns,
interactiveGroupColumn, complexFDRThr, maxNbrComplexesToPlot, seed,
includeFeatureCollections, minSizeToKeepSet, customComplexes,
complexSpecies, complexDbPath, stringVersion, stringDir, linkTableColumns,
customYml, doRender
Expand Down Expand Up @@ -135,6 +135,7 @@
## Method choices
.assertScalar(x = imputeMethod, type = "character",
validValues = c("impSeqRob", "MinProb"))
.assertVector(x = assaysForExport, type = "character", allowNULL = TRUE)
.assertScalar(x = normMethod, type = "character",
validValues = c(MsCoreUtils::normalizeMethods(), "none"))
.assertVector(x = spikeFeatures, type = "character", allowNULL = TRUE)
Expand All @@ -149,18 +150,23 @@
.assertScalar(x = volcanoAdjPvalThr, type = "numeric", rngIncl = c(0, 1))
.assertScalar(x = volcanoLog2FCThr, type = "numeric", rngIncl = c(0, Inf))
.assertScalar(x = volcanoMaxFeatures, type = "numeric", rngIncl = c(0, Inf))
.assertScalar(x = volcanoLabelSign, type = "character",
validValues = c("both", "pos", "neg"))
.assertScalar(x = volcanoS0, type = "numeric", rngIncl = c(0, Inf))
.assertScalar(x = complexFDRThr, type = "numeric", rngIncl = c(0, 1))
.assertScalar(x = maxNbrComplexesToPlot, type = "numeric", rngIncl = c(0, Inf))
.assertScalar(x = maxNbrComplexesToPlot, type = "numeric",
rngIncl = c(0, Inf))
.assertScalar(x = minSizeToKeepSet, type = "numeric", rngIncl = c(0, Inf))
.assertVector(x = volcanoFeaturesToLabel, type = "character")
.assertVector(x = mergeGroups, type = "list")
.assertVector(x = comparisons, type = "list")
.assertScalar(x = ctrlGroup, type = "character")
.assertScalar(x = allPairwiseComparisons, type = "logical")
.assertScalar(x = addInteractiveVolcanos, type = "logical")
.assertVector(x = interactiveDisplayColumns, type = "character", allowNULL = TRUE)
.assertScalar(x = interactiveGroupColumn, type = "character", allowNULL = TRUE)
.assertVector(x = interactiveDisplayColumns, type = "character",
allowNULL = TRUE)
.assertScalar(x = interactiveGroupColumn, type = "character",
allowNULL = TRUE)
.assertScalar(x = singleFit, type = "logical")
.assertScalar(x = subtractBaseline, type = "logical")
.assertScalar(x = baselineGroup, type = "character")
Expand Down
22 changes: 14 additions & 8 deletions R/checkArgumentsMaxQuant.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
templateRmd, outputDir, outputBaseName, reportTitle, reportAuthor,
forceOverwrite, experimentInfo, species, mqFile, mqParameterFile,
idCol, labelCol, geneIdCol, proteinIdCol, stringIdCol,
iColPattern, sampleAnnot, includeOnlySamples,
excludeSamples, minScore, minPeptides, imputeMethod, mergeGroups,
iColPattern, sampleAnnot, includeOnlySamples, excludeSamples, minScore,
minPeptides, imputeMethod, assaysForExport, mergeGroups,
comparisons, ctrlGroup, allPairwiseComparisons, singleFit,
subtractBaseline, baselineGroup, normMethod, spikeFeatures, stattest,
minNbrValidValues, minlFC, samSignificance, nperm, volcanoAdjPvalThr,
volcanoLog2FCThr, volcanoMaxFeatures, volcanoS0, volcanoFeaturesToLabel,
addInteractiveVolcanos, interactiveDisplayColumns, interactiveGroupColumn,
complexFDRThr, maxNbrComplexesToPlot, seed,
volcanoLog2FCThr, volcanoMaxFeatures, volcanoLabelSign, volcanoS0,
volcanoFeaturesToLabel, addInteractiveVolcanos, interactiveDisplayColumns,
interactiveGroupColumn, complexFDRThr, maxNbrComplexesToPlot, seed,
includeFeatureCollections, minSizeToKeepSet, customComplexes,
complexSpecies, complexDbPath, stringVersion, stringDir, linkTableColumns,
customYml, doRender
Expand Down Expand Up @@ -120,6 +120,7 @@
## Method choices
.assertScalar(x = imputeMethod, type = "character",
validValues = c("impSeqRob", "MinProb"))
.assertVector(x = assaysForExport, type = "character", allowNULL = TRUE)
.assertScalar(x = normMethod, type = "character",
validValues = c(MsCoreUtils::normalizeMethods(), "none"))
.assertVector(x = spikeFeatures, type = "character", allowNULL = TRUE)
Expand All @@ -134,18 +135,23 @@
.assertScalar(x = volcanoAdjPvalThr, type = "numeric", rngIncl = c(0, 1))
.assertScalar(x = volcanoLog2FCThr, type = "numeric", rngIncl = c(0, Inf))
.assertScalar(x = volcanoMaxFeatures, type = "numeric", rngIncl = c(0, Inf))
.assertScalar(x = volcanoLabelSign, type = "character",
validValues = c("both", "pos", "neg"))
.assertScalar(x = volcanoS0, type = "numeric", rngIncl = c(0, Inf))
.assertScalar(x = complexFDRThr, type = "numeric", rngIncl = c(0, 1))
.assertScalar(x = maxNbrComplexesToPlot, type = "numeric", rngIncl = c(0, Inf))
.assertScalar(x = maxNbrComplexesToPlot, type = "numeric",
rngIncl = c(0, Inf))
.assertScalar(x = minSizeToKeepSet, type = "numeric", rngIncl = c(0, Inf))
.assertVector(x = volcanoFeaturesToLabel, type = "character")
.assertVector(x = mergeGroups, type = "list")
.assertVector(x = comparisons, type = "list")
.assertScalar(x = ctrlGroup, type = "character")
.assertScalar(x = allPairwiseComparisons, type = "logical")
.assertScalar(x = addInteractiveVolcanos, type = "logical")
.assertVector(x = interactiveDisplayColumns, type = "character", allowNULL = TRUE)
.assertScalar(x = interactiveGroupColumn, type = "character", allowNULL = TRUE)
.assertVector(x = interactiveDisplayColumns, type = "character",
allowNULL = TRUE)
.assertScalar(x = interactiveGroupColumn, type = "character",
allowNULL = TRUE)
.assertScalar(x = singleFit, type = "logical")
.assertScalar(x = subtractBaseline, type = "logical")
.assertScalar(x = baselineGroup, type = "character")
Expand Down
Loading

0 comments on commit 27eb897

Please sign in to comment.