dmgatti / DOQTL

QTL mapping for Diversity Outbred mice (and other multi-founder advanced intercrosses)
14 stars 14 forks source link

coefplot for chrX fails if all samples are males #2

Open simecek opened 8 years ago

simecek commented 8 years ago

Hi Dan,

Small bug in DOQTL. If you have only one sex (‘males’ in my case), the effect plot for chrX does not work.

  download.file("http://dl.dropboxusercontent.com/u/232839/class_k__Bacteria.Other.Other.rds", "temp.rds")
  fit <- readRDS("temp.rds")
  coefplot(fit, chr = "X", sex="M")

I am getting an error

Error in `colnames<-`(`*tmp*`, value = `*vtmp*`) : 
  attempt to set 'colnames' on an object with less than two dimensions

My guess is you need to add “drop==FALSE” somewhere in you code :-)