Function
readAll
Read all sequence records from a SequenceStream object.
Include Headers
seqan/seq_io.h
Parameters
The identifiers of the sequence are written here. | |
The sequence of the record is written here. Types: StringSet | |
The qualities of the sequence is written here. Optional. Remarks: If the sequences have no qualities, as in FASTA files, the StringSet will contain empty strings. | |
The SequenceStream object to read from. Types: SequenceStream |
Return Values
An integer, 0 on success, 1 on errors.
Types: int
Member of
Examples
Read the sequences of a FASTA file.
{
seqan::SequenceStream seqIO("in.fasta", seqan::SequenceStream::READ_ALL);
seqan::StringSet<seqan::CharString> ids;
seqan::StringSet<seqan::Dna5String> seqs;
int res = readAll(ids, seqs, seqIO);
if (res != 0)
{
std::cerr << "ERROR: Could not read records!\n";
return 1;
}
return 0;
}
SeqAn - Sequence Analysis Library - www.seqan.de