seqio

package
v0.0.0-...-e4de321 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 10, 2026 License: BSD-2-Clause Imports: 14 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package seqio is a generic namespace shared by all biological sequence input and output handlers. This package contain a very barebone and simple Fasta format sequence file parser. Currently, it parses and returns the Id(header) and sequence. This is mostly working concept, however could be easily extended in future. Example:

for r := range seqio.ParseFASTA("sequences.fa") {
    result.MonadFold(r,
        func(err error) any { /* handle malformed record / I/O */ },
        func(rec seqio.Fasta) any { /* use rec */ },
    )
}

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseFASTA

func ParseFASTA(path string) IR.SeqResult[Fasta]

ParseFASTA opens a FASTA file and returns a SeqResult[Fasta] — a lazy stream where each element is Right(Fasta) or Left(error). Per-record errors emit Left and continue; the file is deterministically closed when iteration finishes (EOF, error, or break).

Types

type Fasta

type Fasta struct {
	ID       []byte
	Sequence []byte
}

Fasta is a struct representing a fasta record, containing the sequence ID and the sequence itself.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL