Nothing
test_that("recurrent returns a file path as character", {
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
)
expect_type(output_path, "character")
})
test_that("recurrent saves a readable CSV file", {
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
)
expect_true(file.exists(output_path))
saved_data <- read.csv(output_path)
expected_cols <- c("Sample", "Chromosome", "Start", "End",
"Num_Probes", "Segment_Mean")
expect_true(all(expected_cols %in% colnames(saved_data)))
})
test_that("recurrent throws error for invalid risk_level", {
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()
)
expect_error(
recurrent(
x = risk_result,
risk_level = "nonexistent_risk",
cnv_data_file = cnv_file,
threshold = 2
)
)
})
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.