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. [as CreateMatrix]

seqs

a fasta sequence collection for make the sequence embedding, which can be a FastaFile object, a collection of the @T:SMRUCC.genomics.SequenceModel.FASTA.FastaSeq

as.dataframe

[as boolean]

env

[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

  • double

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]