View source: R/Counts_to_tpm.R
Counts_to_tpm | R Documentation |
With the matrix of counts and the size of the genes/transcripts, it calculates the TPM.
Counts_to_tpm(counts, featureLength)
counts |
Data frame genes/features (in the rows) by samples (in the columns). Rownames must be in the names of the features and in the same format as the names of the featureLength vector |
featureLength |
Named numeric vector with the length of each gene/feature. Names must be the names of the features and in the same format as the rownames of the data frame counts. |
This function was modified from a gist from Slowkow (https://gist.github.com/slowkow/c6ab0348747f86e2748b).
Here, we do not calculate the effective length.
List with: a data frame with TPM of genes (rows) per sample (columns) and a vector with the names of the genes/features for which the TPM was calculated
https://gist.github.com/slowkow/c6ab0348747f86e2748b
data("sample_counts"); data("ath_featureLength")
Counts_to_tpm(counts = sample_counts, featureLength = ath_featureLength)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.