VEuPathDB / microbiomeComputations

1 stars 0 forks source link

Correlation error in melt.data.table #70

Closed asizemore closed 8 months ago

asizemore commented 9 months ago

Found testing with a local eda on FARMM. Tried two collections and got same error

Error

Rserve started in non-daemon mode.
[1] "starting correlation computation"

2023-12-18 12:21:52 Completed correlation with method=spearman. Formatting results.
Error in melt.data.table(corrResult, id.vars = c("rn")) :
  One or more values in 'id.vars' is invalid.
asizemore commented 9 months ago

also seen with preterm infant resistome 1

d-callan commented 8 months ago

this looks like its to do w the fact that there is a single valid metadata variable. Apparently, if you subset a matrix in R to a point where one dimension has a length of 1, it drops rownames by default.. which means that I, Danielle, learned something new about a base type in R today :exploding_head:

see https://github.com/VEuPathDB/microbiomeComputations/pull/75