Expand Ambiguities into All Permutations of a DNAStringSet

Share:

Description

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

Usage

1
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 DECIPHER@cae.wisc.edu

See Also

ConsensusSequence

Examples

1
2
3
4
5
6
7
8
9
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

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.