The function calculates the SNP matrix.
SNP(segSites)
segSites | segregating sites matrix. See details. |
---|
List containing the following components:
the positions on which one or more mutations occurred.
the single-nucleotide polymorphism matrix with class 'DNAmat_class'.
In the segregating sites matrix, each row is a DNA sequence represented
by zeros and ones, where 1 indicates that a mutation has occurred,
0 that no mutations have occurred. If the segSites
matrix contains
anything other than zeros and ones, it will cause an error.
The SNP matrix extracts the columns from the segregating sites matrix where one or more mutations have happened, and thus it is a more compact representation than the segregating sites matrix.
#> $positions #> [1] 2 3 #> #> $SNPmat #> [,1] [,2] #> [1,] 1 0 #> [2,] 0 0 #> [3,] 0 1 #>