Description Usage Arguments Details Examples
View source: R/search_functions.R
This function allows you to scrape a unique link specified by an XPath, applied on an individual RCSB structure page. Concretely, this lets you obtain links to assets (like the FASTA file, PDB file, mmCIF file, etc.) if you have the corresponding XPath for that <a> element.
1 | getLinkFromPage(url, path, prepend = "http://www.rcsb.org")
|
url |
The url corresponding to the RCSB Structure Page in question |
path |
The path of the <a> element you're wanting to scrape a link from |
prepend |
Any string you want to prepend to the results |
To apply this to a vector, see 'getLinksFromPages“
1 2 3 4 | # This gets the FASTA file link associated with the 6B4V structure on RCSB
url <- "http://www.rcsb.org/structure/6B4V"
fasta_path <- '//*[@id="DownloadFilesButton"]/ul/li[1]/a'
getLinkFromPage(url, fasta_path)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.