R/SegSites.R

Defines functions SegSites

Documented in SegSites

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))
}

Try the QSutils package in your browser

Any scripts or data that you put into this service are public.

QSutils documentation built on Nov. 8, 2020, 7:42 p.m.