write.fasta {bioseq.fasta} R Documentation

write a fasta sequence or a collection of fasta sequence object

Description

Usage

write.fasta(seq, file,
    lineBreak = -1,
    delimiter = " ",
    filter.empty = FALSE,
    encoding = ASCII);

Arguments

seq

the fasta sequence data for write into the target file, which can be a single FastaSeq object, a FastaFile object, a collection of the FastaSeq object, a character vector of the raw sequence data, a fastq sequence collection, or a pipeline object that produces a set of the FastaSeq sequence data.

file

the output target: a file path of the generated fasta sequence file, a file stream object, or a fasta stream writer object that is created by the open.fasta api in write mode.

lineBreak

The sequence length in one line, negative value or ZERo means no line break. [as integer]

delimiter

the delimiter character for merge the fasta headers title of the sequence data. [as string]

filter.empty

skip write sequence if the sequence object has no sequence data. [as boolean]

encoding

The text encoding value of the generated fasta file. [as Encodings]

env

the R# runtime environment object. [as Environment]

Details

Authors

seqtoolkit

Value

a boolean value of the file save result: TRUE means the sequence data has been written into the target file successfully;

this function returns a R# error message object if the given sequence data can not be cast to a fasta sequence collection, or the target file can not be opened for write.

clr value class

Examples


[Package bioseq.fasta version 1.0.0.0 Index]