how to calculate log average intensity for MA plot?
1
1
Entering edit mode
2.4 years ago
KABILAN ▴ 130

Hello, I have a proteomics expression dataset. The head portion of the data will be like,

data <- structure(list(`Fasta headers` = c(">O76070ups|SYUG_HUMAN_UPS Gamma-synuclein (Chain 1-127) - Homo sapiens (Human)", 
">Q06830ups|PRDX1_HUMAN_UPS Peroxiredoxin 1 (Chain 2-199) - Homo sapiens (Human)", 
">P06396ups|GELS_HUMAN_UPS Gelsolin (Chain 28-782) - Homo sapiens (Human);>Q3SX14 TREMBL:Q3SX14 (Bos taurus) Similar to Gelsolin", 
">P02768-1 SWISS-PROT:P02768-1 Tax_Id=9606 Gene_Symbol=ALB Isoform 1 of Serum albumin precursor;>P02768ups|ALBU_HUMAN_UPS Serum albumin (Chain 26-609) - Homo sapiens (Human)", 
">P02741ups|CRP_HUMAN_UPS C-reactive protein (Chain 19-224) - Homo sapiens (Human)", 
">P16083ups|NQO2_HUMAN_UPS Ribosyldihydronicotinamide dehydrogenase [quinone] (Chain 2-231) - Homo sapiens (Human)"
), A1 = c(28.8484762528371, 28.5593417132562, 29.8009889375404, 
30.236308349045, 26.8634920403497, 29.2127142763584), A2 = c(28.6976154934535, 
28.5259670144823, 29.7664700243508, 30.1817239029611, 26.8135256143612, 
29.0836758932669), A3 = c(28.6907247615967, 28.4075268367718, 
29.945806961862, 30.1906689352863, 26.8775178221577, 29.1529637057232
), B1 = c(21.4759289585346, 21.8116726154379, 21.0287288705184, 
21.6755517309807, 22.3711955096869, 20.5319556862522), B2 = c(21.2438429926591, 
21.5540102900844, 21.1130287737854, 21.2063689577213, 22.5489466679164, 
20.622315219241), B3 = c(21.9123487685507, 22.2790808524578, 
21.1321045998028, 22.3747058136723, 22.3639090145369, 20.6142641267144
)), row.names = c("1", "2", "3", "4", "5", "6"), class = "data.frame")

And I want to analyse it for differential expression analysis. For that I have to plot MA plot. I got the log fold change value from the following code,

library(limma)
library(edgeR)

cts <- as.data.frame(data)

#Changing the first column as a row name
data2 <- cts [,-1]
Protein_info <- cts[,1]
rownames(data2) <- make.names(Protein_info, unique = TRUE)

#Creating the model matrix
eset <- data2
Groups <- model
design <- model.matrix(~0+factor(Groups))
colnames(design)<- c("A", "B")

#Fitting the model
fit <-lmFit(eset, design)
fit <- eBayes(fit)
options (digits = 2)
res <- topTable(fit, number= Inf, adjust.method = "none", coef = 1)

#Making the table with logFC and p-values
res1 <- as.data.frame(res)
my_data <- as_tibble(res1)
res_table2 <-my_data%>%select(1,3)
res_table2 <- as.data.frame(res_table2)
id_name <- as.data.frame(Protein_info)
res_table <- cbind(id_name, res_table2)
res_table$logFC

But I couldn't get average log intensity values [A = 1/2(logB+logA)] at base 2, for plotting in the x-axis of MA plot. I am new to this field. So, kindly give some idea for getting this values.

It may seems like a simple question. Since I am new to this area, please help me.. Thank you in advance.

R differential_expression proteomics • 882 views
ADD COMMENT
1
Entering edit mode
2.4 years ago
ATpoint 85k

Its the AveExpr column in the topTable output which is nothing but a rowMeans of the input data. I would guess that your data are already log2 based on the magnitude of values and the fact that it's proteomics.

ADD COMMENT
0
Entering edit mode

Okay. Sorry I am not getting your answer. What is the column name of log average intensity values from the above code? and from which dataset?

ADD REPLY
0
Entering edit mode

The AveExpr column in the output of the topTable function.

ADD REPLY

Login before adding your answer.

Traffic: 2343 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6