sequence2gtypes: Convert Sequences To 'gtypes'

View source: R/sequence2gtypes.R

sequence2gtypesR Documentation

Convert Sequences To gtypes

Description

Create a gtypes object from sequence data.

Usage

sequence2gtypes(
  x,
  strata = NULL,
  seq.names = NULL,
  schemes = NULL,
  description = NULL,
  other = NULL
)

Arguments

x

DNA sequences as a character matrix, a DNAbin object, or multidna object.

strata

a vector or factor giving stratification for each sequence. If not provided all individuals are assigned to the same stratum (Default).

seq.names

names for each set of sequences. If not provided default names are generated.

schemes

an optional data.frame of stratification schemes.

description

an optional label for the object.

other

a list to carry other related information (optional).

Value

a gtypes object.

Author(s)

Eric Archer eric.archer@noaa.gov

See Also

gtypes.initialize, as.matrix.gtypes, as.data.frame.gtypes, gtypes2genind, gtypes2loci, gtypes2phyDat

Examples

#--- create a haploid sequence (mtDNA) gtypes object
data(dolph.strata)
data(dolph.seqs)
strata <- dolph.strata$fine
names(strata) <- dolph.strata$ids
dloop.fine <- sequence2gtypes(dolph.seqs, strata, seq.names = "dLoop", 
description = "dLoop: fine-scale stratification")


EricArcher/strataG documentation built on Feb. 12, 2023, 4:11 a.m.