diff --git a/tests/testthat/test-get_clustered_median_exon_expression.R b/tests/testthat/test-get_clustered_median_exon_expression.R new file mode 100644 index 0000000..22392ed --- /dev/null +++ b/tests/testthat/test-get_clustered_median_exon_expression.R @@ -0,0 +1,22 @@ +test_that("`get_clustered_median_exon_expression()` returns tibble with expected colnames", + { + skip_if_offline() + result <- get_clustered_median_exon_expression(c("ENSG00000203782.5", "ENSG00000132693.12"), + tissueSiteDetailIds = "Bladder") + + expect_s3_class(result, "tbl_df") + + expect_identical( + names(result), + c( + "median", + "exonId", + "tissueSiteDetailId", + "ontologyId", + "datasetId", + "gencodeId", + "geneSymbol", + "unit" + ) + ) + }) diff --git a/tests/testthat/test-get_clustered_median_gene_expression.R b/tests/testthat/test-get_clustered_median_gene_expression.R new file mode 100644 index 0000000..f0e10e2 --- /dev/null +++ b/tests/testthat/test-get_clustered_median_gene_expression.R @@ -0,0 +1,21 @@ +test_that("`get_clustered_median_gene_expression()` returns tibble with expected colnames", + { + skip_if_offline() + result <- get_clustered_median_gene_expression(c("ENSG00000203782.5", "ENSG00000132693.12"), + tissueSiteDetailIds = "Bladder") + + expect_s3_class(result, "tbl_df") + + expect_identical( + names(result), + c( + "median", + "tissueSiteDetailId", + "ontologyId", + "datasetId", + "gencodeId", + "geneSymbol", + "unit" + ) + ) + }) diff --git a/tests/testthat/test-get_clustered_median_junction_expression.R b/tests/testthat/test-get_clustered_median_junction_expression.R new file mode 100644 index 0000000..61a64bc --- /dev/null +++ b/tests/testthat/test-get_clustered_median_junction_expression.R @@ -0,0 +1,24 @@ +test_that( + "`get_clustered_median_junction_expression()` returns tibble with expected colnames", + { + skip_if_offline() + result <- get_clustered_median_junction_expression(c("ENSG00000203782.5", "ENSG00000132693.12"), + tissueSiteDetailIds = "Bladder") + + expect_s3_class(result, "tbl_df") + + expect_identical( + names(result), + c( + "median", + "junctionId", + "tissueSiteDetailId", + "ontologyId", + "datasetId", + "gencodeId", + "geneSymbol", + "unit" + ) + ) + } +) diff --git a/tests/testthat/test-get_clustered_median_transcript_expression.R b/tests/testthat/test-get_clustered_median_transcript_expression.R new file mode 100644 index 0000000..d87e32c --- /dev/null +++ b/tests/testthat/test-get_clustered_median_transcript_expression.R @@ -0,0 +1,24 @@ +test_that( + "`get_clustered_median_transcript_expression()` returns tibble with expected colnames", + { + skip_if_offline() + result <- get_clustered_median_transcript_expression(c("ENSG00000203782.5", "ENSG00000132693.12"), + tissueSiteDetailIds = "Bladder") + + expect_s3_class(result, "tbl_df") + + expect_identical( + names(result), + c( + "median", + "transcriptId", + "tissueSiteDetailId", + "ontologyId", + "datasetId", + "gencodeId", + "geneSymbol", + "unit" + ) + ) + } +) diff --git a/tests/testthat/test-get_expression_pca.R b/tests/testthat/test-get_expression_pca.R new file mode 100644 index 0000000..d7a0947 --- /dev/null +++ b/tests/testthat/test-get_expression_pca.R @@ -0,0 +1,20 @@ +test_that("`get_expression_pca()` returns tibble with expected colnames", + { + skip_if_offline() + result <- get_expression_pca(tissueSiteDetailIds = "Adipose_Subcutaneous", sampleId = "GTEX-1117F-0226-SM-5GZZ7") + + expect_s3_class(result, "tbl_df") + + expect_identical( + names(result), + c( + "pc1", + "pc2", + "pc3", + "sampleId", + "tissueSiteDetailId", + "ontologyId", + "datasetId" + ) + ) + }) diff --git a/tests/testthat/test-get_gene_expression.R b/tests/testthat/test-get_gene_expression.R new file mode 100644 index 0000000..f6ed375 --- /dev/null +++ b/tests/testthat/test-get_gene_expression.R @@ -0,0 +1,21 @@ +test_that("`get_gene_expression()` returns tibble with expected colnames", + { + skip_if_offline() + result <- get_gene_expression(gencodeIds = "ENSG00000132693.12", tissueSiteDetailIds = "Whole_Blood") + + expect_s3_class(result, "tbl_df") + + expect_identical( + names(result), + c( + "data", + "tissueSiteDetailId", + "ontologyId", + "datasetId", + "gencodeId", + "geneSymbol", + "unit", + "subsetGroup" + ) + ) + }) diff --git a/tests/testthat/test-get_median_exon_expression.R b/tests/testthat/test-get_median_exon_expression.R new file mode 100644 index 0000000..29c1872 --- /dev/null +++ b/tests/testthat/test-get_median_exon_expression.R @@ -0,0 +1,21 @@ +test_that("`get_median_exon_expression()` returns tibble with expected colnames", + { + skip_if_offline() + result <- get_median_exon_expression(gencodeIds = "ENSG00000132693.12", tissueSiteDetailIds = "Whole_Blood") + + expect_s3_class(result, "tbl_df") + + expect_identical( + names(result), + c( + "median", + "exonId", + "tissueSiteDetailId", + "ontologyId", + "datasetId", + "gencodeId", + "geneSymbol", + "unit" + ) + ) + }) diff --git a/tests/testthat/test-get_median_gene_expression.R b/tests/testthat/test-get_median_gene_expression.R new file mode 100644 index 0000000..a4fe407 --- /dev/null +++ b/tests/testthat/test-get_median_gene_expression.R @@ -0,0 +1,21 @@ +test_that("`get_median_gene_expression()` returns tibble with expected colnames", + { + skip_if_offline() + result <- get_median_gene_expression(gencodeIds = "ENSG00000132693.12", itemsPerPage = 1) |> + suppressWarnings() + + expect_s3_class(result, "tbl_df") + + expect_identical( + names(result), + c( + "median", + "tissueSiteDetailId", + "ontologyId", + "datasetId", + "gencodeId", + "geneSymbol", + "unit" + ) + ) + }) diff --git a/tests/testthat/test-get_median_junction_expression.R b/tests/testthat/test-get_median_junction_expression.R new file mode 100644 index 0000000..a6a905c --- /dev/null +++ b/tests/testthat/test-get_median_junction_expression.R @@ -0,0 +1,22 @@ +test_that("`get_median_junction_expression()` returns tibble with expected colnames", + { + skip_if_offline() + result <- get_median_junction_expression(gencodeIds = "ENSG00000132693.12", itemsPerPage = 1) |> + suppressWarnings() + + expect_s3_class(result, "tbl_df") + + expect_identical( + names(result), + c( + "median", + "junctionId", + "tissueSiteDetailId", + "ontologyId", + "datasetId", + "gencodeId", + "geneSymbol", + "unit" + ) + ) + }) diff --git a/tests/testthat/test-get_median_transcript_expression.R b/tests/testthat/test-get_median_transcript_expression.R new file mode 100644 index 0000000..b938184 --- /dev/null +++ b/tests/testthat/test-get_median_transcript_expression.R @@ -0,0 +1,22 @@ +test_that("`get_median_transcript_expression()` returns tibble with expected colnames", + { + skip_if_offline() + result <- get_median_transcript_expression(gencodeIds = "ENSG00000132693.12", itemsPerPage = 1) |> + suppressWarnings() + + expect_s3_class(result, "tbl_df") + + expect_identical( + names(result), + c( + "median", + "transcriptId", + "tissueSiteDetailId", + "ontologyId", + "datasetId", + "gencodeId", + "geneSymbol", + "unit" + ) + ) + }) diff --git a/tests/testthat/test-get_single_nucleus_gex.R b/tests/testthat/test-get_single_nucleus_gex.R new file mode 100644 index 0000000..ec1a247 --- /dev/null +++ b/tests/testthat/test-get_single_nucleus_gex.R @@ -0,0 +1,21 @@ +test_that("`get_single_nucleus_gex()` returns tibble with expected colnames", + { + skip_if_offline() + result <- get_single_nucleus_gex(gencodeIds = "ENSG00000132693.12", itemsPerPage = 1) |> + suppressWarnings() + + expect_s3_class(result, "tbl_df") + + expect_identical( + names(result), + c( + "tissueSiteDetailId", + "ontologyId", + "datasetId", + "gencodeId", + "geneSymbol", + "cellTypes", + "unit" + ) + ) + }) diff --git a/tests/testthat/test-get_single_nucleus_gex_summary.R b/tests/testthat/test-get_single_nucleus_gex_summary.R new file mode 100644 index 0000000..177e24f --- /dev/null +++ b/tests/testthat/test-get_single_nucleus_gex_summary.R @@ -0,0 +1,19 @@ +test_that("`get_single_nucleus_gex_summary()` returns tibble with expected colnames", + { + skip_if_offline() + result <- get_single_nucleus_gex_summary(tissueSiteDetailIds = "Breast_Mammary_Tissue", itemsPerPage = 1) |> + suppressWarnings() + + expect_s3_class(result, "tbl_df") + + expect_identical( + names(result), + c( + "tissueSiteDetailId", + "ontologyId", + "datasetId", + "cellType", + "numCells" + ) + ) + }) diff --git a/tests/testthat/test-get_top_expressed_genes.R b/tests/testthat/test-get_top_expressed_genes.R new file mode 100644 index 0000000..ee043c6 --- /dev/null +++ b/tests/testthat/test-get_top_expressed_genes.R @@ -0,0 +1,21 @@ +test_that("`get_top_expressed_genes()` returns tibble with expected colnames", + { + skip_if_offline() + result <- get_top_expressed_genes(tissueSiteDetailId = "Breast_Mammary_Tissue", itemsPerPage = 1) |> + suppressWarnings() + + expect_s3_class(result, "tbl_df") + + expect_identical( + names(result), + c( + "tissueSiteDetailId", + "ontologyId", + "datasetId", + "gencodeId", + "geneSymbol", + "median", + "unit" + ) + ) + })