optimize_bigM: Optimize the M parameter during denovo stacks assembly

Description Usage Arguments Value Examples

View source: R/optimize_bigM.R

Description

This function requires the path to stacks vcf file(s) as input. There are slots for varying the M parameter from 1-8 (as recommended by Paris et al. 2017). After running stacks with each of the M options, plug the output vcf files into this function to calculate the effect of varying M on the number of SNPs/loci built. Plug the output of this function into vis_loci() to visualize the optimal the M parameter for your dataset at the 'R80' cutoff (Paris et al. 2017).

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
optimize_bigM(
  M1 = NULL,
  M2 = NULL,
  M3 = NULL,
  M4 = NULL,
  M5 = NULL,
  M6 = NULL,
  M7 = NULL,
  M8 = NULL
)

Arguments

M1

Path to the input vcf file for a run when M=1

M2

Path to the input vcf file for a run when M=2

M3

Path to the input vcf file for a run when M=3

M4

Path to the input vcf file for a run when M=4

M5

Path to the input vcf file for a run when M=5

M6

Path to the input vcf file for a run when M=6

M7

Path to the input vcf file for a run when M=7

M8

Path to the input vcf file for a run when M=8

Value

A list containing four summary dataframes, 'snp' showing the number of non-missing SNPs retained in each sample at each m value, 'loci' showing the number of non-missing loci retained in each sample at each m value, 'snp.R80' showing the total number of SNPs retained at an 80% completeness cutoff, and 'loci.R80' showing the total number of polymorphic loci retained at an 80% completeness cutoff.

Examples

1
optimize_bigM(M1=system.file("extdata","bigM1.vcf.gz",package="RADstackshelpR",mustWork=TRUE))

RADstackshelpR documentation built on Aug. 19, 2021, 5:06 p.m.