R/filter_all_peptides.R

Defines functions filter_all_peptides

Documented in filter_all_peptides

utils::globalVariables(c("head"))

filter_all_peptides <- function(data){
  
  data.proteins <- gsub("^[[:digit:]]\\/", "", data$ProteinName)
  data.proteins <- unlist(strsplit(as.character(data.proteins), "\\/"))
  data.proteins <- unique(data.proteins)
  
  message("Number of proteins detected: ", length(data.proteins), "\n",
          "Protein identifiers: ", paste(head(data.proteins), collapse=", "))
    
  # Delete non-unique features (unique features have "1/" in front of protein name)
  data$ProteinName <- gsub("^1\\/", "", data$ProteinName)
  
  return(data)
}

Try the SWATH2stats package in your browser

Any scripts or data that you put into this service are public.

SWATH2stats documentation built on Nov. 17, 2017, 9:10 a.m.