UniqueMutations <-
function(hseqs){
## Computes the number of unique mutations in the alignment
## seqs: an aligment of haplotypes
if(!is(hseqs, "DNAStringSet") & !is(hseqs, "AAStringSet"))
stop("The input object must be DNAStringSet or AAStringSet \n")
mut.tbl <- MutsTbl(hseqs)
return(sum(rowSums(mut.tbl)))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.