First of all thank you for publishing this useful tool!
I am using it to analyze my RNA-sequencing data, modifying slightly your functions to adjust to my data (for instance for my experimental design). While testing, I noticed that I was getting a different number of up-regulated genes per module compared to the ones obtained with your function. I spotted in particular that in the group limma analysis when mod.up is created in your function, it gives less TRUE than my function. I noticed that in some cases even when the FC and p-values are above/below cutoffs and the logical obtained should be TRUE, it gives FALSE. In other words, both are conditions are TRUE but the equivalence to 2 with == gives FALSE:
mod.up = (FCgroup > FC_cutoff) + (Pvalue_cutoff < pval) == 2 # TRUE Up gene, Both TRUE
I am wondering if this could be a case in which the equivalence done with "==" creates problems?
I am not an expert, so please let me know what you think! If you are interested I can try an put together a reproducible example of this happening (at the moment I cannot share my data). Thanks in advance!
Hello @Drinchai ,
First of all thank you for publishing this useful tool!
I am using it to analyze my RNA-sequencing data, modifying slightly your functions to adjust to my data (for instance for my experimental design). While testing, I noticed that I was getting a different number of up-regulated genes per module compared to the ones obtained with your function. I spotted in particular that in the group limma analysis when mod.up is created in your function, it gives less TRUE than my function. I noticed that in some cases even when the FC and p-values are above/below cutoffs and the logical obtained should be TRUE, it gives FALSE. In other words, both are conditions are TRUE but the equivalence to 2 with == gives FALSE:
mod.up = (FCgroup > FC_cutoff) + (Pvalue_cutoff < pval) == 2 # TRUE Up gene, Both TRUE
I am wondering if this could be a case in which the equivalence done with "==" creates problems?
I am not an expert, so please let me know what you think! If you are interested I can try an put together a reproducible example of this happening (at the moment I cannot share my data). Thanks in advance!
Best regards, Biancamaria