# Compute proportion matrix

Source: `R/utility_functions.R`
`get_proportion_matrix.Rd`

Compute a matrix of transcript proportions per gene. Either a (sparse) count matrix or a `dturtle` object can be provided.

    get_proportion_matrix(obj, tx2gene = NULL, genes = NULL)

## Arguments

obj | (sparse) matrix or `dturtle` object.
tx2gene | Provide a tx2gene data frame, specifying which transcripts (first column) belong to which gene (second column).
genes | If a `dturtle` object is provided, specify the genes you want to get proportions of.

## Value

A (sparse) matrix of transcript proportions

## Details

If a (sparse) matrix of multiple genes is provided, it is advised to also specify a tx2gene data frame. If no tx2gene data frame is present, it is assumed all matrix entries belong to the same gene. If a `dturtle` object is provided, a list of genes the data shall be subsetted to can optionally be given.