SequencesToGenind {adegenet} | R Documentation |
These functions take an alignement of sequences and translate SNPs
into a genind object. Note that only polymorphic loci
are retained.
Currently, accepted sequence formats are:
- DNAbin (ape package): function DNAbin2genind
- alignement (seqinr package): to come...
DNAbin2genind(x, pop=NULL, exp.char=c("a","t","g","c"), na.char=NULL, polyThres=1/100)
x |
an object containing aligned sequences. |
pop |
an optional factor giving the population to which each sequence belongs. |
exp.char |
a vector of single character providing expected values; all other characters will be turned to NA. |
na.char |
a vector of single characters providing values that should be
considered as NA. If not NULL, this is used instead of exp.char . |
polyThres |
the minimum frequency of a minor allele for a locus to be considered as polymorphic (defaults to 0.01). |
an object of the class genind
Thibaut Jombart t.jombart@imperial.ac.uk
import2genind
, read.genetix
,
read.fstat
, read.structure
,
read.genepop
, DNAbin
.
if(require(ape)){ data(woodmouse) x <- DNAbin2genind(woodmouse) x genind2df(x) }