Question: Script for analyzing idat (illumina) microarray files with limma, any suggestion?
gravatar for Pol
4.6 years ago by
Pol70 wrote:

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


# 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 <-, 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.

limma idat R • 3.4k views
ADD COMMENTlink modified 14 months ago by Gordon Smyth2.3k • written 4.6 years ago by Pol70
gravatar for poisonAlien
4.6 years ago by
poisonAlien3.0k wrote:

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 COMMENTlink written 4.6 years ago by poisonAlien3.0k

Thank you, I' ll check it

ADD REPLYlink written 4.6 years ago by Pol70

Can you please update the link? Thanks.

ADD REPLYlink written 3.2 years ago by Ömer An230

Try Here

ADD REPLYlink written 3.1 years ago by poisonAlien3.0k

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 REPLYlink written 3.1 years ago by Ömer An230
gravatar for Gordon Smyth
14 months ago by
Gordon Smyth2.3k
Gordon Smyth2.3k wrote:

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 COMMENTlink modified 14 months ago • written 14 months ago by Gordon Smyth2.3k
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1078 users visited in the last hour