filterConsecutiveIdStretches: Filter Consecutive Id Stretches in Chromaograms

Description Usage Arguments Value Examples

View source: R/filterConsecutiveIdStretches.R

Description

Filter PCP traces based on a minimal length of consecutive ID stretches.

Usage

1
2
filterConsecutiveIdStretches(traces, min_stretch_length = 3,
  remove_empty = TRUE)

Arguments

traces

An object of class traces.

min_stretch_length

Numeric integer, the minimal length a stretch of continuous identifications has to have in order not to be removed. Defaults to 3.

remove_empty

Logical, whether the entries with rowSum == 0 after filtering should be removed, defaults to TRUE.

Value

An object of class traces containing the filtered chromatograms.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
 ## Load example data
 tracesRaw <- examplePeptideTraces
 ## Filter stretches with 3 consecutive ids
 tracesFilteredConSec <- filterConsecutiveIdStretches(tracesRaw,
                                                      min_stretch_length = 3,
                                                      remove_empty = TRUE)
 ## Compare the results
 exampleProtein <- tracesRaw$trace_annotation$protein_id[8]
 plot(subset(tracesRaw,
             trace_subset_type = "protein_id",
             trace_subset_ids = exampleProtein),
      legend= FALSE)
 plot(subset(tracesFilteredConSec,
             trace_subset_type = "protein_id",
             trace_subset_ids = exampleProtein),
      legend= FALSE)

CCprofiler/CCprofiler documentation built on May 19, 2021, 7:40 p.m.