write_cbio_clinical | R Documentation |
Wrapper function for creating clinical files. There are two: PATIENT and SAMPLE.
The PATIENT file is actually optional, so there are only checks for making sure SAMPLE can be created.
df
is expected to be a table containing clinical data available, and maybe even some irrelevant data
(since NF data is not well-normalized and there is a single table with everything).
write_cbio_clinical(
df,
ref_map,
na_recode = c("NA", "NaN", "unknown", "Unknown"),
delim = "\t",
publish_dir = ".",
verbose = TRUE
)
df |
A |
ref_map |
YAML or JSON mapping. See details. |
na_recode |
Possible NA values to replace with a blank string (which seems to be standard) in exported file. |
delim |
Delimiter character used for writing file, defaults to tab-delimited per cBioPortal specs. |
publish_dir |
Directory path to write to, defaults to current. |
verbose |
Report where file has been written. |
This relies on a ref_map
specification to know which clinical data to include for cBioPortal
and how to segregate the clinical attributes into the right files.
For example, say df
contains clinical variables A-X, but mappings are only specified for
variables A-C, L-M and others are not meant to be surfaced/made public. This will subset the df
to what's specified in the mapping.
Conversely, if there is a mapping for variable Z that is not in the clinical data, this will throw error.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.