get_mash_metadata: Get switchgrass metadata for SNPs in a mash object.

Description Usage Arguments Value Note

View source: R/pvdiv_mash_results.R

Description

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.

Usage

1
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.


Alice-MacQueen/switchgrassGWAS documentation built on Jan. 23, 2022, 7:55 p.m.