Check the validity of a compData
object containing differential expression results. An object that passes the check can be used as the input for the method comparison functions in compcodeR
.
check_compData_results(object)
tmpdir <- normalizePath(tempdir(), winslash = "/")
mydata <- generateSyntheticData(dataset = "mydata", n.vars = 1000,
samples.per.cond = 5, n.diffexp = 100,
output.file = file.path(tmpdir, "mydata.rds"))
## Check an object without differential expression results
check_compData_results(mydata)
#> [1] "Object must contain a list named 'method.names' identifying the differential expression method used."
runDiffExp(data.file = file.path(tmpdir, "mydata.rds"),
result.extent = "voom.limma",
Rmdfunction = "voom.limma.createRmd",
output.directory = tmpdir, norm.method = "TMM")
#>
#>
#> processing file: /private/var/folders/xz/lz5thm6s3vb1vdkk77vmkgbr0000gn/T/RtmpDwlx4a/tempcode21d05cbc5711.Rmd
#> 1/2
#> 2/2 [unnamed-chunk-1]
#> output file: /private/var/folders/xz/lz5thm6s3vb1vdkk77vmkgbr0000gn/T/RtmpDwlx4a/tempcode21d05cbc5711.md
#> [1] TRUE
resdata <- readRDS(file.path(tmpdir, "mydata_voom.limma.rds"))
## Check an object containing differential expression results
check_compData_results(resdata)
#> [1] TRUE