norm.counts: Spectral counts matrix normalization

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/EDA_functions.R

Description

An spectral counts matrix is normalized by means of a set of samples divisors.

Usage

1
norm.counts(msnset, div)

Arguments

msnset

A MSnSet with spectral counts in the expression matrix.

div

A vector of divisors by sample

Details

Each column in the data matrix is divided by the corresponding divisor to obtain the normalizad matrix.

Value

A MSnSet object with the normalized spectral counts.

Author(s)

Josep Gregori

See Also

The MSnSet class documentation and normalize

Examples

1
2
3
4
5
6
7
data(msms.dataset)
msnset <- pp.msms.data(msms.dataset)
(tspc <- apply(exprs(msnset),2,sum))
div <- tspc/median(tspc)
e.norm <- norm.counts(msnset, div)
apply(exprs(e.norm),2,sum)
e.norm

Example output

Loading required package: MSnbase
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

U2.2502.1 U2.2502.2 U2.2502.3 U2.2502.4 U6.2502.1 U6.2502.2 U6.2502.3 U6.2502.4 
     5398      5501      5477      5251      5692      5686      5552      5601 
U2.0302.1 U2.0302.2 U2.0302.3 U6.0302.1 U6.0302.2 U6.0302.3 
     5629      5840      5726      5975      5739      5891 
U2.2502.1 U2.2502.2 U2.2502.3 U2.2502.4 U6.2502.1 U6.2502.2 U6.2502.3 U6.2502.4 
   5657.5    5657.5    5657.5    5657.5    5657.5    5657.5    5657.5    5657.5 
U2.0302.1 U2.0302.2 U2.0302.3 U6.0302.1 U6.0302.2 U6.0302.3 
   5657.5    5657.5    5657.5    5657.5    5657.5    5657.5 
MSnSet (storageMode: lockedEnvironment)
assayData: 675 features, 14 samples 
  element names: exprs 
protocolData: none
phenoData
  sampleNames: U2.2502.1 U2.2502.2 ... U6.0302.3 (14 total)
  varLabels: treat batch
  varMetadata: labelDescription
featureData: none
experimentData: use 'experimentData(object)'
  pubMedIds: http://www.ncbi.nlm.nih.gov/pubmed/22588121 
Annotation:  
- - - Processing information - - -
Subset [697,14][675,14] Thu May 20 14:58:42 2021 
Applied pp.msms.data preprocessing [Thu May 20 14:58:42 2021] 
Applied norm.counts normalization  [Thu May 20 14:58:42 2021] 
 MSnbase version: 1.8.0 

msmsEDA documentation built on Nov. 8, 2020, 6:55 p.m.