Class
StringSet
A container class for a set of strings.

StringSet

Dependent | Owner

ConcatDirect

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

Dependent | A string set storing references of the strings.
Owner | A string set storing the strings as members.

Metafunctions

Concatenator | Returns the type of the concatenation sequence of all sequences in a StringSet.
SAValue | The default alphabet type of a suffix array, i.e. the type to store a position of a string or string set.

Functions

alignmentFreeComparison | Computes the pairwise similarity scores for a set of sequences
appendSeqs | Appends all sequences stored in files of directory to a StringSet.
appendValue | Appends a value to a container.
assignValueById | Adds a new string to the StringSet and returns an id.
bandedChainAlignment | Computes the best global pairwise alignment between two sequences given a non-empty seed chain.
begin | The begin of a container.
clear | Resets an object.
complement | Complement a sequence or a StringSet in-place.
completeProfile | Concatenates the background frequency with the profile for the motif component.
concat | Returns the concatenation sequence of all sequences in a StringSet.
convertPatternToProfile | Converts a pattern into a profile which consists of a set of frequency distributions.
convertSetOfPatternsToProfile | Converts a set of sequence patterns into a profile.
createCountArray | Builds an index on a StringSet storing how often a q-gram occurs in each sequence.
createPrefixSumTable | Creates the prefix sum table
determineConsensusSeq | Determines the consensus pattern of a given profile.
display | Displays a given set of strings.
em | Represents the EM algorithm as used by MEME.
end | The end of a container.
expectation | Computes the expectation for a set of patterns w.r.t. a set of text strings and a MarkovModel
findMotif | Represents the main function which is used to start the search for noticeable motif patterns.
findRepeats | Search for repeats in a text.
generateSequence | Generates random state and alphabet sequences of a given HMM.
getValueById | Retrieves a string from the StringSet given an id.
globalAlignment | Computes the best global pairwise alignment.
globalAlignmentScore | Computes the best global pairwise alignment score.
idToPosition | Retrieves the position of a string in the StringSet given an id.
infix | Creates infix object.
infixWithLength | Creates infix object.
iter | Iterator to item at given position.
length | The number of items/characters.
loadContigs | Loads contigs into fragment store.
matchRefinement | Refines (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.
normalize | Determines the normalized frequencies.
positionToId | Retrieves the id of a string in the StringSet given a position.
prefix | Creates prefix object.
readAll | Read all sequence records from a SequenceStream object.
readBatch | Read a given number of sequence records from SequenceStream.
removeValueById | Removes a string from the StringSet given an id.
resize | Resizes a container. If the new length exceeds the old length the new elements are filled with copies of value.
reverseComplement | Reverse and complement a sequence or a StringSet in-place.
setStrings | Loads the sequences of a stringset into an alignment.
stringSetLimits | Retrieves a string of delimiter positions of a StringSet which is needed for local<->global position conversions.
stringSplit | Append a list of the words in the string, using sep as the delimiter string StringSet.
stringToStringSet | Transform a String into a StringSet containing this String.
suffix | Creates suffix object.
toLower | Convert characters in sequence or StringSet to lower case in-place.
toUpper | Convert characters in sequence or StringSet to lower case in-place.
value | Reference to the value.
valueById | Retrieves a string from the StringSet given an id.
variance | Computes the variance for a set of patterns w.r.t. a set of text strings and a MarkovModel
write2 | Write FASTA or FASTQ records.
writeAll | Write sequence records from to a SequenceStream object.
zscore | Computes the z-score index for a set of patterns w.r.t. a set of text strings and a MarkovModel

Examples
File "stringset.cpp"

1 | #include <seqan/basic.h>
2 | #include <seqan/sequence.h>
3 | #include <seqan/file.h>
4 |
5 | using namespace seqan;
6 |
7 | int 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
Example Programs
Mummy, Maximal Unique Matches, Index Finder StringSet
SeqAn - Sequence Analysis Library - www.seqan.de

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