Class
StringSet
A container class for a set of strings.
StringSet<TString, TSpec>
Include Headers
sequence.h
Parameters
TString
The string type.
Types: String
TSpec
The specializing type for the StringSet.
Metafunctions: Spec
Default: Owner<Generous>.
Specializations
DependentA string set storing references of the strings.
OwnerA string set storing the strings as members.
Metafunctions
ConcatenatorReturns the type of the concatenation sequence of all sequences in a StringSet.
SAValueThe default alphabet type of a suffix array, i.e. the type to store a position of a string or string set.
Functions
alignmentFreeComparisonComputes the pairwise similarity scores for a set of sequences
appendSeqsAppends all sequences stored in files of directory to a StringSet.
appendValueAppends a value to a container.
assignValueByIdAdds a new string to the StringSet and returns an id.
bandedChainAlignmentComputes the best global pairwise alignment between two sequences given a non-empty seed chain.
beginThe begin of a container.
clearResets an object.
complementComplement a sequence or a StringSet in-place.
completeProfileConcatenates the background frequency with the profile for the motif component.
concatReturns the concatenation sequence of all sequences in a StringSet.
convertPatternToProfileConverts a pattern into a profile which consists of a set of frequency distributions.
convertSetOfPatternsToProfileConverts a set of sequence patterns into a profile.
createCountArrayBuilds an index on a StringSet storing how often a q-gram occurs in each sequence.
createPrefixSumTableCreates the prefix sum table
determineConsensusSeqDetermines the consensus pattern of a given profile.
displayDisplays a given set of strings.
emRepresents the EM algorithm as used by MEME.
endThe end of a container.
expectationComputes the expectation for a set of patterns w.r.t. a set of text strings and a MarkovModel
findMotifRepresents the main function which is used to start the search for noticeable motif patterns.
findRepeatsSearch for repeats in a text.
generateSequenceGenerates random state and alphabet sequences of a given HMM.
getValueByIdRetrieves a string from the StringSet given an id.
globalAlignmentComputes the best global pairwise alignment.
globalAlignmentScoreComputes the best global pairwise alignment score.
idToPositionRetrieves the position of a string in the StringSet given an id.
infixCreates infix object.
infixWithLengthCreates infix object.
iterIterator to item at given position.
lengthThe number of items/characters.
loadContigsLoads contigs into fragment store.
matchRefinementRefines (i.e. cuts into smaller parts) a set of pairwise segment matches in such a way that none of the segments partly overlap. They are either identical (fully overlapping) or non-overlapping.
normalizeDetermines the normalized frequencies.
positionToIdRetrieves the id of a string in the StringSet given a position.
prefixCreates prefix object.
readAllRead all sequence records from a SequenceStream object.
readBatchRead a given number of sequence records from SequenceStream.
removeValueByIdRemoves a string from the StringSet given an id.
resizeResizes a container. If the new length exceeds the old length the new elements are filled with copies of value.
reverseComplementReverse and complement a sequence or a StringSet in-place.
setStringsLoads the sequences of a stringset into an alignment.
stringSetLimitsRetrieves a string of delimiter positions of a StringSet which is needed for local<->global position conversions.
stringSplitAppend a list of the words in the string, using sep as the delimiter string StringSet.
stringToStringSetTransform a String into a StringSet containing this String.
suffixCreates suffix object.
swapSwaps the contents of two values.
toLowerConvert characters in sequence or StringSet to lower case in-place.
toUpperConvert characters in sequence or StringSet to lower case in-place.
valueReference to the value.
valueByIdRetrieves a string from the StringSet given an id.
varianceComputes the variance for a set of patterns w.r.t. a set of text strings and a MarkovModel
write2Write FASTA or FASTQ records.
writeAllWrite sequence records from to a SequenceStream object.
zscoreComputes the z-score index for a set of patterns w.r.t. a set of text strings and a MarkovModel
Examples
1#include <seqan/basic.h>
2#include <seqan/sequence.h>
3#include <seqan/file.h>
4
5using namespace seqan;
6
7int main()
8{
9    StringSet<String<char> > stringSet;
10    appendValue(stringSet, "Hello World!");                    // Append string to the end of the string set.
11
12    std::cout << "Number of elements: " << length(stringSet) << std::endl;
13   
14    resize(stringSet, 3, Exact());                             // Adapt the size of the container, while keeping existing values.
15
16    String<char> seq = "To be or not to be!";
17    stringSet[1] = seq;                                        // Use subscript operator to assign a new value.
18    stringSet[2] = "A man, a plan, a canal - Panama!";
19
20    std::cout << "Number of elements: " << length(stringSet) << std::endl;
21    
22    typedef Iterator<StringSet<String<char> >, Standard>::Type TIterator;
23    for(TIterator it = begin(stringSet, Standard()); it != end(stringSet, Standard()); ++it)  
24        std::cout << "Element " << position(it, stringSet) << ": " << *it << std::endl;
25    
26    clear(stringSet);                                           // Clear the contents of the StringSet.
27    
28    std::cout << "Number of elements: " << length(stringSet) << std::endl;
29    
30    return 0;
31}
32
The output is as follows:
Number of elements: 1
Number of elements: 3
Element 0: Hello World!
Element 1: To be or not to be!
Element 2: A man, a plan, a canal - Panama!
Number of elements: 0
SeqAn - Sequence Analysis Library - www.seqan.de
 

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