You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I geatly appreciate the creation of a TPM calculation tool specifically for prokaryotes.
I'm writing to raise a concern regarding the TPM values calculated by FADU.
I tesed FADU with both the privided test data and my own RNA-seq data. The tool ran without issues, and I obtained a results table including TPM calues. However, when I summed the TPM values for all genes, the total did not reach one million. Typically represents the amount of transcrupt per million reads, so the sum of TPMs should be one million. Upon reviewing the FADU code, I found that the calculation formula for TPM is incorrect.
The correct calculation of TPM incolves the following steps:
Normalize the read count for each gene by its length to get counts per kilobase.
Sum the length-normalized counts.
Divide the length-normalized count by the total sum and multiply by one million.
However, the current FADU code is as follows: function calc_tpm(len::UInt, totalcounts::Float32, feat_counts::Float32) """Calculate TPM score for current feature.""" return @fastmath(feat_counts * 1000 / len) * 1000000 / totalcounts end
it appears that the total read counts is calculated first, followed by length normalization.
This seems to be the formula for calculating FPKM, not TPM.
Could you please verify if there is an error in the TPM calculation formula?
The text was updated successfully, but these errors were encountered:
The feat_counts used in the calc_tpm step was already normalized for length when compute_alignment_feature_ratio was run. The align_feat_ratio output from that function is factored into the final feat_counts operation when each feature overlap is processed in process_feature_overlaps.
I should probably add some better documentation to explain that the "feat_counts" variable is normalized while being calculated, since the current variable name can be misleading.
Hello,
I geatly appreciate the creation of a TPM calculation tool specifically for prokaryotes.
I'm writing to raise a concern regarding the TPM values calculated by FADU.
I tesed FADU with both the privided test data and my own RNA-seq data. The tool ran without issues, and I obtained a results table including TPM calues. However, when I summed the TPM values for all genes, the total did not reach one million. Typically represents the amount of transcrupt per million reads, so the sum of TPMs should be one million. Upon reviewing the FADU code, I found that the calculation formula for TPM is incorrect.
The correct calculation of TPM incolves the following steps:
However, the current FADU code is as follows:
function calc_tpm(len::UInt, totalcounts::Float32, feat_counts::Float32) """Calculate TPM score for current feature.""" return @fastmath(feat_counts * 1000 / len) * 1000000 / totalcounts end
it appears that the total read counts is calculated first, followed by length normalization.
This seems to be the formula for calculating FPKM, not TPM.
Could you please verify if there is an error in the TPM calculation formula?
The text was updated successfully, but these errors were encountered: