Skip to contents

Convert a data frame of gene counts to a matrix

Usage

counts_dat_to_matrix(counts_tbl)

Arguments

counts_tbl

expected gene counts from RSEM as a data frame or tibble.

Value

matrix of gene counts with rows as gene IDs

Examples

counts_dat_to_matrix(head(gene_counts))
#>                    KO_S3 KO_S4 WT_S1 WT_S2
#> ENSG00000121410.11     0     0     0     0
#> ENSG00000268895.5      0     0     0     0
#> ENSG00000148584.15     0     0     0     0
#> ENSG00000175899.14     0     0     0     0
#> ENSG00000245105.3      0     0     0     0
#> ENSG00000166535.20     0     0     0     0