Disambiguate {DECIPHER} | R Documentation

## Expand Ambiguities into All Permutations of a DNAStringSet

### Description

Performs the inverse function of `ConsensusSequence` by expanding any ambiguities present in sequences.

### Usage

    Disambiguate(myXStringSet)

### Arguments

`myXStringSet` | A `DNAStringSet` or `RNAStringSet` object of sequences.

### Details

Ambiguity codes in the `IUPAC_CODE_MAP` can be used to represent multiple nucleotides at a single position. Using these letters, multiple oligonucleotide permutations can be represented with a single ambiguous sequence. This function expands each sequence in the `DNAStringSet` input into all of its permutations. Note that sequences with many ambiguities can result in a very large number of potential permutations.

### Value

A `DNAStringSetList` or `RNAStringSetList` with one element for each sequence in `myXStringSet`.

### Author(s)

Erik Wright eswright@pitt.edu

### See Also

`ConsensusSequence`

### Examples

    dna <- DNAStringSet(c("ACST", "NNN"))
    dna_list <- Disambiguate(dna)
    dna_list[[1]]
    dna_list[[2]]
    unlist(dna_list)

    rna <- RNAStringSet(c("ACGU", "AGAU")) # 2 permutations
    rna <- ConsensusSequence(rna) # "ASRU"
    Disambiguate(rna) # 4 permutations

[Package DECIPHER version 2.20.0 Index]