R/methods-DnaSeq.R

setMethod("comp","DnaSeq",
          function(object) {
            chartr("ACGT","TGCA",seq(object))
          })


setMethod("transcribe","DnaSeq",
          function(object) {
            .sequence <- chartr("T","U",toupper(seq(object)))
            .id <-  paste(id(object),"-- transcribed")
            rna <- new("RnaSeq",
                       id=.id,
                       alphabet=c("A","C","G","U"),
                       sequence=.sequence)
            return(rna)
          })

Try the sequences package in your browser

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

sequences documentation built on May 2, 2019, 6:45 a.m.