The GDC requires an auth token for downloading data that are "controlled access". For example, BAM files for human datasets, germline variant calls, and SNP array raw data all are protected as "controlled access". For these files, a GDC access token is required. See the https://docs.gdc.cancer.gov/Data_Portal/Users_Guide/Authentication/#gdc-authentication-tokens. Note that this function simply returns a string value. It is possible to keep the GDC token in a variable in R or to pass a string directly to the appropriate parameter. This function is simply a convenience function for alternative approaches to get a token from an environment variable or a file.
This function will resolve locations of the GDC token in the following order:
from the environment variable,
GDC_TOKEN, expected to
contain the token downloaded from the GDC as a string
readLines to read a file named in the environment
readLines to read from a file called
.gdc_token in the user's
If all of these fail, this function will return an error.
character(1) (invisibly, to protect against inadvertently printing) the GDC token.
1 2 3
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.