Open jan-glx opened 1 year ago
Thanks for the callout, and apologies for the slow turnaround--this is fixed in #111.
The return values in the new version should be consistent with inputs of length > 0:
consensusMatrix(..., as.prob=FALSE)
returns an integer matrixconsensusMatrix(..., as.prob=TRUE)
returns a numeric matrixconsensusString(x)
returns character(0L)
if the input is length 0consensusString(DNAStringSet())
has the correct column names (similarly for all other XStringSet
objects, and for baseOnly=TRUE
)I'll merge this sometime this month once I've double checked that it's not causing any other weird bugs.
Currently,
consensusString
fails for length-0 inputs:Created on 2023-07-29 by the reprex package (v2.0.1)
I believe it should return
character(0)
instead and at most warn.Maybe, replacing
error("'x' has no element and 'width' is NULL");
withreturn allocMatrix(INTSXP, 0, 0);
is all that's needed?