-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add online tests for Expression Data Endpoints functions
- Loading branch information
Showing
13 changed files
with
279 additions
and
0 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
tests/testthat/test-get_clustered_median_exon_expression.R
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
) | ||
) | ||
}) |
21 changes: 21 additions & 0 deletions
21
tests/testthat/test-get_clustered_median_gene_expression.R
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
) | ||
) | ||
}) |
24 changes: 24 additions & 0 deletions
24
tests/testthat/test-get_clustered_median_junction_expression.R
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
) | ||
) | ||
} | ||
) |
24 changes: 24 additions & 0 deletions
24
tests/testthat/test-get_clustered_median_transcript_expression.R
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
) | ||
) | ||
} | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
) | ||
) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
) | ||
) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
) | ||
) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
) | ||
) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
) | ||
) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
) | ||
) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
) | ||
) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
) | ||
) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
) | ||
) | ||
}) |