diff --git a/.Rbuildignore b/.Rbuildignore index 91114bf..9b5b641 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -1,2 +1,4 @@ +^Meta$ +^doc$ ^.*\.Rproj$ ^\.Rproj\.user$ diff --git a/.gitignore b/.gitignore index 5b6a065..24b108a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ +Meta +doc .Rproj.user .Rhistory .RData diff --git a/DESCRIPTION b/DESCRIPTION index 879dcef..4763295 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: proteus Type: Package Title: Downstream analysis of the MaxQuant output -Version: 0.2.10 +Version: 0.2.11 Depends: R (>= 3.4) Authors@R: c( person("Marek", "Gierlinski", email="M.Gierlinski@dundee.ac.uk", role=c("aut", "cre")), diff --git a/R/func.R b/R/func.R index 152ccd2..c7928d0 100644 --- a/R/func.R +++ b/R/func.R @@ -258,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) { @@ -446,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"), @@ -460,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)) { @@ -605,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 diff --git a/man/makePeptideTable.Rd b/man/makePeptideTable.Rd index f20f9cd..95c3c05 100644 --- a/man/makePeptideTable.Rd +++ b/man/makePeptideTable.Rd @@ -91,8 +91,10 @@ evidence data. This makes selection of samples for downstream processing easy: select only required rows in the metadata data frame. } \examples{ +\dontrun{ library(proteusLabelFree) data(proteusLabelFree) pepdat <- makePeptideTable(evi, meta, ncores=2) +} } diff --git a/man/readEvidenceFile.Rd b/man/readEvidenceFile.Rd index 663b6be..6d2bf4b 100644 --- a/man/readEvidenceFile.Rd +++ b/man/readEvidenceFile.Rd @@ -35,8 +35,10 @@ There are two default lists, supplied with the package, appropriate for an label-free experiment, \code{measureColumns} and \code{evidenceColumns}. } \examples{ +\dontrun{ library(proteusLabelFree) evidenceFile <- system.file("extdata", "evidence.txt.gz", package="proteusLabelFree") evi <- readEvidenceFile(evidenceFile) +} } diff --git a/vignettes/proteus.Rmd b/vignettes/proteus.Rmd index d42e620..11adb44 100644 --- a/vignettes/proteus.Rmd +++ b/vignettes/proteus.Rmd @@ -38,6 +38,7 @@ data(proteusLabelFree) Here is a minimal example of data analysis in *Proteus*. You will need the evidence file from *MaxQuant* and a very simple text file with metadata (see below how to create it). Then, you can get from the evidence file to differential expression in just a few steps. ```{r quick_start, eval=FALSE} +library(proteus) evidenceFile <- system.file("extdata", "evidence.txt.gz", package="proteusLabelFree") metadataFile <- system.file("extdata", "metadata.txt", package="proteusLabelFree")