Error in `eval(code, test_env)`: object 'p' not found

out <- SCpubr::do_CNVHeatmap(sample = sample,
testthat::test_that("do_BarPlot: PASS - normal cells all chromosomes", {
group.by = c("seurat_clusters", "orig.ident", "annotation"))
testthat::test_that("do_CNVHeatmap: PASS - normal cells one chromosome", {
testthat::test_that("do_CNVHeatmap: PASS - metacells all chromosomes", {
testthat::test_that("do_CNVHeatmap: PASS - group.by", {
testthat::test_that("do_CNVHeatmap: PASS - legend.position", {

"do_BarPlot: PASS - normal cells all chromosomes"
"do_CNVHeatmap: PASS - normal cells one chromosome"
"do_CNVHeatmap: PASS - metacells all chromosomes"

<subscriptOutOfBoundsError/error/condition>
Error in `S7::prop(x, "meta")[[i]]`: subscript out of bounds

p <- SCpubr::do_NebulosaPlot(sample = sample,
testthat::test_that("do_NebulosaPlot: PASS - single feature", {
testthat::test_that("do_NebulosaPlot: PASS - cell_borders", {
p <- SCpubr::do_NebulosaPlot(sample = sample, features = "EPC1", plot_cell_borders = TRUE)
p <- suppressWarnings({SCpubr::do_NebulosaPlot(sample = sample, features = c("EPC1", "PC_1"), plot_cell_borders = TRUE)})
testthat::test_that("do_NebulosaPlot: PASS - single feature legend normal", {
testthat::test_that("do_NebulosaPlot: PASS - single feature legend colorbar", {
testthat::test_that("do_NebulosaPlot: FAIL - wrong legend type ", {
testthat::test_that("do_NebulosaPlot: FAIL - wrong legend position ", {
testthat::test_that("do_NebulosaPlot: FAIL - wrong font.type", {
testthat::test_that("do_NebulosaPlot: PASS - single feature distinct dims", {
testthat::test_that("do_FeaturePlot: PASS - diffusion", {
obj <- Seurat::CreateDimReducObject(test, assay = "SCT", key = "DC_")
testthat::test_that("do_NebulosaPlot: PASS - several", {
testthat::test_that("do_NebulosaPlot: PASS - several, joint", {
testthat::test_that("do_NebulosaPlot: PASS - several, joint only joint", {
testthat::test_that("do_NebulosaPlot: PASS - title", {
testthat::test_that("do_NebulosaPlot: PASS - subtitle", {
testthat::test_that("do_NebulosaPlot: PASS - caption", {
testthat::test_that("do_NebulosaPlot: PASS - color map", {
testthat::test_that("do_NebulosaPlot: PASS - legend top", {
testthat::test_that("do_NebulosaPlot: WARNING - features as list", {
testthat::test_that("do_NebulosaPlot: PASS - no legend", {
testthat::test_that("do_NebulosaPlot: PASS - patchwork title, subtitle and caption", {
testthat::test_that("do_NebulosaPlot: PASS - plot axis", {
p <- SCpubr::do_NebulosaPlot(sample = sample, plot.axes = TRUE, features = "nCount_RNA")
p <- SCpubr::do_NebulosaPlot(sample = sample, reduction = "pca", plot.axes = TRUE, features = "nCount_RNA")
p <- SCpubr::do_NebulosaPlot(sample = sample, dims = c(2, 1), plot.axes = TRUE, features = "nCount_RNA")