% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/onehotEncoder.R
\name{onehotEncoder}
\alias{onehotEncoder}
\title{One Hot Encoder from Amino Acid or Nucleotide Strings}
\usage{
onehotEncoder(
  input.sequences,
  max.length = NULL,
  motif.length = 1,
  convert.to.matrix = TRUE,
  sequence.dictionary = amino.acids,
  padding.symbol = ".",
  verbose = TRUE
)
}
\arguments{
\item{input.sequences}{The amino acid or nucleotide sequences to use}

\item{max.length}{Additional length to pad, NULL will pad sequences 
to the max length of input.sequences}

\item{motif.length}{The length of the amino acid residues to encode -
a motif.length = 1 produces single amino acid encodings}

\item{convert.to.matrix}{Return a matrix (\strong{TRUE}) or a 3D array (\strong{FALSE})}

\item{sequence.dictionary}{The letters to use in sequence generation 
(default are all amino acids). This will be overrode if using a
 motif approach (\strong{motif.length} > 1)}

\item{padding.symbol}{Symbol to use for padding at the end of sequences}

\item{verbose}{Print messages corresponding to the processing step}
}
\value{
One hot encoded sequences in a matrix or 3D array
}
\description{
Use this to transform amino acid or nucleotide sequences 
into a one hot encoding of the sequence.
}
\examples{
new.sequences <- generateSequences(prefix.motif = "CAS",
                                   suffix.motif = "YF",
                                   number.of.sequences = 100,
                                   min.length = 8,
                                   max.length = 16)
                                   
sequence.matrix <- onehotEncoder(new.sequences, 
                                 convert.to.matrix = TRUE)
                        
}
