removeNoId-methods {MSnbase} | R Documentation

## Removes non-identified features

### Description

The method removes non-identifed features in `MSnExp` and `MSnSet` instances using relevant information from the `feaureData` slot of a user-provide filtering vector of logicals.

### Methods

`signature(object = "MSnExp", fcol = "pepseq", keep = NULL)`

  Removes the feature from `object` that have a feature `fcol` (default is `"pepseq"`) equal to `NA`. Alternatively, one can also manually define `keep`, a vector of logical, defining the feature to be retained.

`signature(object = "MSnSet", fcol = "pepseq", keep = NULL)`

  As above of `MSnSet` instances.

### Author(s)

Laurent Gatto <lg390@cam.ac.uk>

### See Also

`MSnExp` and `MSnSet`.

### Examples

      quantFile <- dir(system.file(package = "MSnbase", dir = "extdata"),
                         full.name = TRUE, pattern = "mzXML$")
      identFile <- dir(system.file(package = "MSnbase", dir = "extdata"),
                         full.name = TRUE, pattern = "dummyiTRAQ.mzid")
      msexp <- readMSData(quantFile)
      msexp <- addIdentificationData(msexp, identFile)
      fData(msexp)$sequence
      length(msexp)

      ## using default fcol
      msexp2 <- removeNoId(msexp)
      length(msexp2)
      fData(msexp2)$sequence

      ## using keep
      print(fvarLabels(msexp))
      (k <- fData(msexp)$'MS.GF.EValue' > 75)
      k[is.na(k)] <- FALSE
      k
      msexp3 <- removeNoId(msexp, keep = k)
      length(msexp3)
      fData(msexp3)$sequence

[Package MSnbase version 2.4.2 Index]