Documentation

FastaWriter 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
author

Amélie DUVERNET aka Amelaye amelieonline@gmail.com

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

Methods

writeMany()

public writeMany(array<string|int, mixed> $aRecords) : string
Parameters
$aRecords : array<string|int, mixed>
Return values
string

writeOne()

public writeOne(string $sHeader, string $sSequence) : string
Parameters
$sHeader : string
$sSequence : string
Return values
string
On this page

Search results