popnames: popnames

View source: R/popnames.R

popnamesR Documentation

popnames

Description

This function shows the population names slot from a DNAStringSet or an AAStringSet metadata information.

Usage

popnames(seq)

Arguments

seq

DNAStringSet or AAStringSet [mandatory]

Value

population names from metadata

Author(s)

Kristian K Ullrich

See Also

addpop2string

Examples

## load example sequence data
data(iupac, package="MSA2dist")
iupac.aa <- iupac |> cds2aa(shorten = TRUE)
## create poplist
poplist <- list(FRA = grep("Mmd.FRA", names(iupac)),
    GER = grep("Mmd.GER", names(iupac)),
    IRA = grep("Mmd.IRA", names(iupac)),
    AFG = grep("Mmm.AFG", names(iupac)))
iupac.aa <- iupac.aa |> addpop2string(poplist)
popnames(iupac.aa)

kullrich/MSA2dist documentation built on Nov. 14, 2024, 5:39 p.m.