ahmohamed / lipidr

Data Mining and Analysis of Lipidomics datasets in R
https://www.lipidr.org/
Other
27 stars 13 forks source link

LogFC calculations #26

Closed shubham7193 closed 2 years ago

shubham7193 commented 2 years ago

Hi Ahmed, I am trying to calculate the LogFC between two treatment groups: Tm100 and Tm1. As per the result of de_analysis(), the values for significant molecules are in the range of 1e+04 to 1e+08, which is absolutely not possible just by looking at their raw "Area" values.

I have run normalization on two different files and then combined them to create one to run de_Analysis(). please help me with this. Data and annotation files are attached. jh_an.csv jh_an2.csv jh_data.csv jh_data2.csv Here is the code used:

library(lipidr)
library(data.table)
library(limma)
library(ggplot2)
Data1 <- read.csv("jh_data.csv")
#Data$Classnew <- paste(Data$Lipids, Data$Class, sep = "_")
Data1 <- Data1[,c(2:10)]
d1 <- as_lipidomics_experiment(Data1)
Ann1 <- read.csv("jh_an.csv")
d1 <- add_sample_annotation(d1,Ann1)
d1_normalized = normalize_pqn(d1, measure = "Area", exclude = "blank", log = TRUE) 
plot_samples(d1_normalized, "boxplot")
Data2 <- read.csv("jh_data2.csv")
Data2 <- Data2[,c(2:10)]
d2 <- as_lipidomics_experiment(Data2)
Ann2 <- read.csv("jh_an2.csv")
d2 <- add_sample_annotation(d2,Ann2)
d2_normalized = normalize_pqn(d2, measure = "Area", exclude = "blank", log = TRUE) 
plot_samples(d2_normalized, "boxplot")
R <- cbind(d1,d2) // combining the two lipidomic experiment//
##Multivariate analysis
mvaresults = mva(R, measure="Area", method="PCA")
plot_mva(mvaresults, color_by="Sample.Type", components = c(1,2))
#Differential analysis
de_results = de_analysis(
  data=R, Tm100-Tm1, 
    measure="Area")
head(de_results)
significant_molecules(de_results, p.cutoff = 0.05, logFC.cutoff = 1)
plotgg <- plot_results_volcano(de_results, show.labels = TRUE)
shubham7193 commented 2 years ago

In addition to this. What could be the possible method to remove noise from the data (subtracting the noise) or incorporate conditions where signal/noise ratio >5 should be considered for analysis?

ahmohamed commented 2 years ago

Closing as this is an old issue and probably resolved. If you still need help addressing it, please reopen. Thanks.