Class Specialization
CStyle String
Allows adaption of strings to C-style strings.
String<TValue, CStyle>
Include Headers
seqan/sequence.h
Parameters
TValue
The value type, that is the type of the items/characters stored in the string.
Remarks: Use Value to get the value type for a given class.
Remarks
The purpose of this class is to access to the content of a sequence in a "zero terminated string" style. This can be useful if SeqAn classes has to be integrated in programs that use char arrays to store strings. Instances of String<TValue, CStyle> can implicitely converted to a TValue * that points to a zero terminated CStyle of TValue.
The stored c-style string object can be set by constructors or assignment. The content of a c-style string can eighter be stored in a separate buffer, that is the source string is copied. Or the buffer of the source string itself is used instead, in this case the c-style string depends on the source string and gets invalid as soon as the buffer of the source string is destroyed.
Hence, this class is a kind of adaptor from an arbitrary SeqAn string to char arrays. Of course, the opposite way is possible too: Read here about adapting char arrays to SeqAn strings.
Specialization of
Metafunctions
DefaultOverflowExplicitThe default overflow strategy for explicit resize. (String)
DefaultOverflowImplicitThe default overflow strategy for implicit resize. (String)
InfixInfix sequence type. (String)
IsSequenceDetermines whether a container stores its elements in sequential order. (String)
MotifThe string type of the finder. (String)
PositionType of an object that represents a position in a container. (String)
PrefixPrefix sequence type. (String)
SAValueThe default alphabet type of a suffix array, i.e. the type to store a position of a string or string set. (String)
SpecThe spec of a class. (String)
SuffixSuffix sequence type. (String)
ValueType of the items in the container or behind an iterator. (String)
Member Functions
StringConstructor (String)
Functions
appendConcatenate two containers. (String)
appendSeqsAppends all sequences stored in files of directory to a StringSet. (String)
assignAssigns one object to another object. (String)
assignCroppedSeqIdExtracts the sequence id up to the first whitespace of a sequence file fragment. (String)
assignQualExtracts the quality values of a sequence file fragment. (String)
assignQualIdExtracts the quality value id of a sequence file fragment. (String)
assignSeqExtracts the sequence part of a sequence file fragment. (String)
assignSeqIdExtracts the sequence id of a sequence file fragment. (String)
assignValueAssigns value to item. (ContainerConcept)
backThe last item in container. (ContainerConcept)
bamRecordToAlignmentConvert BamAlignmentRecord to an Align object. (String)
beginThe begin of a container. (String)
beginPositionBegin position of object in host. (String)
buildAlignmentGraphBuilds an Alignment Graph from a set of input alignments. (String)
calculateCovarianceCalculates the covariance for the number of word occurrences for two words in a sequence of length n, given a background model. (String)
calculateOverlapIndicatorCalculate word overlaps: epsilon(word1,word2)= 1 where word2[j]=word1[j+p] for all j=1...(k-p) (String)
calculatePeriodicityCalculate word periodicity (indicator for overlaps) (String)
calculateProbabilityCalculates the probability of a sequence given a Bernoulli model (String of background frequencies) (String)
calculateVarianceCalculates the variance for the number of word occurrences of a word in a sequence of length n given a background model. (String)
canParseStringTest whether an automaton can parse a string completely. (String)
capacityThe maximal length. (String)
clearResets an object. (String)
collectLeavesReturns all leaves underneath a given vertex. (String)
complementComplement a sequence or a StringSet in-place. (String)
countKmersCounts kmers in a sequence. Optionally, a background model is returned. (String)
createMakes an object to owner of its content.
createLfTableCreates the LF table (String)
createOracleCreates a factor oracle. (String)
createOracleOnReverseCreates a factor oracle for the reversed string. (String)
createPrefixSumTableCreates the prefix sum table (String)
createRankDictionaryThis functions creates the dictionary. (String)
createRightArrayBinaryTreeComputes the wavelet tree structure of a text. (String)
createSentinelRankDictionaryThis functions creates the dictionary structure. (String)
createSuffixTrieCreates a trie of all suffixes of a text. (String)
createTrieCreates a trie. (String)
createTrieOnReverseCreates a trie for all reversed keywords. (String)
dependentTest whether object depends on other objects.
determineConsensusSeqDetermines the consensus pattern of a given profile. (String)
emptyTest a container for being empty. (String)
endThe end of a container. (String)
endPositionEnd position of object in host. (String)
eraseErases a part of a container (String)
eraseBackDeletes the last item of a container and reduces its size by 1. The container must have a size greater than or equal to 1. (String)
extendSeedExtends a seed. (String)
findIntervalsFind all intervals that contain the query point or overlap with the query interval. (String)
findIntervalsExcludeTouchingFind all intervals that contain the query point, exclude intervals that touch the query, i.e. where the query point equals the start or end point. (String)
findRepeatsSearch for repeats in a text. (String)
frontThe first item in container. (ContainerConcept)
getDistanceMatrixComputes a pairwise distance matrix from an alignment graph. (String)
getObjectIdA value that identifies the underlying sequence. (String)
getSuccessorGets the successor for a given vertex and an edge label. For an automaton a single character is required whereas for a word graph getSuccessor takes a string. (String)
getValueAccess to the value. (ContainerConcept)
globalAlignmentScoreComputes the best global pairwise alignment score. (String)
goDownIterates down one edge or a path in a tree. (String)
heaviestIncreasingSubsequenceComputes the heaviest increasing subsequence. (String)
infixCreates infix object. (String)
infixWithLengthCreates infix object. (String)
integrateAlignIntegrates an alignment into another by copying the gaps. (String)
iterIterator to item at given position. (String)
lengthThe number of items/characters. (String)
longestCommonSubsequenceComputes the longest common subsequence. (String)
longestIncreasingSubsequenceComputes the longest increasing subsequence. (String)
moveValueAssigns value to item. (ContainerConcept)
njTreeComputes a guide tree from a distance matrix. (String)
parseStringParses a string one character at a time and moves accordingly in the automaton. (String)
positionPosition of an iterator. (ContainerConcept)
prefixCreates prefix object. (String)
readFastaRead first sequence from a FASTA file. (String)
readRecordRead the next sequence record from SequenceStream. (String)
readRegionLoad the infix of a sequence from a FaiIndex. (String)
readSequenceLoad a whole sequence from an FaiIndex. (String)
replaceReplaces a part of a container with another container. (String)
reserveIncreases the capacity. (String)
resizeResizes a container. If the new length exceeds the old length the new elements are filled with copies of value. (String)
resizeSpaceMakes free space in container (String)
reverseComplementReverse and complement a sequence or a StringSet in-place. (String)
setHaystackSets the haystack of a Finder object. (String)
setHostSets the host of an object. (String)
setNeedleSets the needle of a Pattern object and optionally induces preprocessing. (String)
shapeToStringConverts a given shape into a sequence of '1' (relevant position) and '0' (irrelevant position). (String)
shareResourcesDetermines whether two sequences share the same resource. (String)
stringSetLimitsRetrieves a string of delimiter positions of a StringSet which is needed for local<->global position conversions. (String)
stringToShapeTakes a shape given as a string of '1' (relevant position) and '0' (irrelevant position) and converts it into a Shape object. (String)
stringToStringSetTransform a String into a StringSet containing this String. (String)
suffixCreates suffix object. (String)
swapSwaps the contents of two values. (String)
toCStringAccess sequence as c-style string. (String)
toLowerConvert characters in sequence or StringSet to lower case in-place. (String)
topologicalSortPerforms a topological sort on a directed acyclic graph (DAG). (String)
toUpperConvert characters in sequence or StringSet to lower case in-place. (String)
unhashInverse of the hash function; for ungapped shapes. (String)
upgmaTreeComputes a guide tree from a distance matrix. (String)
valueReference to the value. (String)
writeRecordWrite one sequence record from to a SequenceStream object. (String)
Examples
// Create a string str:
String<char> str = "this is a test string";
 
// Create a c-style string object for str:
String<char, CStyle> cStyle = str;
 
// Now use cStyle as char array:
strcmp(cStyle, "compare it to this string");
If the c-style string is needed only temporarily, the function toCString can be used:
String<char> str = "this is a test string";
strcmp(toCString(str), "compare it to this string");
See Also
SeqAn - Sequence Analysis Library - www.seqan.de
 

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