You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
gwasrapidd facilitates the access to the Catalog via the REST API,
25
+
`{gwasrapidd}` facilitates the access to the Catalog via the REST API,
31
26
allowing you to programmatically retrieve data directly into R.
32
27
33
28
##GWAS Catalog Entities
34
29
35
-
The Catalog REST API is organized around four core entities: studies, associations, variants, and traits.**gwasrapidd** provides four corresponding functions to get each of the entities:`get_studies()`,`get_associations()`,`get_variants()`, and`get_traits()`.
30
+
The Catalog REST API is organized around four core entities:
31
+
32
+
- studies
33
+
- associations
34
+
- variants
35
+
- traits
36
36
37
-
Each function maps to an appropriately named S4 classed object:[studies](https://rmagno.eu/gwasrapidd/reference/studies-class.html),[associations](https://rmagno.eu/gwasrapidd/reference/associations-class.html),[variants](https://rmagno.eu/gwasrapidd/reference/variants-class.html), and[traits](https://rmagno.eu/gwasrapidd/reference/traits-class.html) (see Figure 1).
37
+
`{gwasrapidd}` provides four corresponding functions to get each of the
38
+
entities:`get_studies()`,`get_associations()`,`get_variants()`, and
39
+
`get_traits()`.
38
40
41
+
Each function maps to an appropriately named S4 classed object:[studies](https://rmagno.eu/gwasrapidd/reference/studies-class.html),[associations](https://rmagno.eu/gwasrapidd/reference/associations-class.html),[variants](https://rmagno.eu/gwasrapidd/reference/variants-class.html), and[traits](https://rmagno.eu/gwasrapidd/reference/traits-class.html) (see Figure\@ref(fig:fns)).
You can use a combination of several search criteria with each retrieval function as shown in Figure 2. For example, if you want to get studies using either one of these two criteria:*study accession identifier* and*variant identifier*, you could run the following code:
This command returns all studies that match either`'GCST000858'` or`'rs12752552'`. This is equivalent to running`get_studies` separately on each criteria, and combining the results afterwards:
64
+
This command returns all studies that match either`'GCST000858'` or
65
+
`'rs12752552'`. This is equivalent to running`get_studies` separately on each
All four retrieval functions accept the`set_operation` parameter which defines the way the results obtained with each criterion are combined. The two options for this parameter are`'union'` (default) or`'intersection'`, resulting, respectively, in an OR or AND operation.
60
76
61
-
<imgsrc="../man/figures/get_criteria.png"alt="Figure 2 | gwasrapidd arguments for retrieval functions. Colors indicate the criteria that can be used for retrieving GWAS Catalog entities: studies (green), associations (red), variants (purple), and traits (orange)."width="500"style="display:block;margin:autoautoauto0;" />
77
+
```{r criteria, out.width = "70%", echo=FALSE, fig.cap='`{gwasrapidd}` arguments for retrieval functions. Colors indicate the criteria that can be used for retrieving GWAS Catalog entities: studies (green), associations (red), variants (purple), and traits (orange).'}
##Example 1 |Finding Risk Alleles Associated with Autoimmune Disease
81
+
## Finding Risk Alleles Associated with Autoimmune Disease
64
82
65
83
As a first example, take the work by @Light2014. In this work the authors focused on variants that had been previously reported in genome-wide association studies (GWAS) for autoimmune disease.