Nothing
test_that("annotate returns a data frame", {
genes_file <- system.file("extdata", "gene_annotation.csv", package = "RiskyCNV")
cnv_file <- system.file("extdata", "annotated_cnv.csv", package = "RiskyCNV")
result <- annotate(
genes_file = genes_file,
risk_file = cnv_file,
output_dir = tempdir()
)
expect_s3_class(result, "data.frame")
})
test_that("annotate returns correct column names", {
genes_file <- system.file("extdata", "gene_annotation.csv", package = "RiskyCNV")
cnv_file <- system.file("extdata", "annotated_cnv.csv", package = "RiskyCNV")
result <- annotate(
genes_file = genes_file,
risk_file = cnv_file,
output_dir = tempdir()
)
expected_cols <- c("Sample", "GeneSymbol", "Segment_Mean", "Chr", "Start", "End")
expect_true(all(expected_cols %in% colnames(result)))
})
test_that("annotate result has rows", {
genes_file <- system.file("extdata", "gene_annotation.csv", package = "RiskyCNV")
cnv_file <- system.file("extdata", "annotated_cnv.csv", package = "RiskyCNV")
result <- annotate(
genes_file = genes_file,
risk_file = cnv_file,
output_dir = tempdir()
)
expect_true(nrow(result) > 0)
})
test_that("annotate GeneSymbol column contains character values", {
genes_file <- system.file("extdata", "gene_annotation.csv", package = "RiskyCNV")
cnv_file <- system.file("extdata", "annotated_cnv.csv", package = "RiskyCNV")
result <- annotate(
genes_file = genes_file,
risk_file = cnv_file,
output_dir = tempdir()
)
expect_type(result$GeneSymbol, "character")
})
test_that("annotate saves output CSV file", {
genes_file <- system.file("extdata", "gene_annotation.csv", package = "RiskyCNV")
cnv_file <- system.file("extdata", "annotated_cnv.csv", package = "RiskyCNV")
out_dir <- tempdir()
annotate(
genes_file = genes_file,
risk_file = cnv_file,
output_dir = out_dir
)
saved_files <- list.files(out_dir, pattern = "_annotated_", full.names = TRUE)
expect_true(length(saved_files) > 0)
})
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.