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)
obj | (sparse) matrix or |
---|---|
tx2gene | Provide a tx2gene data frame, specifying which transcripts (first column) belong to which gene (second column). |
genes | If a |
A (sparse) matrix of transcript proportions
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.