Function
writeAll
Write sequence records from to a SequenceStream object.
The records are appended to the file if you have written out any previously. When writing out Dna5, qualities are automatically taken from the sequence characters.
int writeAll(seqIO, ids, seqs[, options])
int writeAll(seqIO, ids, seqs, quals, [options])
Include Headers
seqan/seq_io.h
Parameters
seqIO
The SequenceStream object to write to.
ids
Identifiers to write out.
seq
Sequences to write out.
Types: StringSet
quals
Qualities to write out. Optional.
Remarks: Qualities are ignored if the file format does not suppor them. If none are given for FASTQ, score 40 is written out for all.
options
The configuration for writing FASTA and FASTQ files.
Return Values
An integer, 0 on success, 1 on errors.
Types: int
Examples
Write out all sequences.
int main()
{
    seqan::SequenceStream seqIO("in.fasta", seqan::SequenceStream::WRITE);
    seqan::StringSet<seqan::CharString> ids;
    appendValue(ids, "seq1");
    appendValue(ids, "seq2");
    seqan::StringSet<seqan::Dna5String> seqs;
    appendValue(seqs, "CGAT");
    appendValue(seqs, "TTTT");
 
    int res = writeAll(seqIO, ids, seqs);
    if (res != 0)
    {
        std::cerr << "ERROR: Could not write records!\n";
        return 1;
    }
 
    return 0;
}
SeqAn - Sequence Analysis Library - www.seqan.de
 

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