QuackenbushLab / NetworkDataCompanion

An R library of utilities for performing analyses on TCGA and GTEx data using the Network Zoo
GNU General Public License v3.0
4 stars 0 forks source link

logCPM and logTPM are not coherent #48

Open violafanfani opened 6 months ago

violafanfani commented 6 months ago

https://github.com/QuackenbushLab/NetSciDataCompanion/blob/ac0f21bf7639642a5578ddea25c0e3e465f62bd2/R/NetSciDataCompanion.R#L75C12-L75C31

For logCPMNormalization we are now checking that the passed class is a count matrix, but for logTPM we check that the object is an RSE. Can we revert/update the functions to be working in the same way?

katehoffshutta commented 3 months ago

Good catch @violafanfani. Which do you suggest that we support, or do you think it is important to be able to pass either matrix or RSE?

violafanfani commented 3 months ago

I think there might be a reason for this (maybe edgeR uses a matrix), I would try to use both if it's easy enough. But no strong preference on my side

katehoffshutta commented 3 months ago

Okay, I think we can at least accept both types as function arguments and throw an informative error asking the person to use the other type if needed. I will look into this.