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

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

summary_sstacks(sstacks.log, verbose = FALSE)

Arguments

sstacks.log

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

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_IN_CATALOG: The number of locus in the catalog.

  3. LOCUS_IN_SAMPLES: The number of locus in the sample.

  4. MATCHING_LOCI: The number of matching loci

  5. BLACKLISTED_LOCI_NO_VERIFIED_HAPLOTYPES: The number of loci with no verfied haplotypes.

  6. BLACKLISTED_LOCI_MATCHING_MORE_1_CATALOG_LOCUS: The number of loci that matched more than one catalog locus and were excluded.

  7. BLACKLISTED_LOCI_UNACCOUNTED_SNP: The number of loci that contained SNPs unaccounted for in the catalog and were excluded.

  8. HAPLOTYPES_VERIFIED: The number of haplotypes verified by the total number of haplotypes examined.

  9. GAPPED_ALIGNMENTS_ATTEMPTED: The number of gapped alignments attempted

  10. LOCI_MATCHED_1_CATALOG_LOCUS: The number of loci that matched more than one catalog locus and were excluded.

  11. HAPLOTYPES_VERIFIED_EXAMINED: The number of haplotypes verified by the total number of haplotypes examined.

  12. BLACKLISTED_LOCI_MATCHED_NO_CATALOG: The number of loci blacklisted because of no match with the catalog.

  13. GAPPED_BLACKLISTED_LOCI_MATCHING_MORE_1_CATALOG_LOCUS: The number of loci that matched more than one catalog locus and were excluded.

  14. GAPPED_BLACKLISTED_LOCI_UNACCOUNTED_SNP: The number of loci that contained SNPs unaccounted for in the catalog and were excluded.

  15. LOCI_NO_VERIFIED_HAPLOTYPES: The number of loci with no verified haplotypes.

  16. BLACKLISTED_LOCI_INCONSISTENT_ALIGNMENTS: The number of loci blacklisted because of inconsistent alignments.

  17. TOTAL_SAMPLE_LOCI: This is the number of loci that will be used in stacks tsv2bam.

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) { sum <- stackr::summary_sstacks( sstacks.log = "09_log_files/sstacks_20191101@1108.log", verbose = TRUE ) }