| recurrent | R Documentation |
Filters a CNV data file for samples belonging to a specified risk group and identifies genomic regions that recur across multiple samples above a given threshold. Results are saved as a CSV file.
recurrent(x, risk_level, cnv_data_file, threshold = 2)
x |
A named list of sample ID vectors, as returned by
|
risk_level |
Character. The risk group to analyse. Must be a name
present in |
cnv_data_file |
Character. Path to the CNV data file
(whitespace-delimited, with a header). Must contain columns:
|
threshold |
Numeric. Minimum number of samples a CNV region must
appear in to be considered recurrent. Default is |
Sample IDs in the CNV file are trimmed to 12 characters and hyphens are
replaced with dots to match standard TCGA-style identifiers. The output
CSV is saved inside a timestamped subdirectory under recurrent_cnv/
in the temporary directory. This function is cancer-type agnostic.
Character. The file path of the saved CSV file containing the recurrent CNV regions for the specified risk group.
sample_file <- system.file("extdata", "sample_data.csv", package = "RiskyCNV")
cnv_file <- system.file("extdata", "cnv_data.txt", package = "RiskyCNV")
risk_result <- classify_risk(
file_path = sample_file,
column_name = "gleason_score",
disease_type = "prostate",
output_dir = tempdir()
)
output_path <- recurrent(
x = risk_result,
risk_level = "low_risk",
cnv_data_file = cnv_file,
threshold = 2
)
print(output_path)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.