Use devtools or
remotes to install the package from GitHub. Below
is an example of how to install the package using devtools
.
devtools::install_github("danforthcenter/pgwasdbc")
To query the database from your code, you can use the namespace pgwasdbc
.
Below is a list of the functions available.
list_bp_by_liketrait_for_species(trait, species, cutoff)
List of SNP number, chromosome, trait, for a species given a p-value cutoff
trait (string) - name of the trait (case insensitive), the name can be a substring of the desired trait
species (string) - binomial name of species (e.g., "Zea mays")
cutoff (numeric) - maximum p-value cutoff, inclusive
list_bp_by_trait_for_species
(trait, species, cutoff)`List of SNP number, chromosome, trait, for a species given a p-value cutoff
trait (string) - name of the trait (case insensitive)
species (string) - binomial name of species (e.g., "Zea mays")
cutoff (numeric) - maximum p-value cutoff, inclusive
list_traits()
List name of all traits
list_species()
Lists binomial name and shortname for all species
list_growouts()
Lists growout name and location code for all growouts
list_traits_for_species(species)
Lists all known traits for a given species (by binomial name)
species (string) - binomial name of species
query(sql)
Execute a SQL statement; allows to running custom queries against the database. Permitted actions are limited by granted permissions on database for assigned user.
sql (string) - SQL statement (e.g., "SELECT * FROM species")
pgwasdbc::list_bp_by_liketrait_for_species(trait = "As75", cutoff = 0.01, species = "Zea mays")
pgwasdbc::query("SELECT * from trait")
Since this package depends on PostgreSQL drivers, you may need to manually install your operating system's respective Postgres development drivers.
Debian, Ubuntu
sudo apt install libpq-dev
Google Doc: Implementation & Feature Requests
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.