View source: R/classes_methods.R
MergeTaxaDepth | R Documentation |
This function should be used in situations where data that were imported as separate taxa should be merged into a single taxon. The function should be used before any of the pipeline functions for genotype calling. Read depths are summed across duplicate taxa and output as a single taxon.
MergeTaxaDepth(object, ...) ## S3 method for class 'RADdata' MergeTaxaDepth(object, taxa, ...)
object |
A |
taxa |
A character vector indicating taxa to be merged. The first taxon in the vector will be used to name the combined taxon in the output. |
... |
Additional arguments (none implemented). |
Examples of reasons to use this function:
Duplicate samples across different libraries were given different names so that preliminary analysis could confirm that they were truly the same (i.e. no mix-ups) before combining them.
Typos in the key file for the SNP mining software (TASSEL, Stacks, etc.) caused duplicate samples to have different names when they really should have had the same name.
To merge multiple sets of taxa into multiple combined taxa, this function can be run multiple times or in a loop.
A RADdata
object derived from object
. The alleleDepth
,
antiAlleleDepth
, locDepth
, depthRatio
, and
depthSamplingPermutation
slots, and "taxa"
and "nTaxa"
attributes, have been changed accordingly to reflect the merge.
Lindsay V. Clark
SubsetByTaxon
# dataset for this example data(exampleRAD) # merge the first three taxa into one exampleRADm <- MergeTaxaDepth(exampleRAD, c("sample001", "sample002", "sample003")) # inspect read depth exampleRAD$alleleDepth[1:3,] exampleRADm$alleleDepth[1:3,]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.