nFeatures: How many features in a group?

Description Usage Arguments Value Author(s) Examples

View source: R/functions-MSnSet.R

Description

This function computes the number of features in the group defined by the feature variable fcol and appends this information in the feature data of object.

Usage

1
nFeatures(object, fcol)

Arguments

object

An instance of class MSnSet.

fcol

Feature variable defining the feature grouping structure.

Value

An updated MSnSet with a new feature variable fcol.nFeatures.

Author(s)

Laurent Gatto

Examples

1
2
3
4
5
6
library(pRolocdata)
data("hyperLOPIT2015ms3r1psm")
hyperLOPIT2015ms3r1psm <- nFeatures(hyperLOPIT2015ms3r1psm,
                                    "Protein.Group.Accessions")
i <- c("Protein.Group.Accessions", "Protein.Group.Accessions.nFeatures")
fData(hyperLOPIT2015ms3r1psm)[1:10, i]

Example output

Loading required package: BiocGenerics
Loading required package: parallel

Attaching package:BiocGenericsThe following objects are masked frompackage:parallel:

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked frompackage:stats:

    IQR, mad, sd, var, xtabs

The following objects are masked frompackage:base:

    anyDuplicated, append, as.data.frame, basename, cbind, colnames,
    dirname, do.call, duplicated, eval, evalq, Filter, Find, get, grep,
    grepl, intersect, is.unsorted, lapply, Map, mapply, match, mget,
    order, paste, pmax, pmax.int, pmin, pmin.int, Position, rank,
    rbind, Reduce, rownames, sapply, setdiff, sort, table, tapply,
    union, unique, unsplit, which.max, which.min

Loading required package: Biobase
Welcome to Bioconductor

    Vignettes contain introductory material; view with
    'browseVignettes()'. To cite Bioconductor, see
    'citation("Biobase")', and for packages 'citation("pkgname")'.

Loading required package: mzR
Loading required package: Rcpp
Loading required package: S4Vectors
Loading required package: stats4

Attaching package:S4VectorsThe following object is masked frompackage:base:

    expand.grid

Loading required package: ProtGenerics

Attaching package:ProtGenericsThe following object is masked frompackage:stats:

    smooth


This is MSnbase version 2.16.0 
  Visit https://lgatto.github.io/MSnbase/ to get started.


Attaching package:MSnbaseThe following object is masked frompackage:base:

    trimws


This is pRolocdata version 1.28.0.
Use 'pRolocdata()' to list available data sets.
    Protein.Group.Accessions Protein.Group.Accessions.nFeatures
136                   Q99PL5                                108
141                   P14901                                  7
169                   O89090                                  3
203                 O89032-3                                  1
238                   Q8R2M2                                 13
239                   Q9JIG7                                  3
261                   Q3TWI9                                  5
268                   Q8K0H5                                  2
274                   Q99NH0                                  9
276                   Q9CZD3                                 24

MSnbase documentation built on Jan. 23, 2021, 2 a.m.