View source: R/dge_GetMatrix.R
dge_GetMatrix | R Documentation |
Get the DGEList out of a dge_OneFactor result, and return a matrix of (selected) genes.
dge_GetMatrix( DGEList, genes = NULL, scale = "none", colnames = NULL, convertMatrix = FALSE, ... )
DGEList |
A DGEList object, usually returned when you run dge_OneFactor() with retainDGEList = TRUE. |
genes |
Character vector of gene names, in the same format as the rownames from your DGEList. If you're unsure what these will look like in your own data, run this function keeping genes = NULL and then peek (head()) at the output. |
scale |
One of "none", "cols", or "rows"; should centering and scaling be applied to the data, and if so, should it be row-wise or column-wise? |
colnames |
Optional vector of new colnames. This will be directly replaced 1:1, so it needs to be the same length as the number of columns in the output, and in the same order. Useful for when your sample names are gross and you want to replace them with something nicer for the resulting heatmap. |
convertMatrix |
Boolean, should the gene names in the matrix be converted? Likely want this to be true if your DGE object has converted names, and convert to the same readout, or else you'll get a blank matrix when you run this. |
... |
additional arguments to pass to convertBiomart (convert_from and convert_to, see ?convertBiomart for more details) |
A matrix with (selected) genes as rows, samples as columns, and values as CPM-adjusted counts with optional scaling.
dgeRes <- system.file("extdata", "dgeRes_full.Rds", package = "seqHelpers") |> readRDS() dge_GetMatrix(dgeRes$DGEList)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.