microarray analysis code
2
0
Entering edit mode
nia ▴ 30
@nia-12707
Last seen 4.1 years ago

hello fellows ,

i am currently working on a project in which i have to do micro array analysis.I am working on R for analysis, my series have 10 samples and it is normalized so i directly applied limma code on that. The code is working but i am not satisfied with the result or with my code .kindly help me in the best possible way (code is given below).

q1> if the code i am using is correct to know DEGs from sample data

q2> as i write n=10 , for only 10 degs but as i understand my query is to know all the degs of sample for this i search on Google and i  use n=Inf but when i used it, i got a huge list of probe list but no other info. e.g. entrez, symbol etc. So kindly tell me the specific code for knowing all the degs of my sample or we have to select genes manually a/c to need.

q3> as you can see in my result  only 3 probes are showing  p.adj.value < 0.05,  so i have a confusion that from 10 samples i only work on 3 genes it will be not good for the further enrichment and miRna analysis i follow the same procedure for n=500 and i got 3 genes . So should i dont do the BH test and go further or is there is an alternative option for that.please help me out in the best possible way.

library(limma)
library(GEOquery)
gse <- getGEO("GSE*****", GSEMatrix = TRUE)
show(gse)
> gse <- gse[[1]]
> fData(gse) <- fData(gse)[,c(1,2,10:12)]
> grp <- factor(sapply(strsplit(as.character(pData(gse)[,1]), " "), "[", 1))

>grp
 [1] A_set  A_set  AS_set AS_set AS_set F_set  F_set  S_set  S_set  S_set
Levels: A_set AS_set F_set S_set

> design <- model.matrix(~grp)
> fit <- lmFit(gse, design)
> fit2 <- eBayes(fit)
tt<- topTable(fit2, coef = 2, adjust = "fdr",n = 10)

                       ID    GB_ACC
210004_at       210004_at  AF035776
236646_at       236646_at  BE301029
1560477_a_at 1560477_a_at  AK054643
213227_at       213227_at  BE879873
222221_x_at   222221_x_at  AY007161
220922_s_at   220922_s_at NM_013453
222860_s_at   222860_s_at  AB033832

microarray • 865 views
ADD COMMENT
1
Entering edit mode
@james-w-macdonald-5106
Last seen 27 minutes ago
United States

First off, note that you are only looking at the contrast of AS_set vs A_set. There are six total comparisons you could make (well, individual comparisons; you could make more if you look at averages of combined groups). If you do a PCA plot of these data, you will see that the different groups are not very consistent, so it is not likely that you will get lots of genes without some extra work on your part.

Simply using a weighted linear model increases the number of genes at an FDR of 0.1 to 13 genes. If I use the sva package to correct for unknown batch effects, I get 511 genes for the first contrast at an FDR of 0.1.

The limma User's Guide has a section on using array quality weights, and the sva package has a vignette, so I leave it to you to read those documents rather than simply repeating here what you could read there.
 

ADD COMMENT
0
Entering edit mode
nia ▴ 30
@nia-12707
Last seen 4.1 years ago

Thank you James for your response it was really helpful, i am getting this error now .

plotPCA(eset, groups =as.numeric(pData(Data)[,1]),groupnames =levels(pData(Data)[,1]))

> grp
[1] 1  2  3  4  5  6  7  8  9  10
Levels: 1 10 2 3 4 5 6 7 8 9
> design <- model.matrix(~grp)
> design

  Group1 Group2 Group3 Group4
1      1      0      0      0
2      0      1      0      0
3      0      0      1      0
4      0      0      0      1
attr(,"assign")
[1] 1 1 1 1
attr(,"contrasts")
attr(,"contrasts")$`factor(c(1, 2, 3, 4))`
[1] "contr.treatment"

> fit <- lmFit(Data, design)

> fit2 <- eBayes(fit)

Error in ebayes(fit = fit, proportion = proportion, stdev.coef.lim = stdev.coef.lim,  :
  No residual degrees of freedom in linear model fits


while following the code on pg#99 i got the error given below

>  fit <- lmFit(eset, design)
Error in lmFit(eset, design) :
  row dimension of design doesn't match column dimension of data object


So, i try multiple codes but now i am getting errors related to fit.

i am using the above codes for identifying list of DEGs  (further do its functional and miRNA analysis) is this a correct approach. 

ADD COMMENT
0
Entering edit mode

The box at the bottom of the page that says 'Add your answer' is intended for adding answers, not additional questions. Use the 'ADD COMMENT' button at the bottom of a post to add additional comments or questions.

You cannot fit a linear model if you only have one sample per group, which is what the error is telling you. In the second case the error is pretty clear - your design matrix doesn't match your data, so you have mis-specified something.

 

ADD REPLY

Login before adding your answer.

Traffic: 718 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