Loads in one set of GWAS results from a bigsnp GWAS, a mash object, RQTL2 output, or a dataframe with 'CHR', 'start', and 'end' columns for the genome of Panicum virgatum. Then, it constructs SNP tables meeting different criteria using these genomic intervals.

pvdiv_table_topsnps(
  df,
  type = c("bigsnp", "mash", "rqtl2", "table"),
  n = 10,
  FDRalpha = 0.1,
  rangevector = c(0, 10000),
  snp = NULL,
  txdb = NULL,
  anno_info = switchgrassGWAS::anno_info
)

Arguments

df

a data frame or tbl_df. Can be bigsnpr output, mashr output (loaded into R), r/qtl2 output (specify the path to a saved .csv file), or, for Panicum virgatum intervals in another format, a data frame containing columns 'CHR', 'start', and 'end'.

type

Type of Panicum virgatum genomic marker input specified by the df parameter. Options are "bigsnp", "mash", "rqtl2", and "table". Defaults to 'bigsnp'.

n

An integer or integer vector The numberof most significant SNPs to select (by p-value). Set to NA to omit this table. Default is 10.

FDRalpha

The false discovery rate. Numeric, a number or vector of numbers between 0 and 1. Set to NA to omit this table. Default is 0.1.

rangevector

How far from the significant SNP should annotations be pulled? Can be an integer or a vector of integers. Default is 0 (the SNP itself) and a 10 kbp window around the SNP.

snp

For data frames of type "mash" or "bigsnp", the bigSNP object used to create your data. Load into R with bigsnpr::snp_attach().

txdb

Annotation information from Pvirgatum_516_v5.1.gene.txdb.sqlite

anno_info

Gene information from Pvirgatum_516_v5.1.annotation_info.txt

Value

A list containing dataframes of SNPs. If more than one dataframe is returned, they are named using the criteria used to select the SNPs in the dataframe.