hally166 / flowUnmix

An R package to unmix flow cytometry data
GNU General Public License v3.0
4 stars 0 forks source link

baselm bug #2

Open DavidRach opened 9 months ago

DavidRach commented 9 months ago

Happy New Year Christopher!

I found a small bug in unmix_ff.R with unmixMethod = "baselm" at line 86 while testing a 29 color sample. It's currently coded as lmbase<-lmbase[,2:11] to avoid the $X.Intercept column. When I was testing my sample, the :11 part cut off my additional fluorophore columns, resulting in an error on the next line when it tried to switch the row names for column names and found they were not the same lengths.

else if(unmixMethod=="baselm"){ lmbase<-apply(expresionData, 1, function(x)lm (x ~ t(control))$coefficients) lmbase<-lmbase*multiplier lmbase<-data.frame(t(lmbase)) lmbase<-lmbase[,2:11] colnames(lmbase)<-rownames(control) unmixResult<-as.matrix(lmbase) }

Best Wishes,

David

hally166 commented 9 months ago

Hi David and happy new year, Well spotted! I'll grab some data and check it out this afternoon.