FastaWriterInterface
in
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).
Tags
Table of Contents
Methods
- writeMany() : string
- writeOne() : string
Methods
writeMany()
public
writeMany(array<string|int, mixed> $aRecords) : string
Parameters
- $aRecords : array<string|int, mixed>
-
Each entry : ["header" => string, "sequence" => string]
Return values
string —Every record concatenated, in order
writeOne()
public
writeOne(string $sHeader, string $sSequence) : string
Parameters
- $sHeader : string
-
Everything that goes after ">", e.g. "id description"
- $sSequence : string
Return values
string —A single FASTA record, header line included, terminated with a newline