fn() stringToStringSetTransform a String into a StringSet containing this String.
Transform a String into a StringSet containing this String.
Defined in | <seqan/alignment_free.h> |
---|---|
Signature |
void stringToStringSet(stringSet, string);
void stringToStringSet(dnaStringSet, dna5String);
|
Parameters
stringSet
|
StringSet to create with one sequence. |
---|---|
string
|
String to create the string set of. |
dnaStringSet
|
StringSet of Strings over the alphabet Dna. |
dna5String
|
String over the alphabet Dna5 to convert. |
Detailed Description
Note:
The second variant removes all N characters from the 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"
Data Races
Thread safety unknown!