R Template¶
This notebook is a template for SolveBio R examples. Download the original notebook here.
Install and Load Packages¶
1 2 | install.packages("solvebio", repos = 'http://cran.us.r-project.org') library("solvebio") |
Log-in to SolveBio¶
You'll need your SolveBio API key to run this notebook. You can get your API key from your Security Settings.
1 | solvebio::login("YOUR API KEY") |
Example: Get the top genes in ClinVar¶
1 2 3 4 5 6 7 | # Retrieve the top gene symbols in ClinVar clinvar <- Dataset.get_by_full_path("solveBio:public:/ClinVar/3.7.4-2017-01-30/Combined-GRCh37") facets <- Dataset.facets(id = clinvar$id, facets = list("gene_symbol")) # Process list of (gene, count) pairs and plot them results <- do.call(rbind, facets$gene_symbol) barplot(as.numeric(results[,2]), names = results[,1], cex.names = 0.5) |
