View source: R/classes_methods.R
MergeRareHaplotypes | R Documentation |
MergeRareHaplotypes
searches for rare alleles in a
"RADdata"
object, and merges them into the most similar allele
at the same locus based on nucleotide sequence (or the most common allele if
multiple are equally similar). Read
depth is summed across merged alleles, and the alleleNucleotides
slot
of the "RADdata"
object contains IUPAC ambiguity codes to indicate
nucleotide differences across merged alleles. This function is designed to be
used immediately after data import.
MergeRareHaplotypes(object, ...) ## S3 method for class 'RADdata' MergeRareHaplotypes(object, min.ind.with.haplotype = 10, ...)
object |
A |
min.ind.with.haplotype |
The minimum number of taxa having reads from a given allele for that allele to not be merged. |
... |
Additional arguments; none implemented. |
Alleles with zero reads across the entire dataset are removed by
MergeRareHaplotypes
without merging nucleotide sequences. After
merging, at least one allele is left, even if it has fewer than
min.ind.with.haplotype
taxa with reads, as long as it has more than zero
taxa with reads.
A "RADdata"
object identical to object
, but with its
$alleleDepth
, $antiAlleleDepth
, $depthRatio
,
$depthSamplingPermutations
, $alleleNucleotides
, and
$alleles2loc
arguments adjusted after merging alleles.
Lindsay V. Clark
SubsetByLocus
, VCF2RADdata
, readStacks
data(exampleRAD) exampleRAD2 <- MergeRareHaplotypes(exampleRAD, min.ind.with.haplotype = 20) exampleRAD$alleleDepth[21:30,6:7] exampleRAD2$alleleDepth[21:30,6,drop=FALSE] exampleRAD$alleleNucleotides exampleRAD2$alleleNucleotides
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.