class Fastx::Fasta::Reader

Defined in:

fastx/fasta/reader.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(filename : String | Path) #

Creates a new FASTA reader for the specified file. Automatically detects gzip compression from .gz extension.


[View source]

Class Method Detail

def self.open(filename : String | Path, &) #

Opens a FASTA file, yields the reader to the block, and automatically closes it.


[View source]

Instance Method Detail

def close #

Closes the file handle.


[View source]
def closed? #

Returns true if the file handle is closed.


[View source]
def each(&) #

Iterates over each FASTA record, yielding name and sequence.


[View source]
def each_copy(&) #

Iterates over each FASTA record, yielding name and sequence as String copies. This avoids buffer reuse issues when references to sequence data are kept.


[View source]