cutNs - SeqAn API Documentation

# fn() cutNs
Cut out all masked sequences from a Dna5String.

Defined in | <seqan/alignment_free.h>
Signature | `void cutNs(sequenceCut, sequence);`

## Parameters

`sequenceCut` | Dna5String similar to sequence with all Ns cut out.
`sequence` | Masked DNA sequence.

## Detailed Description

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.

### Examples

Transform a masked DNA sequence into an unmasked sequences with all masked parts cut out

    using namespace seqan;
    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"

## Data Races

If not stated otherwise, concurrent invocation is not guaranteed to be thread-safe.

## See Also

- MarkovModel
- alignmentFreeComparison
- stringToStringSet

#### Dox Sources

    /*!
     * @fn cutNs
     *
     * @headerfile <seqan/alignment_free.h>
     *
     * @brief Cut out all masked sequences from a Dna5String.
     *
     * @signature void cutNs(sequenceCut, sequence);
     *
     * @param[out] sequenceCut Dna5String similar to sequence with all Ns cut out.
     * @param[in] sequence Masked DNA sequence.
     *
     * 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.
     *
     * @section Examples
     *
     * Transform a masked DNA sequence into an unmasked sequences with all masked
     * parts cut out
     *
     * @code{.cpp}
     * using namespace seqan;
     * 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"
     * @endcode
     *
     *
     * @see MarkovModel
     * @see stringToStringSet
     * @see alignmentFreeComparison
     */