get_one_hot_encoded_seqs: Get one-hot encoded sequences

View source: R/prepare_data_from_FASTA.R

get_one_hot_encoded_seqsR Documentation

Get one-hot encoded sequences

Description

Get the one-hot encoding representation of the given sequences.

Usage

get_one_hot_encoded_seqs(seqs, sinuc_or_dinuc = "sinuc")

Arguments

seqs

A DNAStringSet object holding the given DNA sequences

sinuc_or_dinuc

character string, 'sinuc' or 'dinuc' to select for mono- or dinucleotide profiles.

Value

A sparse matrix of sequences represented with one-hot-encoding

See Also

prepare_data_from_FASTA for generating one-hot encoding of sequences from a FASTA file

Other input functions: prepare_data_from_FASTA()

Examples


fname <- system.file("extdata", "example_data.fa.gz",
                        package = "seqArchR", mustWork = TRUE)


rawSeqs <- prepare_data_from_FASTA(fasta_fname = fname,
                        raw_seq = TRUE)

seqs_dinuc <- get_one_hot_encoded_seqs(seqs = rawSeqs,
                                       sinuc_or_dinuc = "dinuc")


snikumbh/seqArchR documentation built on March 11, 2024, 7:06 p.m.