class
Fastx::Fasta::Writer
- Fastx::Fasta::Writer
- Reference
- Object
Defined in:
fastx/fasta/writer.crConstructors
-
.new(filename : String | Path)
Creates a new FASTA writer for the specified file.
Class Method Summary
-
.open(filename : String | Path, &)
Opens a FASTA file for writing, yields the writer to the block, and automatically closes it.
Instance Method Summary
-
#close
Closes the file handle.
-
#closed?
Returns true if the file handle is closed.
-
#write(name : String, sequence : String)
Writes a FASTA record with the given name and sequence.
Constructor Detail
def self.new(filename : String | Path)
#
Creates a new FASTA writer for the specified file. Automatically detects gzip compression from .gz extension.
Class Method Detail
def self.open(filename : String | Path, &)
#
Opens a FASTA file for writing, yields the writer to the block, and automatically closes it.
Instance Method Detail
def write(name : String, sequence : String)
#
Writes a FASTA record with the given name and sequence.