[med-svn] [r-bioc-protgenerics] 01/02: New upstream version 1.8.0
Andreas Tille
tille at debian.org
Thu Oct 19 20:25:50 UTC 2017
This is an automated email from the git hooks/post-receive script.
tille pushed a commit to branch master
in repository r-bioc-protgenerics.
commit b6a83fe2128fb59b07d8a1ef3d71efe7ad79e640
Author: Andreas Tille <tille at debian.org>
Date: Thu Oct 19 22:25:14 2017 +0200
New upstream version 1.8.0
---
DESCRIPTION | 13 +++++
NAMESPACE | 20 +++++++
NEWS | 61 +++++++++++++++++++++
R/protgenerics.R | 24 ++++++++
README.md | 147 +++++++++++++++++++++++++++++++++++++++++++++++++
man/protgenerics.Rd | 155 ++++++++++++++++++++++++++++++++++++++++++++++++++++
6 files changed, 420 insertions(+)
diff --git a/DESCRIPTION b/DESCRIPTION
new file mode 100644
index 0000000..2c80643
--- /dev/null
+++ b/DESCRIPTION
@@ -0,0 +1,13 @@
+Package: ProtGenerics
+Title: S4 generic functions for Bioconductor proteomics infrastructure
+Description: S4 generic functions needed by Bioconductor proteomics
+ packages.
+Version: 1.8.0
+Author: Laurent Gatto <lg390 at cam.ac.uk>
+Maintainer: Laurent Gatto <lg390 at cam.ac.uk>
+biocViews: Infrastructure, Proteomics, MassSpectrometry
+URL: https://github.com/lgatto/ProtGenerics
+Depends: methods
+License: Artistic-2.0
+NeedsCompilation: no
+Packaged: 2017-04-25 00:08:05 UTC; biocbuild
diff --git a/NAMESPACE b/NAMESPACE
new file mode 100644
index 0000000..2d5be34
--- /dev/null
+++ b/NAMESPACE
@@ -0,0 +1,20 @@
+import(methods)
+
+export(psms,
+ peaks,
+ modifications,
+ database,
+ rtime,
+ tic,
+ spectra,
+ intensity,
+ mz, "mz<-",
+ peptides,
+ proteins,
+ accessions,
+ scans,
+ mass,
+ ions,
+ chromatograms,
+ chromatogram,
+ isCentroided)
diff --git a/NEWS b/NEWS
new file mode 100644
index 0000000..5e405a3
--- /dev/null
+++ b/NEWS
@@ -0,0 +1,61 @@
+CHANGES IN VERSION 1.5.1
+------------------------
+ o added isCentroided generic <2016-07-23 Sat>
+
+CHANGES IN VERSION 1.5.0
+------------------------
+ o Version bump Bioc devel
+
+CHANGES IN VERSION 1.4.0
+------------------------
+ o Version bump Bioc 3.3
+
+CHANGES IN VERSION 1.3.3
+------------------------
+ o exporting mz<- generic <2015-10-19 Mon>
+
+CHANGES IN VERSION 1.3.2
+------------------------
+ o Not depending on BiocGenerics <2015-10-16 Fri>
+
+CHANGES IN VERSION 1.3.1
+------------------------
+ o added chomatogram generic (previously defined in MSnbase)
+ <2015-10-15 Thu>
+
+CHANGES IN VERSION 1.3.0
+------------------------
+ o Bioc release 3.3
+
+CHANGES IN VERSION 1.2.0
+------------------------
+ o Bioc release 3.2
+
+CHANGES IN VERSION 1.1.1
+------------------------
+ o new mz<- generic function <2015-10-01 Thu>
+
+CHANGES IN VERSION 1.1.0
+------------------------
+ o Bioc devel version 3.2
+
+CHANGES IN VERSION 1.0.0
+------------------------
+ o Bioc release version 3.1
+
+CHANGES IN VERSION 0.99.3
+-------------------------
+ o update man with when and why ProtGenerics [2015-03-16 Mon]
+
+CHANGES IN VERSION 0.99.2
+-------------------------
+ o updating DESCRIPTION as with BiocContributions::clean
+ [2015-03-03 Tue]
+
+CHANGES IN VERSION 0.99.1
+-------------------------
+ o Adding NEWS file [2015-02-27 Fri]
+
+CHANGES IN VERSION 0.99.0
+-------------------------
+ o adding ProtGenerics to Manifest
diff --git a/R/protgenerics.R b/R/protgenerics.R
new file mode 100644
index 0000000..6e11659
--- /dev/null
+++ b/R/protgenerics.R
@@ -0,0 +1,24 @@
+## from mzR
+setGeneric("psms", function(object, ...) standardGeneric("psms"))
+setGeneric("peaks", function(object, ...) standardGeneric("peaks"))
+setGeneric("modifications", function(object, ...) standardGeneric("modifications"))
+setGeneric("database", function(object, ...) standardGeneric("database"))
+
+## from MSnbase
+setGeneric("rtime", function(object, ...) standardGeneric("rtime"))
+setGeneric("tic", function(object, ...) standardGeneric("tic"))
+setGeneric("spectra", function(object, ...) standardGeneric("spectra"))
+setGeneric("intensity", function(object, ...) standardGeneric("intensity"))
+setGeneric("mz", function(object, ...) standardGeneric("mz"))
+
+## new
+setGeneric("peptides", function(object, ...) standardGeneric("peptides"))
+setGeneric("proteins", function(object, ...) standardGeneric("proteins"))
+setGeneric("accessions", function(object, ...) standardGeneric("accessions"))
+setGeneric("scans", function(object, ...) standardGeneric("scans"))
+setGeneric("mass", function(object, ...) standardGeneric("mass"))
+setGeneric("ions", function(object, ...) standardGeneric("ions"))
+setGeneric("chromatograms", function(object, ...) standardGeneric("chromatograms"))
+setGeneric("chromatogram", function(object, ...) standardGeneric("chromatogram"))
+setGeneric("mz<-", function(object, value) standardGeneric("mz<-"))
+setGeneric("isCentroided", function(object, ...) standardGeneric("isCentroided"))
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..916c07e
--- /dev/null
+++ b/README.md
@@ -0,0 +1,147 @@
+<!-- README.md is generated from README.Rmd. Please edit that file -->
+
+
+
+# S4 generic functions for Bioconductor proteomics infrastructure
+
+## Description:
+
+These generic functions provide basic interfaces to operations on and
+data access to proteomics and mass spectrometry infrastructure in the
+Bioconductor project.
+
+For the details, please consult the respective methods' manual pages.
+
+## Usage:
+
+```r
+psms(object, ...)
+peaks(object, ...)
+modifications(object, ...)
+database(object, ...)
+rtime(object, ...)
+tic(object, ...)
+spectra(object, ...)
+intensity(object, ...)
+mz(object, ...)
+peptides(object, ...)
+proteins(object, ...)
+accessions(object, ...)
+scans(object, ...)
+mass(object, ...)
+ions(object, ...)
+chromatograms(object, ...)
+chromatogram(object, ...)
+isCentroided(object, ...)
+```
+
+## Arguments:
+
+- `object`: Object of class for which methods are defined.
+- `...`: Further arguments, possibly used by downstream methods.
+
+## Details:
+
+### When should one define a generics?:
+
+Generics are appropriate for functions that have _generic_
+names, i.e. names that occur in multiple circumstances, (with
+different input classes, most often defined in different
+packages) or, when (multiple) dispatching is better handled by
+the generics mechanism rather than the developer. The
+dispatching mechanism will then automatically call the
+appropriate method and save the user from explicitly calling
+`package::method` or the developer to handle the multiple input
+types cases. When no such conflict exists or is unlikely to
+happen (for example when the name of the function is specific to
+a package or domain, or for class slots accessors and
+replacement methods), the usage of a generic is arguably
+questionable, and in most of these cases, simple,
+straightforward functions would be perfectly valid.
+
+### When to define a generic in `ProtGenerics`?:
+
+`ProtGenerics` is not meant to be the central package for generics,
+nor should it stop developers from defining the generics they need. It
+is a means to centralise generics that are defined in different
+packages (for example `mzR::psms` and `mzID::psms`, or
+`IRanges::score` and `mzR::score`, now `BioGenerics::score`) or
+generics that live in a rather big package (say `mzR`) on which one
+wouldn't want to depend just for the sake of that generics'
+definition.
+
+The goal of `ProtGenerics` is to step in when namespace conflicts
+arise so as to to facilitate inter-operability of packages. In case
+such conflict appears due to multiple generics, we would (1) add these
+same definitions in `ProtGenerics`, (2) remove the definitions from
+the packages they stem from, which then (3) only need to import
+`ProtGenerics`. This would be very minor/straightforward changes for
+the developers and would resolve issues when they arise.
+
+More generics can be added on request by opening an issue or sending a
+pull request on:
+
+[https://github.com/lgatto/ProtGenerics](https://github.com/lgatto/ProtGenerics)
+
+## Author(s):
+
+Laurent Gatto <lg390 at cam.ac.uk>
+
+## See Also:
+
+- The `BiocGenerics` package for S4 generic functions needed by many
+ Bioconductor packages.
+- `showMethods` for displaying a summary of the methods defined for a
+ given generic function.
+- `selectMethod` for getting the definition of a specific method.
+- `setGeneric` and `setMethod` for defining generics and methods.
+
+## Examples:
+
+
+```r
+library("ProtGenerics")
+## List all the symbols defined in this package:
+ls('package:ProtGenerics')
+## [1] "accessions" "chromatogram" "chromatograms" "database"
+## [5] "intensity" "ions" "mass" "modifications"
+## [9] "mz" "mz<-" "peaks" "peptides"
+## [13] "proteins" "psms" "rtime" "scans"
+## [17] "spectra" "tic"
+
+library("mzR")
+## Loading required package: Rcpp
+## What methods exists for 'peaks'
+showMethods("peaks")
+## Function: peaks (package ProtGenerics)
+## object="mzRnetCDF"
+## object="mzRpwiz"
+## object="mzRramp"
+
+## To look at one method in particular
+getMethod("peaks", "mzRpwiz")
+## Method Definition:
+##
+## function (object, ...)
+## {
+## .local <- function (object, scans)
+## {
+## if (missing(scans))
+## scans <- 1:length(object)
+## if (length(scans) == 1) {
+## return(object at backend$getPeakList(scans)$peaks)
+## }
+## else {
+## return(sapply(scans, function(x) object at backend$getPeakList(x)$peaks,
+## simplify = FALSE))
+## }
+## }
+## .local(object, ...)
+## }
+## <environment: namespace:mzR>
+##
+## Signatures:
+## object
+## target "mzRpwiz"
+## defined "mzRpwiz"
+```
diff --git a/man/protgenerics.Rd b/man/protgenerics.Rd
new file mode 100644
index 0000000..b49fdf0
--- /dev/null
+++ b/man/protgenerics.Rd
@@ -0,0 +1,155 @@
+\name{ProtGenerics}
+
+\alias{ProtGenerics-package}
+\alias{ProtGenerics}
+\alias{psms}
+\alias{peaks}
+\alias{modifications}
+\alias{database}
+\alias{rtime}
+\alias{tic}
+\alias{spectra}
+\alias{intensity}
+\alias{mz}
+\alias{mz<-}
+\alias{peptides}
+\alias{proteins}
+\alias{accessions}
+\alias{scans}
+\alias{mass}
+\alias{ions}
+\alias{chromatograms}
+\alias{chromatogram}
+\alias{isCentroided}
+
+
+\title{
+ S4 generic functions for Bioconductor proteomics infrastructure
+}
+
+
+\description{
+ These generic functions provide basic interfaces to operations on and
+ data access to proteomics and mass spectrometry infrastructure in the
+ Bioconductor project.
+
+ For the details, please consult the respective methods' manual pages.
+
+}
+
+\details{
+
+ \subsection{When should one define a generics?}{
+
+ Generics are appropriate for functions that have \emph{generic}
+ names, i.e. names that occur in multiple circumstances, (with
+ different input classes, most often defined in different packages)
+ or, when (multiple) dispatching is better handled by the generics
+ mechanism rather than the developer. The dispatching mechanism will
+ then automatically call the appropriate method and save the user
+ from explicitly calling \code{package::method} or the developer to
+ handle the multiple input types cases. When no such conflict exists
+ or is unlikely to happen (for example when the name of the function
+ is specific to a package or domain, or for class slots accessors and
+ replacement methods), the usage of a generic is arguably
+ questionable, and in most of these cases, simple, straightforward
+ functions would be perfectly valid.
+
+ }
+
+ \subsection{When to define a generic in \code{ProtGenerics}?}{
+
+ \code{ProtGenerics} is not meant to be the central package for
+ generics, nor should it stop developers from defining the generics
+ they need. It is a means to centralise generics that are defined in
+ different packages (for example \code{mzR::psms} and
+ \code{mzID::psms}, or \code{IRanges::score} and \code{mzR::score},
+ now \code{BioGenerics::score}) or generics that live in a rather big
+ package (say \code{mzR}) on which one wouldn't want to depend just
+ for the sake of that generics' definition.
+
+
+ The goal of \code{ProtGenerics} is to step in when namespace
+ conflicts arise so as to to facilitate inter-operability of
+ packages. In case such conflict appears due to multiple generics, we
+ would (1) add these same definitions in \code{ProtGenerics}, (2)
+ remove the definitions from the packages they stem from, which then
+ (3) only need to import \code{ProtGenerics}. This would be very
+ minor/straightforward changes for the developers and would resolve
+ issues when they arise.
+
+ More generics can be added on request by opening an issue or sending
+ a pull request on:
+
+ \url{https://github.com/lgatto/ProtGenerics}
+
+ }
+
+}
+
+\usage{
+psms(object, ...)
+peaks(object, ...)
+modifications(object, ...)
+database(object, ...)
+rtime(object, ...)
+tic(object, ...)
+spectra(object, ...)
+intensity(object, ...)
+mz(object, ...)
+peptides(object, ...)
+proteins(object, ...)
+accessions(object, ...)
+scans(object, ...)
+mass(object, ...)
+ions(object, ...)
+chromatograms(object, ...)
+chromatogram(object, ...)
+isCentroided(object, ...)
+}
+
+
+\arguments{
+ \item{object}{Object of class for which methods are defined. }
+ \item{\dots}{Further arguments, possibly used by downstream methods. }
+}
+
+
+\seealso{
+ \itemize{
+ \item The \pkg{BiocGenerics} package for S4 generic functions needed
+ by many Bioconductor packages.
+
+ \item \code{\link[methods]{showMethods}} for displaying a summary of the
+ methods defined for a given generic function.
+
+ \item \code{\link[methods]{selectMethod}} for getting the definition of
+ a specific method.
+
+ \item \code{\link[methods]{setGeneric}} and
+ \code{\link[methods]{setMethod}} for defining generics and methods.
+ }
+}
+
+
+
+\author{
+ Laurent Gatto <lg390 at cam.ac.uk>
+}
+
+
+\examples{
+## List all the symbols defined in this package:
+ls('package:ProtGenerics')
+
+\dontrun{
+ ## What methods exists for 'peaks'
+ showMethods("peaks")
+
+ ## To look at one method in particular
+ getMethod("peaks", "mzRpwiz")
+}
+}
+
+
+\keyword{methods}
\ No newline at end of file
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/r-bioc-protgenerics.git
More information about the debian-med-commit
mailing list