SegSites <-
function(seqs){
## Segregating sites: Number of sites with mutations
## seqs: an aligment of haplotypes
if(!is(seqs, "DNAStringSet") & !is(seqs, "AAStringSet"))
stop("The input object must be a DNAStringSet or AAStringSet\n")
return(sum(colSums(FreqMat(seqs)> 0)> 1))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.