Read a GWAS results file into a data frame.
Path to a file containing GWAS summary statistics. If multiple
paths are specified all files will be read in and combined into a single
Vector of characters that represent missing value codes. By
default the following strings are interpreted as
Convert chromosomes to ordered factors with labels based on the specified style (default is
a shell command that preprocesses the file; see below for more details
Provide description of processing steps
We use the Homo sapiens chromosome styles defined in Bioconductor's
Valid options include
"dbsnp". The following table provides a preview of each style (note
ensembl are identical):
preprocessor argument allows you to specify shell commands that
preprocess the file before it's read into R. For example, we could use
grep to filter our results to include only markers with an RS number:
read_gwas("my-results.txt", preprocess = "grep -e '^rs'")
read_gwas() handles the header row separately so column
labels wouldn't be filtered out by
grep in this example.
By default, the input filename is appended to
prior to execution. However, you can control where the filename should be
inserted in the command by using
%s as a placeholder. In the following
tr is being used to remove null terminators:
read_gwas("my-results.txt", preprocess = "tr -d '\000' < %s")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.