-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
enhancementNew feature or requestNew feature or request
Description
In DifferentialMetaboliteAnalysis.R (lines ~872 and ~875), the sign of Log2(Distance) is currently determined by comparing raw group means (C1 > C2 or C1 < C2). This should be replaced by comparing the absolute group means, as the sign should be reflective of the group with the highest value not the most positive one.
In code:
Now we can adapt the values to take into account the distance
Mean_Merge <- Mean_Merge %>%
mutate(`Log2(Distance)` = case_when(
# If C1>C2 the distance stays positive to reflect
# that C1 > C2
872 C1 > C2 ~ paste(`Log2(Distance)` * +1),
# If C1<C2 the distance gets a negative sign to reflect
# that C1 < C2
875 C1 < C2 ~ paste(`Log2(Distance)` * -1),
TRUE ~ "NA"
)
This causes issues and it is not reflective of the biology in some cases.
For example:
in C1 vs C2
if C1 = -1 and C2 = -10
Current rule: since -1 > -10, the distance is marked positive
on Volcano: this metaboltie appears on the right side of the Volcano.
Biologically, this is misleading, because the magnitude of C2 (|−10|) is larger than C1 (|−1|).
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request