Function
stringToStringSet
Transform a String into a StringSet containing this String.
stringToStringSet(stringSet, string)
stringToStringSet(dnaStringSet, dna5String)
Include Headers
seqan/alignment_free.h
Parameters
stringSet
StringSet containing string
Types: StringSet
string
String
Types: String
dnaStringSet
StringSet<DnaString> created from dna5String by cutting out all Ns from dna5String.
Types: StringSet
dna5String
DNA5 String where all Ns should be removed, the remaining sequences will be stored in dnaStringSet
Types: Dna5String
Return Values
Returns a StringSet consisting of string, in the case of Dna5 to Dna conversion all Ns will be removed from dna5String.
Examples
Transform a masked DNA sequence into a set of sequences with all masked parts removed.
using namespace seqan;
Dna5String sequenceDna5 =
    "NNNNNNTTTCCGAAAAGGTANNNNNGCAACTTTANNNCGTGATCAAAGTTTTCCCCGTCGAAATTGGGNNTG";
StringSet<DnaString> sequencesDna;
stringToStringSet(sequencesDna, sequenceDna5);
// Print the masked sequence
std::cout<<sequenceDna5<<"\n";
// Print the sequence with the masked parts removed
for(unsigned i = 0; i < length(sequencesDna); ++i)
    std::cout<<sequencesDna[i]<<"\n";
// sequencesDna[0] = "TTTCCGAAAAGTA"
// sequencesDna[1] = "GCAACTTTA"
// sequencesDna[2] = "CGTGATCAAAGTTTTCCCCGTCGAAATTGGG"
// sequencesDna[3] = "TG"
SeqAn - Sequence Analysis Library - www.seqan.de
 

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