How do I remove the outlier probes highlighted in the plotSA function of limma
2
0
Entering edit mode
S • 0
@0b4d0d5b
Last seen 3 months ago
Norway

Hi,

After running my linear model using microarray data, I am using plotSA to check if there is a generally monotonic relation between the average log expression and the residual standard deviation. The plot detects a few outlier probes and highlights them in red. I was wondering if you wanted to know which are those probes exactly and not guess based on the mean and SD, I was wondering how can I do that?

```

limma • 1.3k views
ADD COMMENT
0
Entering edit mode
Basti ▴ 780
@7d45153c
Last seen 2 days ago
France

Check the plotSA source function on how outliers are detected : https://rdrr.io/bioc/limma/src/R/plots-fit.R

Particularly the "Check for outlier variances" part, you can run the function step by step and you can identify which points are assigned as outliers :

if(length(fit$df.prior)>1L) {
        df2 <- max(fit$df.prior)
        s2 <- fit$sigma^2 / fit$s2.prior
        pdn <- pf(s2, df1=fit$df.residual, df2=df2)
        pup <- pf(s2, df1=fit$df.residual, df2=df2, lower.tail=FALSE)
        FDR <- p.adjust(2*pmin(pdn,pup),method="BH")
        colv[FDR <= 0.5] <- col[2]
    }
ADD COMMENT
0
Entering edit mode
@gordon-smyth
Last seen 1 hour ago
WEHI, Melbourne, Australia

Identifying and trouble-shooting the genes with outlier variances is fine. Removing them just because they are outliers is not fine. limma has already treated them correctly and you do not need to micromanage the limma analysis. Taking it upon yourself to remove the outlier probes manually may damage or bias the analysis.

The hyper-variable genes are those with small values for df.prior. Assuming that your fit object includes gene annotation:

Genes <- data.frame(fit$genes, df.prior=fit$df.prior)
o <- order(Genes$df.prior)
Genes <- Genes[o,]
head(Genes)
ADD COMMENT

Login before adding your answer.

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