Skip to content

Commit

Permalink
plot_volcanoes test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
AleksandraDabrowska committed Jul 19, 2017
1 parent fba3537 commit f588740
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions MLExpResso/tests/testthat/test_plot_volcanoes.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@ data_e <- data.frame(AANAT = c(9, 2, 11, 0, 1),
AATF = c(2870, 5656, 9522, 4625, 3473),
AATK = c(317, 312, 736, 169, 92),
ABCA5 = c(1071, 2107, 1600, 615, 249))
data_m <- data.frame(AANAT = c(0.714853320257635, 0.585010598480768, 0.449553747871125, 0.712064984228615, 0.601039704158692),
AARSD1 = c(0.862581602037931, 0.835582456384254, 0.878616620309714, 0.881948995272878, 0.773997844301979),
AATF = c(0.242940918918926, 0.213671285057955, 0.0327741306730246, 0.034601604879337, 0.0250159869516749),
AATK = c(0.783530202882526, 0.846619037436617, 0.341791856252261, 0.726498479061021, 0.627639926339411),
ABC1 = c(0.014018058248562, 0.012758650823, 0.0145509159198552, 0.0128364746258133, 0.0127892758524178))
data_m <- data.frame(cg05292376 = c(0.714853320257635, 0.585010598480768, 0.449553747871125, 0.712064984228615, 0.601039704158692),
cg06409153 = c(0.862581602037931, 0.835582456384254, 0.878616620309714, 0.881948995272878, 0.773997844301979),
cg09382492 = c(0.242940918918926, 0.213671285057955, 0.0327741306730246, 0.034601604879337, 0.0250159869516749),
cg11492403 = c(0.783530202882526, 0.846619037436617, 0.341791856252261, 0.726498479061021, 0.627639926339411),
cg11651717 = c(0.014018058248562, 0.012758650823, 0.0145509159198552, 0.0128364746258133, 0.0127892758524178),
cg11857445=c(0.664975812,0.762700780,0.22253949, 0.55550705, 0.65565273),
cg13781408=c(0.089564841,0.047362484,0.06253406,0.09796019, 0.05751442),
cg25742201=c(0.007562164,0.009375098,0.01327864,0.01357107,0.01225612))
cond <- c("A","B","A","B","B")
test <- data.frame(id = c("AANAT", "AATK", "AATF", "AARSD1"),
nbinom2.log2.fold = c(-2.48093656685951, -0.630414813368689, 0.596158314095772, 0.562330881725216),
Expand All @@ -16,6 +19,8 @@ test <- data.frame(id = c("AANAT", "AATK", "AATF", "AARSD1"),
ttest.pval = c(0.65886929509176, 0.386911839970841, 0.681701139723198, 0.364423432024388),
geom.mean.rank = c(0.0600771446590418, 0.0692239064092072, 0.295481091433372, 0.335591175056051))

#!!!!!!!!!!!!!!!
# NIe działa ;(
#plot_volcanoes(data_m, data_e, cond , cond, "AANAT", test[ ,c(1,2,3)], test[,c(1,4,5)])
test_that("Output", {
expect_is(plot_volcanoes(data_m, data_e, cond , cond, "AANAT", test[ ,c(1,2,3)], test[,c(1,4,5)]), "gtable")
expect_equal(length(plot_volcanoes(data_m, data_e, cond , cond, "AANAT", test[ ,c(1,2,3)], test[,c(1,4,5)])), 8)
})

0 comments on commit f588740

Please sign in to comment.