RGLab / MAST

Tools and methods for analysis of single cell assay data in R
224 stars 57 forks source link

getLogFC cannot accept hypothesis as contrast0 due to internal transpose #181

Closed derrik-gratz closed 11 months ago

derrik-gratz commented 11 months ago

Contrast matrices created by Hypothesis have coefficients as rownames and each column is a contrast. Inside getLogFC, if no contrast 0 is supplied, one is created as a single row matrix with coefficients as columns. Contrast 0 and 1 are then supposed to be rbinded, but the dimensions are not equal. getLogFC fails with the message

Error in rbind(...) : number of columns of matrices must match (see arg 2)

It seems like within the contrast0 check of getLogFC, if contrast0 is supplied as a hypothesis, there should be an additional line to transpose contrast 0 so it's consistent with contrast1 and can be rbound. Something in this area here.

I'm happy to make a pull request if you think this is the proper solution and this is not an intended outcome.