oneHot: One-hot encode a DNA sequence

View source: R/one_hot.R

oneHotR Documentation

One-hot encode a DNA sequence

Description

Takes a DNA string and returns a one-hot encoded matrix of 4 rows c("A", "C", "G", "T") with j-columns, where j is the number of characters in a DNA string.

Usage

oneHot(s, n = c("A", "C", "G", "T"))

Arguments

s

A character string of a DNA sequence.

n

A character vector of given nucleotide elements. Defaults to c("A", "C", "G", "T").


btmonier/monier documentation built on Sept. 13, 2024, 12:07 a.m.