| Function readRecord Read the next sequence record from SequenceStream. int readRecord(id, seq, seqIO) int readRecord(id, seq, quals, seqIO) Include Headers seqan/seq_io.h Parameters
id | The identifier of the sequence is written here. Types: CharString
seq | The sequence of the record is written here. Types: String
quals | The qualities of the sequence is written here. Optional. Types: CharString Remarks: If the sequence has no qualities, clear is called on quals to indicate this.
seqIO | The SequenceStream object to read from. Types: SequenceStream
Return Values An integer, 0 on success, 1 on errors. Types: int Member of SequenceStream Examples Read the first sequence of a FASTA file. int main() { 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

Page built @2014/10/13 16:12:57