To fix this problem, I will reorganize cstmm to produce a file for TMM normalization factors in addition to normalized counts, and curate to calculate TMM-FPKM with the TMM normalization factors from cstmm and raw counts and effective lengths from merge.
In the current implementation, the FPKM calculation in
curate
doesn't use the library sizes before TMM. As a result,curate
completely cancels out the normalization bycstmm
. https://github.com/kfuku52/amalgkit/blob/22db4f582ff111232429b1ffa0157ee1d8edd51a/amalgkit/curate.r#L867-L870To fix this problem, I will reorganize
cstmm
to produce a file for TMM normalization factors in addition to normalized counts, andcurate
to calculate TMM-FPKM with the TMM normalization factors fromcstmm
and raw counts and effective lengths frommerge
.