finalize_study.Rd
Finish setting up a new cBioPortal instance or updating an existing portal data set.
finalize_study(
seq_type_filter = "genome",
short_name = "GAMBL",
human_friendly_name = "GAMBL data",
project_name = "gambl_genome",
description = "GAMBL data from genome",
cancer_type = "mixed",
these_sample_ids,
overwrite = TRUE,
metacols,
metacol_names,
metacol_types,
metacol_prior,
out_dir
)
the seq type you are setting up a study for, default is "genome".
A concise name for your portal project.
A slightly more verbose name for your project.
Unique ID for your project.
A verbose description of your data set.
Cancer types included in study, default is "mixed".
A vector of all the sample_id that were included in any of the data files for cBioPortal (i.e the output from setup_study
and setup_fusions
).
Flag to specify that files should be overwritten if they exist. Default is TRUE.
Optional, specify any additional metadata/collate_result fields to be included in the cBioPortal metadata. Extra columns are specified as a vector of characters. If not provided, only "standard" metadata fields will be kept.
Separately specify the names of the columns given to metacols
as a vector of characters. The number of elements needs to match the total number of columns specified with metacols
. Required parameter if metacols
is being called.
Specify the data type for selected metadata columns as a vector of characters. The number of elements specified needs to match the number of selected columns with metacols
. Acceptable values are; STRING, NUMBER and BOOLEAN. Required parameter if metacols
is being called.
Explicitly state the priority of selected metadata columns as a vector of characters. A higher number indicates a higher priority. Required parameter if metacols
is being called.
The full path to the base directory where the files are being created.
Nothing.
This function should be run as the last (or third step) in setting up a new cBioPortal instance.
The functions that should be run prior to these functions are; setup_study and setup_fusions.
finalize_study creates all the necessary tables and metadata files and case lists that are required to import a new study into cBioPortal.
Note, that all parameter arguments used in this function have to match the same parameter arguments for the previously run functions (setup_study
and setup_fusions
).
This function allows the user to specify additional fields from the collated metadata file (besides the "standard" fields).
For more information on how to use, see metacols
and related parameters (metacol_names
, metacol_types
, and meta_prior
).
if (FALSE) {
#basic usage
finalize_study(these_sample_ids = c(ids, fusion_ids), out_dir = "GAMBLR/cBioPortal/instance01/")
#advanced usage
#get some samples
all_meta = get_gambl_metadata()
meta_sub = head(all_meta, 5)
my_samples = pull(meta_sub, sample_id)
#create a clinical file with additional collated metadata fields
finalize_study(these_sample_ids = my_samples,
out_dir = "../",
metacols = c("MeanCorrectedCoverage", "total_ssm"),
metacol_names = c("Mean Corrected Coverage", "Total SSM"),
metacol_types = c("NUMBER", "NUMBER"),
metacol_prior = c("2", "1"))
}