as_weitrix.Rd
Ensure data is a weighted matrix or "weitrix". A weitrix is a SummarizedExperiment or subclass thereof with some metadata fields set. If it is ambiguous how to do this, produce an error.
as_weitrix(object, weights = NULL)
object | Object to convert. |
---|---|
weights | Optional, weights matrix if not present in |
A SummarizedExperiment object with metadata fields marking it as a weitrix.
Input can be a matrix or DelayedArray.
Input can be anything the limma package recognizes, notably the limma EList
class (for example as output by voom
or vooma
).
If weights are not present in "object" and not given with "weights", they default for 0 for NA values and 1 for everything else.
#> $weitrix #> $weitrix$x_name #> [1] "x" #> #> $weitrix$weights_name #> [1] "weights" #> #>#> [,1] [,2] #> [1,] 1 3 #> [2,] 2 NA #> [3,] NA 4#> [,1] [,2] #> [1,] 1 1 #> [2,] 1 0 #> [3,] 0 1