In this PR I implement the c(),QFeatures method for combining QFeatures objects. I took a few liberties that require your attention:
I moved away from the c(),MultiAssayExperiment because it does not correctly handle the merging of colData. In this implementation, I make sure that when 2 QFeatures object have conflicting colData information, an error is thrown. In the other cases, the colData is merged as for addAssay(), taking into account the addition of new samples.
I only allow user to provide QFeatures objects. If they provide a list or an object that inherits from List or SummarizedExperiments, the method throws an error and suggest addAssay() instead. If they provide something else than those or a QFeatures object, the objects are converted to a QFeatures obbject.
I allowed QFeatures objects to be combined with MultiAssayExperiment objects. This required to implement a coerce method from MultiAssayExperiment to QFeatures, because the generic implementation leads to an invalid (empty) assayLinks slot.
Beside the c(),QFeatures method, I implement the nrows() and ncols() methods. They would be handy next to dims().
(Please first merge PR #170)
In this PR I implement the
c(),QFeatures
method for combiningQFeatures
objects. I took a few liberties that require your attention:c(),MultiAssayExperiment
because it does not correctly handle the merging ofcolData
. In this implementation, I make sure that when 2QFeatures
object have conflicting colData information, an error is thrown. In the other cases, the colData is merged as foraddAssay()
, taking into account the addition of new samples.QFeatures
objects. If they provide alist
or an object that inherits fromList
orSummarizedExperiments
, the method throws an error and suggestaddAssay()
instead. If they provide something else than those or aQFeatures
object, the objects are converted to aQFeatures
obbject.QFeatures
objects to be combined withMultiAssayExperiment
objects. This required to implement acoerce
method fromMultiAssayExperiment
toQFeatures
, because the generic implementation leads to an invalid (empty)assayLinks
slot.c(),QFeatures
method, I implement thenrows()
andncols()
methods. They would be handy next todims()
.