Function
readAll
Read all sequence records from a SequenceStream object.
int readAll(ids, seqs, seqIO)
int readAll(ids, seqs, quals, seqIO)
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 sequences of a FASTA file.
int main()
{
    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
 

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