| seq_vector {bioseq.fasta} |
R Documentation |
embedding the given fasta sequence as vector
Description
Usage
seq_vector(sgt, seqs,
as.dataframe = FALSE);
Arguments
sgt
the sequence graph transform algorithm object, which is created by the seq_sgt api in this package module. [as CreateMatrix]
seqs
a fasta sequence collection for make the sequence embedding, which can be a FastaFile object, a collection of the FastaSeq object, or a character vector of the raw sequence data.
as.dataframe
when there are multiple sequence in the input sequence collection: cast the embedding matrix as a data frame object? if this parameter is FALSE(the default value), then a named list of the embedding vector will be returned for each sequence. [as boolean]
env
the R# runtime environment object. [as Environment]
Details
Authors
seqtoolkit
Value
a numeric vector of the embedding result if there is only one sequence in the input sequence collection, or a data frame object(each row is the embedding vector of one sequence, and the column names are v1, v2, ...) when the as_dataframe parameter is TRUE, or a named list of the embedding vector of each sequence.
clr value class
Examples
imports "bioseq.fasta" from "seqtoolkit";
# get fasta sequence data
let seqs = read.fasta("./proteins.fa");
let sgt = seq_sgt(moltype = "prot");
let vec = sgt |> seq_vector(seqs);
# run data analysis on the generated embedding vectors
[Package
bioseq.fasta version 1.0.0.0
Index]