Script for analyzing idat (illumina) microarray files with limma, any suggestion?
2
2
Entering edit mode
5.8 years ago
Pol ▴ 70

I have some idat files to analyze, since I haven’t found a complete script for doing it I have wrote one by myself:

library(limma)

# Files and experimental conditions
targets <- readTargets("targets.txt")  # I have two conditions "KO" and "WT"

# Reading data
idatfiles = dir(path="C:/Data", pattern = ".idat")
bgxfile = dir(path = "C:/Data", pattern = ".bgx")
data = read.idat(idatfiles, bgxfile)

# Normalization and background adjustment
data2 <- neqc(data)

# Build the design matrix for the linear modelling function. 
f <- factor(targets$Condition, levels = unique(targets$Condition))
design <- model.matrix(~0 + f)
colnames(design) <- levels(f)

# Apply the intensity values to lmFit. 
fit <- lmFit(data2, design)

# Create a contrast matrix. In this example, all combinations of contrasts can be set up as below. 
contrast.matrix <- makeContrasts("KO-WT",  levels=design)

# Apply this contrast matrix to the modeled data and compute statistics for the data.
fit2 <- contrasts.fit(fit, contrast.matrix)
fit2 <- eBayes(fit2)

# Output the statistics for the dataset and write them to disk for further analysis.
output <- topTable(fit2, adjust="BH", coef="KO-WT", genelist=data2$genes, number=Inf)
write.table(output, file="Results.txt", sep="\t", quote=FALSE)

I have two questions, is it correct? Do you have any suggestion to improve it?

Thank you very much.

R limma idat • 3.9k views
ADD COMMENT
1
Entering edit mode
5.8 years ago
poisonAlien ★ 3.1k

Hi, I have written a small automated script for analysis of idat files from Illumina beadarrays (HT12V4 platform, but you can change the platform to yours). You can find it here.

ADD COMMENT
0
Entering edit mode

Thank you, I' ll check it

ADD REPLY
0
Entering edit mode

Can you please update the link? Thanks.

ADD REPLY
0
Entering edit mode

Try Here

ADD REPLY
0
Entering edit mode

I tried but gave up since the debugging takes longer than creating my own script. Some errors below:

topTable = beadAnalyze(idats = c("9533701097_A_Grn.idat","9533701097_B_Grn.idat","9533701097_C_Grn.idat","9533701097_D_Grn.idat"),names = c("H7_2a_2v_A","H7_2a_2v_B","H7_2v_C","H7_2v_D"),condition = c("2a_2v","2a_2v","2v","2v"),ref.condition = "2v", fdr = 0.05, plotPCA = T) Annotating control probes using package illuminaHumanv4.db Version:1.26.0 Show Traceback Rerun with Debug Error in (function (od, vd) : object and replacement value dimnames differ

Error in validObject(.Object) : invalid class “ExpressionSet” object: 1: sampleNames differ between assayData and phenoData invalid class “ExpressionSet” object: 2: sampleNames differ between phenoData and protocolData

ADD REPLY
0
Entering edit mode
2.4 years ago
Gordon Smyth ★ 4.4k

Your read.idat call couldn't work because you specified a path to dir but not to read.idat.

read.idat and neqc are the only function calls specific to Illumina arrays. Once you run them, it's just like any other limma analysis.

ADD COMMENT

Login before adding your answer.

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