Learn R Programming

DECIPHER (version 2.0.2)

Disambiguate: 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.

Value

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

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.

See Also

ConsensusSequence

Examples

Run this code
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

Run the code above in your browser using DataLab