R/filter_on_max_peptides.R
filter_on_max_peptides.Rd
In order to reduce the data, the data is filtered only for the proteins with the highest intensity peptides.
filter_on_max_peptides(
data,
n_peptides,
protein_col = "ProteinName",
peptide_col = c("Peptide.Sequence", "FullPeptideName"),
rm.decoy = TRUE
)
A data frame containing SWATH data with the column names: ProteinNames, PeptideSequence, PrecursorCharge, Intensity.
Maximum number of highest intense peptides to filter the data on.
Column with protein identifiers. Default: ProteinName
Column with peptide identifiers. Default: Peptide.Sequence or FullPeptideName
Option to remove the decoys during filtering.
Returns a data frame of the filtered data.
{
data("OpenSWATH_data", package="SWATH2stats")
data("Study_design", package="SWATH2stats")
data <- sample_annotation(OpenSWATH_data, Study_design)
data.filtered <- filter_mscore_freqobs(data, 0.01,0.8)
data.max <- filter_on_max_peptides(data.filtered, 5)
}
#> Treshold, peptides need to have been quantified in more conditions than: 4.8
#> Fraction of peptides selected: 0.42
#> Dimension difference: 1323, 0
#> Before filtering:
#> Number of proteins: 10
#> Number of peptides: 133
#>
#> Percentage of peptides removed: 69.17%
#>
#> After filtering:
#> Number of proteins: 10
#> Number of peptides: 41