R/cleave-methods.R

setMethod(f="cleave",
          signature=signature(x="character"),
          definition=function(x, enzym="trypsin", missedCleavages=0,
                              custom=NULL, unique=TRUE) {
  .cleave(x=x,
          enzym=enzym,
          missedCleavages=missedCleavages,
          custom=custom,
          unique=unique)
})

setMethod(f="cleave",
          signature=signature(x="AAString"),
          definition=function(x, enzym="trypsin", missedCleavages=0,
                              custom=NULL, unique=TRUE) {
  AAStringSet(.unlist(.cleave(x=as.character(x),
                              enzym=enzym,
                              missedCleavages=missedCleavages,
                              custom=custom,
                              unique=unique)))
})

setMethod(f="cleave",
          signature=signature(x="AAStringSet"),
          definition=function(x, enzym="trypsin", missedCleavages=0,
                              custom=NULL, unique=TRUE) {
  AAStringSetList(.cleave(x=as.character(x),
                          enzym=enzym,
                          missedCleavages=missedCleavages,
                          custom=custom,
                          unique=unique))
})

Try the cleaver package in your browser

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

cleaver documentation built on Nov. 8, 2020, 7:20 p.m.