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)))
}
VHIRHepatiques/QSutils documentation built on April 27, 2024, 10:29 p.m.