makeCogs-methods: Make cogs

makeCogR Documentation

Make cogs

Description

Builds the cog to pass to makeGear

Usage

makeCog(analysisType = "args", ...)

Arguments

analysisType

character. Analysis type:

...

See examples or the vignette for what arguments to pass in ...
"args": Generic arguments for an analysis
"diversityFULL": Arguments spcific to the Diversity module

Currently supports:

  • pi: Neis nucleotide diversity

  • dxy: Neis absolute genetic distance

  • da: Nei's ancesteral distance

  • dmin: minimum hamming distance between samples

  • dmax: maximum hamming distance between samples

  • Fst: Nei (1982) \gammast which estimates Fst

  • RNDmin: minimum Relative node depth

  • federRND: Relative Node Depth using Feder (2005)

"admixture": Arguments spcific to the Admixture module
"outputLoci": Arguments spcific to the Output Loci module
"outputTrees": Arguments spcific to the Output Trees module

Details

backend methods to build cogs for a gear object
Specify the analysisType and the corresponding argument set

Value

Output a cog object to

Examples

## Not run: 

# Argument cog
## Necessary arguments are:
## ploidy: The ploidy called in the genotyping process.
## nCores: Number of cores to run analysis over.
## minSites: The proportion of sites within the window with a genotype called. 
## pairwiseDeletion: This will remove missing data in a pairwise manner i.e. will not count missing data as informative.
## removeIndels: Should indels be removed from the analysis?
arg <- makeCog(analysisType = "args", ploidy = 2, nCores = 4, minSites = 0.2, pairwiseDeletion = TRUE, removeIndels = TRUE)

# Genetic Diversity cog
## stats: What statistics should be run? 
diversity <- makeCog(analysisType = "diversityFULL", stats = "all")

# Admixture cog
## threePop: structure for f3 stat 
## fourPop: structure for f4 and fd stat 
admix <- makeCog(analysisType = "admixture", threePop = list(c("P1", "P2", "O")),
                 fourPop = list(c("P1", "P2", "P3", "O")))
                 
# Output Loci cog
## outputDirectory: The directory to output fasta files to for downstream analysis
## alleles: Output "seperate" or "collapsed" genotypes
outloci <-  makeCog(analysisType = "outputLoci", outputDirectory = "~/path/to/dir/", alleles = "seperate")

# Output Trees cog
## outputDirectory: The directory to output fasta files to for downstream analysis
## alleles: Output "seperate" or "collapsed" genotypes
outTrees <-  makeCog(analysisType = "outputTrees", outputDirectory = "~/path/to/dir/", alleles = "seperate")

## End(Not run)


CMWbio/geaR documentation built on April 22, 2023, 6:23 a.m.