one_hot: One-hot encoding of vector of DNA nucleotide strings

Description Usage Arguments Value Author(s) See Also Examples

Description

Inputs vector of strings composed of nucleotides and outputs a zero-padded array of encodings.

Usage

1
one_hot(data, zeros_len, max_len = NULL)

Arguments

data

Character strings composed of nucleotides A, C, G, T.

zeros_len

Integer value denoting number of zeros to pad vector with. Commonly the convolutional filter length - 1.

max_len

Maximum sequence length. If unspecified defaults to the maximum number of characters present in the data character strings.

Value

Zero-padded array of one-hot encodings.

Author(s)

Matthew Ploenzke, ploenzke@g.harvard.edu

See Also

one_hot_vector

Examples

1
one_hot(rep(paste(sample(c('A','C','G','T'),100,replace=TRUE),collapse=''),50),10)

mPloenzke/learnMotifs documentation built on May 27, 2019, 11:55 a.m.