phenotype_by_snp: Get intersection between phenotype, and SNP presence.

View source: R/gwar.R

phenotype_by_snpR Documentation

Get intersection between phenotype, and SNP presence.

Description

Get intersection between phenotype, and SNP presence.

Usage

phenotype_by_snp(
  phenotype_table,
  phenotype,
  gwas_table,
  SNPrank,
  acc_col = "ACC_ID",
  specific = NULL,
  plot = FALSE,
  nobees = FALSE,
  SNPmatrix = NULL,
  ...
)

Arguments

phenotype_table

a table containing phenotyping measurements, and accession ids (see below)

phenotype

a specific phenotype from the phenotype table. Must match to a column name of the phenotype table

gwas_table

Object returned from format_gwas function

SNPrank

The (-log10(p)) rank of the SNP of interest

acc_col

the column that contains accession identifiers.

specific

(optional) treatment column that was used to split samples for specific GWAS.

plot

Default: FALSE. Toggle if a plot should be returned

nobees

Set to true to disable beeswarm geom (only relevant if plot = TRUE)

SNPmatrix,

Provide SNPmatrix to control if accessions are based on 1001genomes.org or local matrix (default: NULL -> use 1001genomes).

...

Arguments passed to other functions. Most relevant is

Details

Based on a table of phenotypes, a phenotype name, a GWAS table and a rank, and a SNPmatrix returns a table of phenotype values for that gene, where accessions that contain the SNP have TRUE in SNP.

Also provides a simple default plot, toggled via the plot argument

See Also

get_phenotype

format_gwas

expression_by_snp

get_accessions


Gregor-Mendel-Institute/gwaR documentation built on Feb. 8, 2023, 8:34 p.m.