Function
readRecord
Read the next sequence record from SequenceStream.
Include Headers
seqan/seq_io.h
Parameters
The identifier of the sequence is written here. Types: CharString | |
The sequence of the record is written here. Types: String | |
The qualities of the sequence is written here. Optional. Types: CharString | |
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 first sequence of a FASTA file.
{
seqan::SequenceStream seqIO("in.fasta", seqan::SequenceStream::READ_SINGLE);
seqan::CharString id;
seqan::Dna5String seq;
if (atEnd(seqIO))
{
std::cerr << "ERROR: File does not contain any sequences!\n";
return 1;
}
int res = readRecord(id, seq, seqIO);
if (res != 0)
{
std::cerr << "ERROR: Could not read first record!\n";
return 1;
}
return 0;
}
SeqAn - Sequence Analysis Library - www.seqan.de