isPoly: Assess polymorphism in genind/genpop objects

Description Usage Arguments Value Author(s) Examples

Description

The simple function isPoly can be used to check which loci are polymorphic, or alternatively to check which alleles give rise to polymorphism.

Usage

1
2
3
4
## S4 method for signature 'genind'
isPoly(x, by=c("locus","allele"), thres=1/100)
## S4 method for signature 'genpop'
isPoly(x, by=c("locus","allele"), thres=1/100)

Arguments

x

a genind and genpop object

by

a character being "locus" or "allele", indicating whether results should indicate polymorphic loci ("locus"), or alleles giving rise to polymorphism ("allele").

thres

a numeric value giving the minimum frequency of an allele giving rise to polymorphism (defaults to 0.01).

Value

A vector of logicals.

Author(s)

Thibaut Jombart t.jombart@imperial.ac.uk

Examples

1
2
3
4
5
6
7
## Not run: 
data(nancycats)
isPoly(nancycats,by="loc", thres=0.1)
isPoly(nancycats[1:3],by="loc", thres=0.1)
genind2df(nancycats[1:3])

## End(Not run)

Example output

Loading required package: ade4
Registered S3 method overwritten by 'spdep':
  method   from
  plot.mst ape 

   /// adegenet 2.1.3 is loaded ////////////

   > overview: '?adegenet'
   > tutorials/doc/questions: 'adegenetWeb()' 
   > bug reports/feature requests: adegenetIssues()


 fca8 fca23 fca43 fca45 fca77 fca78 fca90 fca96 fca37 
 TRUE  TRUE  TRUE  TRUE  TRUE  TRUE  TRUE  TRUE  TRUE 
 fca8 fca23 fca43 fca45 fca77 fca78 fca90 fca96 fca37 
 TRUE  TRUE  TRUE  TRUE  TRUE  TRUE  TRUE FALSE  TRUE 
     pop   fca8  fca23  fca43  fca45  fca77  fca78  fca90  fca96  fca37
N215 P01   <NA> 136146 139139 116120 156156 142148 199199 113113 208208
N216 P01   <NA> 146146 139145 120126 156156 142148 185199 113113 208208
N217 P01 135143 136146 141141 116116 152156 142142 197197 113113 210210

adegenet documentation built on July 18, 2021, 1:06 a.m.