Skip to content

Commit

Permalink
Merge branch 'master' of github.com:bartongroup/Proteus
Browse files Browse the repository at this point in the history
  • Loading branch information
MarekGierlinski committed Jun 19, 2019
2 parents d7914ff + e124916 commit cbb2c7f
Show file tree
Hide file tree
Showing 20 changed files with 52 additions and 2,727 deletions.
2 changes: 2 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
^Meta$
^doc$
^.*\.Rproj$
^\.Rproj\.user$
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
Meta
doc
.Rproj.user
.Rhistory
.RData
Expand Down
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: proteus
Type: Package
Title: Downstream analysis of the MaxQuant output
Version: 0.2.8
Version: 0.2.12
Depends: R (>= 3.4)
Authors@R: c(
person("Marek", "Gierlinski", email="[email protected]", role=c("aut", "cre")),
Expand All @@ -16,7 +16,7 @@ URL: https://github.com/bartongroup/Proteus
License: GPL-2
Encoding: UTF-8
LazyData: true
RoxygenNote: 6.1.0
RoxygenNote: 6.1.1
Imports:
dplyr,
reshape2,
Expand Down
21 changes: 19 additions & 2 deletions R/func.R
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,10 @@ proteusData <- function(tab, metadata, content, pep2prot, peptides, proteins, me
}

# number of replicates in each condition
cnd <- metadata$condition
cnd.fac <- as.factor(cnd)
cnd <- as.character(metadata$condition)
cnd.fac <- factor(cnd)
nrep <- tapply(cnd, cnd.fac, length) # nice trick
metadata$condition <- cnd.fac

pdat <- list(
tab = tab,
Expand Down Expand Up @@ -257,9 +258,11 @@ readColumnNames <- function(file) {
#' @return Data frame with selected columns from the evidence file.
#'
#' @examples
#' \dontrun{
#' library(proteusLabelFree)
#' evidenceFile <- system.file("extdata", "evidence.txt.gz", package="proteusLabelFree")
#' evi <- readEvidenceFile(evidenceFile)
#' }
#'
#' @export
readEvidenceFile <- function(file, measure.cols=measureColumns, data.cols=evidenceColumns, zeroes.are.missing=TRUE) {
Expand Down Expand Up @@ -445,9 +448,11 @@ parameterString <- function(...) {
#' metadata.
#'
#' @examples
#' \dontrun{
#' library(proteusLabelFree)
#' data(proteusLabelFree)
#' pepdat <- makePeptideTable(evi, meta, ncores=2)
#' }
#'
#' @export
makePeptideTable <- function(evi, meta, sequence.col=c("sequence", "modified_sequence"),
Expand All @@ -459,6 +464,12 @@ makePeptideTable <- function(evi, meta, sequence.col=c("sequence", "modified_seq
protein.col <- match.arg(protein.col)
experiment.type <- match.arg(experiment.type)

# mclapply doesn't work on Windows, so force 1 core
if(Sys.info()[['sysname']] == "Windows") {
ncores <- 1
warning("Multicore processing not available in Windows. Using ncores=1")
}

# check if measure.cols, sequence.col and protein.col are in the evidence file
measures <- names(measure.cols)
for(col in c(measures, sequence.col, protein.col)) {
Expand Down Expand Up @@ -604,6 +615,12 @@ makeProteinTable <- function(pepdat, aggregate.fun=aggregateHifly, ...,
min.peptides=2, ncores=4) {
if(!is(pepdat, "proteusData")) stop ("Input data must be of class proteusData.")

# mclapply doesn't work on Windows, so force 1 core
if(Sys.info()[['sysname']] == "Windows") {
ncores <- 1
warning("Multicore processing not available in Windows. Using ncores=1")
}

meta <- pepdat$metadata
tab <- pepdat$tab

Expand Down
1 change: 1 addition & 0 deletions R/live.R
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ jitterPlot <- function(tab, input, pdat, max_points) {
{if(n > 1) geom_errorbar(position=pd, width = 0.1)} +
scale_shape_identity() + # necessary for shape mapping
viridis::scale_fill_viridis(discrete=TRUE) +
theme(axis.text.x = element_text(angle = 90, hjust = 1, vjust=0.5)) +
{if (input$intensityScale == 'Log') labs(x = 'Condition', y = 'Log Intensity') else labs(x = 'Condition', y = 'Intensity')}
}
})
Expand Down
18 changes: 14 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
Proteus can be installed directly from GitHub. First, you need to install BioConductor and limma:

```r
source("https://bioconductor.org/biocLite.R")
biocLite()
biocLite("limma")
install.packages("BiocManager")
BiocManager::install()
BiocManager::install("limma")
```

You also need devtools:
Expand All @@ -29,7 +29,7 @@ devtools::install_github("bartongroup/proteusSILAC")
Finally, you can install proteus:

```r
devtools::install_github("bartongroup/Proteus", build_vignettes = TRUE)
devtools::install_github("bartongroup/Proteus", build_opts= c("--no-resave-data", "--no-manual"), build_vignettes=TRUE)
```

Note: use `build_vignettes = FALSE` if you run into problems with vignettes installation.
Expand All @@ -48,3 +48,13 @@ There are additional, shorter vignettes, showing the specifics of using *Proteus
vignette("TMT", package="proteus")
vignette("SILAC", package="proteus")
```

If, for some reason, you cannot build vignettes, copies are available online:

- [Proteus](http://www.compbio.dundee.ac.uk/user/mgierlinski/proteus/proteus.html)
- [SILAC](http://www.compbio.dundee.ac.uk/user/mgierlinski/proteus/SILAC.html)
- [TMT](http://www.compbio.dundee.ac.uk/user/mgierlinski/proteus/TMT.html)

## Application note

The article about this package can be found on [BioRxiv](https://www.biorxiv.org/content/early/2018/09/20/416511).
86 changes: 0 additions & 86 deletions inst/doc/SILAC.R

This file was deleted.

Loading

0 comments on commit cbb2c7f

Please sign in to comment.