Function
readBatch
Read a given number of sequence records from SequenceStream.
int readBatch(ids, seqs, seqIO, num)
int readBatch(ids, seqs, quals, seqIO, num)
Include Headers
seqan/seq_io.h
Parameters
ids
The identifiers of the sequence are written here.
seq
The sequence of the record is written here.
Types: StringSet
quals
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.
seqIO
The SequenceStream object to read from.
Return Values
An integer, 0 on success, 1 on errors.
Types: int
Examples
Read the first sequences of a FASTA file, up to ten.
int main()
{
    seqan::SequenceStream seqIO("in.fasta", seqan::SequenceStream::READ_BATCH);
    seqan::StringSet<seqan::CharString> ids;
    seqan::StringSet<seqan::Dna5String> seqs;
 
    int res = readBatch(ids, seqs, seqIO, 10);
    if (res != 0)
    {
        std::cerr << "ERROR: Could not read records!\n";
        return 1;
    }
 
    return 0;
}
SeqAn - Sequence Analysis Library - www.seqan.de
 

Page built @2013/07/11 09:12:17