Fortified geneplot
... | ... |
@@ -1,3 +1,13 @@ |
1 |
+# GeneTonic 2.4.0 |
|
2 |
+ |
|
3 |
+## New features |
|
4 |
+ |
|
5 |
+* `enhance_table()` has now the possibility to plot the visual summaries as ridge lines |
|
6 |
+ |
|
7 |
+## Other notes |
|
8 |
+ |
|
9 |
+* Fortified the behavior of `gene_plot()` to fail early when providing an invalid value to the `intgroup` parameter |
|
10 |
+ |
|
1 | 11 |
# GeneTonic 2.2.0 |
2 | 12 |
|
3 | 13 |
## New features |
... | ... |
@@ -94,6 +94,13 @@ gene_plot <- function(dds, |
94 | 94 |
res_enrich <- gtl$res_enrich |
95 | 95 |
annotation_obj <- gtl$annotation_obj |
96 | 96 |
} |
97 |
+ |
|
98 |
+ if (!intgroup %in% colnames(colData(dds))) { |
|
99 |
+ stop("`intgroup` not found in the colData slot of the dds object", |
|
100 |
+ "\nPlease specify one of the following: \n", |
|
101 |
+ paste0(colnames(colData(dds)), collapse = ", ") |
|
102 |
+ ) |
|
103 |
+ } |
|
97 | 104 |
|
98 | 105 |
df <- get_expression_values( |
99 | 106 |
dds = dds, |
... | ... |
@@ -33,6 +33,18 @@ test_that("Basic gene plot is generated", { |
33 | 33 |
gene = "ENSG00000285982" |
34 | 34 |
) |
35 | 35 |
expect_is(p3_gtl, "gg") |
36 |
+ |
|
37 |
+ expect_error({ |
|
38 |
+ gene_plot( |
|
39 |
+ dds = dds_macrophage, |
|
40 |
+ gene = "ENSG00000285982", |
|
41 |
+ assay = "counts", |
|
42 |
+ intgroup = "factor_not_there", |
|
43 |
+ annotation_obj = anno_df, |
|
44 |
+ transform = TRUE, |
|
45 |
+ labels_repe |
|
46 |
+ ) |
|
47 |
+ }) |
|
36 | 48 |
}) |
37 | 49 |
|
38 | 50 |
test_that("Enforcing plot types", { |