KChen-lab / METAFlux

Other
48 stars 9 forks source link

Question in flux score visualization tutorial for single-cell RNA-seq sample #10

Closed yechanYS closed 7 months ago

yechanYS commented 7 months ago

I have a question for flux score visualization into box plot, mentioned in official METAFlux tutorial. Below are codes for visualization in tutorial

library(ggplot2)
glucose$celltype=rownames(glucose)
long_glucose=reshape2::melt(glucose,id.vars='celltype')
ggplot(long_glucose,aes(y=-value,x=celltype)) +
geom_boxplot()+ggtitle("Glucose uptake level for different cell types") +
xlab("") +
ylab("Glucose uptake scores") +
theme(axis.text.x = element_text(angle = 90, vjust = 0.5, hjust=1))

long_glucose contains cell type names in celltype column and flux score in value column Then, why we need to use "-value", not "value", for y value in box plot? Is it just a mistake in generating tutorial?

LiuCanidk commented 7 months ago

Hi, personally thinking, I figure here it was just an approach to better visualize the magnitude of "glucose uptake". Because the sign of the flux indicates the reaction direction, and here glucose was uptaken by cells, so it is negative. But negativae value with higher magnitude tends to be lower in the boxplot. So I guess here it was just to transform the negative values to positive ones so that it looked better with higher magnitude of glucose uptake exhibiting higher values.

Hope it helps

yechanYS commented 7 months ago

Oh, I didn't notice that negative sign means fluxes for uptake reaction! Additionally, only for the nutrient exchange reactions (in nutrient_lookup_files), positive signs mean release reactions and negative signs mean uptake reactions. In other reactions, positive signs mean forward reactions and negative signs mean backward reactions. Anyway, thank you for your explanation!