Shians / Glimma

Glimma R package
GNU Lesser General Public License v3.0
50 stars 10 forks source link

sample assignment incorrect in glMDPlot 1.8.1 vs. 1.6.0 #164

Closed jdrnevich closed 6 years ago

jdrnevich commented 6 years ago

I encountered a bug in Glimma 1.8.1 that was not present in 1.6.0. In the top right plot, the group argument is pulling the correct expression values and grouping them correctly, but the sample.cols and the pop-up sample information is not correct. I used the same code to make the attached screenshots:

glMDPlot(fit.bad.tr, coef = 2, counts=logCPM.filt, transform = FALSE, sample.cols = as.numeric(bad.samp),
         groups=bad.samp, ylab = "log2(bad / good)", xlab = "Average expression level",
         status=decideTests(fit.bad.tr), folder = "glimma-plots-R3.5.0", side.ylab = "Individual expression level",
         main="R 3.5.0", html = "Bad_vs_good_speciesD", samples = targets$Sample)

data.frame(sample = colnames(logCPM.filt), TRINITY_DN28488_c1_g3 = logCPM.filt["TRINITY_DN28488_c1_g3",],
           bad.samp)
      sample TRINITY_DN28488_c1_g3 bad.samp
 gfw_a  gfw_a              3.524879    FALSE
 gfw_b  gfw_b              2.810853    FALSE
 gfw_c  gfw_c              3.287497    FALSE
 gb_a    gb_a              3.190447    FALSE
 gb_b    gb_b              2.545063    FALSE
 gb_c    gb_c              3.056966    FALSE
 gm_a    gm_a              3.588505    FALSE
 gm_b    gm_b              3.437603    FALSE
 gm_c    gm_c              3.179978    FALSE
 wfw_a  wfw_a              2.509955    FALSE
 wfw_b  wfw_b              1.950160    FALSE
 wfw_c  wfw_c              2.280330    FALSE
 wb_a    wb_a              2.604763    FALSE
 wb_b    wb_b              7.901653     TRUE
 wb_c    wb_c              9.101571     TRUE
 wm_a    wm_a              2.843367    FALSE
 wm_b    wm_b              2.274999    FALSE
 wm_c    wm_c              9.278173     TRUE

glmdplot_r3 4 3_glimma1 6 0 glmdplot_r3 5 0_glimma1 8 1

Shians commented 6 years ago

😱😱😱

Thanks as always for letting me know about these serious bugs. This should be fixed here with the extra reordering calls.

I've pushed to Bioconductor Devel as 1.9.2 and Release as 1.8.2.

jdrnevich commented 6 years ago

No problem - I love the package!!!