FastaWriter
in package
implements
FastaWriterInterface
The sequence body is wrapped at 70 symbols per line, the width NCBI's own FASTA output and most downstream tools (samtools faidx, BioPerl's default) already expect ; a header containing a newline would break the one-line-per-header format FASTA relies on and is rejected rather than silently truncated or escaped.
Class FastaWriter
Tags
Table of Contents
Interfaces
- FastaWriterInterface
- Interface FastaWriterInterface - serializes one or several sequences into FASTA text. Purely a string formatter : it does not validate that $sSequence belongs to any particular alphabet, since that validation already happened wherever the sequence itself was built (e.g. a DnaSequence value object).
Constants
- LINE_WIDTH : mixed = 70
Methods
- writeMany() : string
- writeOne() : string
Constants
LINE_WIDTH
private
mixed
LINE_WIDTH
= 70
Methods
writeMany()
public
writeMany(array<string|int, mixed> $aRecords) : string
Parameters
- $aRecords : array<string|int, mixed>
Return values
stringwriteOne()
public
writeOne(string $sHeader, string $sSequence) : string
Parameters
- $sHeader : string
- $sSequence : string