This function reads the log file of stackr run_cstacks and summarise the information.

The information shown is particularly helpful when choosing the best thresholds. This function is run automatically inside run_cstacks, but it can be run on it's own.

summary_cstacks(cstacks.log, verbose = FALSE)

Arguments

cstacks.log

(path, character). The cstacks log file generated by run_cstacks.

verbose

(logical, optional) Make the function a little more chatty during execution. Default: verbose = FALSE.

Value

When the function is run separately it returns an object in the global environment and a file in 08_stacks_results folder, if it exists and if not, the file is written in the working directory. The summary is a tibble:

  1. INDIVIDUALS: the sample id

  2. LOCUS_CATALOG_START: the number of locus in the catalog at the start when processing the sample.

  3. LOCI_MATCH_TO_CATALOG: the number of loci for the sample matching loci in the catalog.

  4. LOCI_MATCH_TO_CATALOG_GAPPED: the number of loci for the sample matching loci in the catalog after allowing for gapped alignment.

  5. LOCI_ADDED: the number of loci added to the catalog after processing the sample.

  6. LOCI_LINKED: the number of loci that matched more than one catalog locus (linked loci).

  7. LOCUS_CATALOG_END: the number of locus in the catalog at the end of processing the sample.

  8. MISMATCHES: the number of mismatches allowed between loci of different samples.

References

Catchen JM, Amores A, Hohenlohe PA et al. (2011) Stacks: Building and Genotyping Loci De Novo From Short-Read Sequences. G3, 1, 171-182.

Catchen JM, Hohenlohe PA, Bassham S, Amores A, Cresko WA (2013) Stacks: an analysis tool set for population genomics. Molecular Ecology, 22, 3124-3140.

See also

Examples

if (FALSE) { cstacks.summary <- stackr::summary_cstacks( cstacks.log = "09_log_files/cstacks_20191101@1108.log", verbose = TRUE ) }