R/UniqueMutations.R

Defines functions UniqueMutations

Documented in UniqueMutations

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

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.