StripDown {polyRAD} | R Documentation |
Remove Unneeded Slots to Conserve Memory
Description
This function is designed to be used after a RADdata
object
has been processed by one of the pipeline functions.
Slots that are no longer needed are removed in order to conserve memory.
Usage
StripDown(object, ...)
## S3 method for class 'RADdata'
StripDown(object,
remove.slots = c("depthSamplingPermutations",
"depthRatio", "antiAlleleDepth",
"genotypeLikelihood", "priorProb",
"priorProbLD"),
...)
Arguments
object |
A |
remove.slots |
A character vector listing slots that will be removed. |
... |
Additional arguments (none implemented). |
Details
The default slots that are removed take up a lot of memory but are not used
by the export functions. Other slots to consider removing are
alleleFreq
, alleleFreqByTaxa
, PCA
, locDepth
,
alleleDepth
, and alleleLinkages
. Of course, if you
have custom uses for some of the slots that are removed by default, you can
change the remove.slots
vector to not include them.
The function will throw an error if the user attempts to remove key slots that are needed for export and downstream analysis, including:
alleles2loc
alleleNucleotides
locTable
possiblePloidies
ploidyChiSq
posteriorProb
Value
A RADdata
object
Author(s)
Lindsay V. Clark
See Also
Examples
# load a dataset for this example
data(exampleRAD)
# run a pipeline
exampleRAD <- IterateHWE(exampleRAD)
# check the size of the resulting object
object.size(exampleRAD)
# remove unneeded slots
exampleRAD <- StripDown(exampleRAD)
# check object size again
object.size(exampleRAD)