R/as.SeqFasta.R

Defines functions as.SeqFasta

Documented in as.SeqFasta

#' S3 Object 'SeqFasta'
#'
#' S3 objects designed for Genomic data
#' @param object Sequence
#' @export
#' @examples
#' fasta = as.SeqFasta('ATCGATCGATCGATCG',
#'                     GeneName = 'Potri.000001',
#'                     Annotation = '>Potri.000001 pacid=1000001 locus=Potri.000001')
#' fasta

as.SeqFasta = function(object, GeneName = NULL, Annotation = NULL){
  attributes(object)  = list(name = GeneName, Annotation = Annotation)
  class(object) = 'SeqFasta'
  return(object)
}
jerry955071/seqtools documentation built on Jan. 10, 2021, 4:41 p.m.