fastx
Version, currently 0.1.18 versions
github.com/bio-cr/fastx.cr
FASTA/FASTQ reader and writer for Crystal.
Nothing has been indexed for 0.1.1 yet. The tag is recorded, its shard.yml has not been read, so the manifest and dependency list below are empty because they are unknown rather than because they are absent.
Installation
# Add this to your shard.yml
dependencies:
fastx:
github: bio-cr/fastx.cr
version: ~> 0.1.1Then run:
shards installshard.yml
No shard.yml has been indexed for 0.1.1. You can read it on the repository.
Dependencies
Unknown: the shard.yml for this version has not been read yet.
README
This README is the one indexed from the repository at its latest ref, not from the tag for this version.
Fastx.cr
Small FASTA/FASTQ I/O for Crystal.
Installation
Add this to shard.yml:
dependencies:
fastx:
github: bio-cr/fastx.cr
Then run:
shards install
Features
- Read and write FASTA
- Read and write FASTQ
- Auto-handle gzip when the path ends with
.gz - Iterate with owned
Stringvalues or lower-allocation borrowedBytes - Stream large records line by line without accumulating full sequences
- Encode/decode nucleotide bases and FASTQ quality scores
Quick Start
Read FASTA:
require "fastx"
Fastx::Fasta::Reader.open("reads.fa.gz") do |reader|
reader.each do |header, sequence|
puts "#{header}\t#{sequence.bytesize}"
end
end
Read FASTQ:
Fastx::Fastq::Reader.open("reads.fq.gz") do |reader|
reader.each do |identifier, sequence, quality|
puts "#{identifier}\t#{sequence.bytesize}\t#{quality.bytesize}"
end
end
Write FASTA:
Fastx::Fasta::Writer.open("out.fa", line_width: 80) do |writer|
writer.write("seq1", "ACGTACGT")
end
Write FASTQ:
Fastx::Fastq::Writer.open("out.fq.gz") do |writer|
writer.write("seq1", "ACGT", "!!!!")
end
Guides
- Getting started
- Reading FASTA and FASTQ
- Writing FASTA and FASTQ
- Streams and limits
- Base and quality encoding
License
MIT License
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This release
- Version
0.1.1- Tagged
- Jun 26, 2026
- Commit
01b2fd44198b- Indexed
- not yet
Dependents
Repository
github.com/bio-cr/fastx.cr
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 15, 2026
- Synced
- Aug 14, 2026
- Versions
- 8