Takes a mash object and a bigsnp object and returns a dataframe containing summary metadata for each SNP in the mash object. This information includes details for the alternate allele of each SNP such as its frequency in the bigsnp object, the average latitude, longitude, elevation, and year that the SNP was sampled, and how frequently individuals with the SNP have specific subpop and ecotype identities in the bigsnp object. NB: This is VERY slow and best for up to tens of thousands of SNPs, NOT millions of SNPs.

get_mash_metadata(m, snp, suffix = "", saveoutput = FALSE)

Arguments

m

A mash object (outputted by mash).

snp

A bigsnp object

suffix

Character. Optional. A unique suffix used to save the files, instead of the current date & time.

saveoutput

Logical. Should the output be saved to the path?

Value

A data frame containing details for the alternate allele of each SNP such as its frequency in the bigsnp object, the average latitude, longitude, elevation, and year that the SNP was sampled, and how frequently individuals with the SNP have specific subpop and ecotype identities in the bigsnp object.

Note

This function is VERY slow and best for up to tens of thousands of SNPs, NOT millions of SNPs. Use vcftools instead for millions of SNPs.