Function
cutNs
Cut out all masked sequences from a Dna5String.
Include Headers
seqan/alignment_free.h
Parameters
Dna5String similar to sequence with all Ns cut out Types: Dna5String | |
Masked DNA sequence. Types: Dna5String |
Remarks
This function concatenates the nonmasked parts of the sequence, thereby changing the word content.
If you want to remove the masked parts of a sequence without concatenation, use stringToStringSet.
Return Values
Returns a Dna5String similar to the input sequence with all Ns cut out.
Examples
Transform a masked DNA sequence into an unmasked sequences with all masked parts cut out
Dna5String sequenceMasked =
"NNNNNNTTTCCGAAAAGGTANNNNNGCAACTTTANNNCGTGATCAAAGTTTTCCCCGTCGAAATTGGGNNTG";
Dna5String sequenceMaskedPartsRemoved;
cutNs(sequenceMaskedPartsRemoved, sequenceMasked);
// Print the masked sequence
std::cout<<sequenceMasked<<"\n";
// Print the sequence with the masked parts removed
std::cout<<sequenceMaskedPartsRemoved<<"\n";
// sequenceMasked =
// "NNNNNNTTTCCGAAAAGGTANNNNNGCAACTTTANNNCGTGATCAAAGTTTTCCCCGTCGAAATTGGGNNTG"
// sequenceMaskedPartsRemoved =
// "TTTCCGAAAAGGTAGCAACTTTACGTGATCAAAGTTTTCCCCGTCGAAATTGGGTG"
SeqAn - Sequence Analysis Library - www.seqan.de