filter_text {metaprotr} | R Documentation |
filter_text
Description
Matches the entities containing a given chain of characters inside an explanatory variable (column name) of the dataframe "peptides_proteins" from a "spectral_count_object". Based on the user's decision, the peptides, subgroups, groups or taxonomic levels containig the provided chain of characters will be kept or discarted in a newly generated object.
Usage
filter_text(spectral_count_object, pepsprots_feature, text_to_filter, decision)
Arguments
spectral_count_object |
List containing dataframes with proteomics elements whose abundance is expressed as spectral counts and are organized by peptides, subgroups, groups or taxonomic levels. The format of this object is similar to that generated from the functions "getsc_specific" and "crumble_taxonomy". |
pepsprots_feature |
Character indicating the name of one explanatory variable (ONE column name) of the dataframe "peptides_proteins". |
text_to_filter |
Character containig the text to be searched in the "pepsprots_feature" content. |
decision |
Character indicating wether the elements containing the matched text will be kept or dirscarted. The two allowed option are: "keep" or "discard". |
Value
A list defined as "spectral_count_object" with or without the elements (peptides, subgroups, groups, taxonomic items) that matched the provided text in a given variable of the "peptides_proteins" dataframe.
Examples
data(fecal_waters)
data(species_fw)
cysteine_alkylations <- filter_text(fecal_waters, "Modifs", "57.02146", "keep")
exclude_medimonas <- filter_text(species_fw, "organism", "Merdimonas faecis BR31", "discard")