variance stabilization and normalization
2
0
Entering edit mode
8.6 years ago
ash ▴ 10

Hello to everyone,

I have a question regarding vsn normalization. Can vsn2 function in r can be used to normalize the cel files obtained from rawdata? I have tried using this normalization method but it displays this error

Error in MatrixFromNChannelSet(x, backgroundsubtract = backgroundsubtract,  :
  One or more elements of 'foreground' are not contained in 'channelNames(x)'.

Could you please help me with this situation?

normalization R microarray-data • 3.3k views
ADD COMMENT
1
Entering edit mode
8.6 years ago

I tried with GSE8771 (mouse4302 affymetrix chip with 6 cel files : 3 N and 3 Transgene) and for GSE 45161 ( human HG-U133_Plus_2 affy chip with 10 samples: 5 avastin treated and 5 untreated). vsn2 function in VSN package worked fine without error.

For GSE 8771:

library(simpleaffy)
library(vsn)
raw_data<-read.affy("covdesc.txt")
vsn2.raw.data=vsn2(raw_data)
meanSdPlot(vsn2.raw.data)

covdesc.txt (treatment is second column and each column is tab separated)

                 treatment
GSM217868.CEL    TG
GSM217869.CEL    TG
GSM217870.CEL    TG
GSM217871.CEL    NTG
GSM217872.CEL    NTG
GSM217873.CEL    NTG

For GSE45161:

library(vsn)
library(affy)

###read experimental data. Cel file names are in a csv file.
samples.cel=data.frame(read.delim2("GSE45161.csv", row.names = 2, sep="\t", header=TRUE))
### sort row names (sample names)
samples.cel=samples.cel[sort(row.names(samples.cel)),]
### load cel files and store as object
GSE45161.cel=ReadAffy(filenames = row.names(samples.cel))
GSE45161.cel.vsn2=vsn2(GSE45161.cel)
meanSdPlot(GSE45161.cel.vsn2)

GSE45161.csv (Each column is tab separated)

Name    FileName    Target
GSM1098406    GSM1098406_EA11029_139240_HG-U133_PLUS_2_H3.CEL    Avastin
GSM1098407    GSM1098407_EA11029_139241_HG-U133_PLUS_2_H4.CEL    Avastin
GSM1098409    GSM1098409_EA11029_139243_HG-U133_PLUS_2_H6.CEL    Avastin
GSM1098411    GSM1098411_EA11029_139245_HG-U133_PLUS_2_H8.CEL    Avastin
GSM1098413    GSM1098413_EA11029_139247_HG-U133_PLUS_2_H10.CEL    Avastin
GSM1098404    GSM1098404_EA11029_139238_HG-U133_PLUS_2_H1.CEL    control
GSM1098405    GSM1098405_EA11029_139239_HG-U133_PLUS_2_H2.CEL    control
GSM1098408    GSM1098408_EA11029_139242_HG-U133_PLUS_2_H5.CEL    control
GSM1098410    GSM1098410_EA11029_139244_HG-U133_PLUS_2_H7.CEL    control
GSM1098412    GSM1098412_EA11029_139246_HG-U133_PLUS_2_H9.CEL    control

It worked. No errors

session info:

R version 3.2.2 (2015-08-14)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252    LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C                           LC_TIME=English_United States.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base
ADD COMMENT
0
Entering edit mode

Thank you so much for your reply. I work with same human human HG-U133_Plus_2 microarray with multiple myeloma datasets.

My code looks like this

library(affy)
library(vsn)

library(oligo)

celFiles <- list.celfiles()
affyRaw <- read.celfiles(celFiles)

####only train datasets#########

library(pd.hg.u133. plus.2)
vsnTRAIN = vsn2(affyRaw)

it displays an error

Error in MatrixFromNChannelSet(x, backgroundsubtract = backgroundsubtract,  : 
  One or more elements of 'foreground' are not contained in 'channelNames(x)'.
ADD REPLY
1
Entering edit mode
8.6 years ago

I suggest you drop oligo package and instead use affy package only to load cel files and further normalization (by vsn2), unless you need oligo for further downstream processing. However, if you want to proceed with oligo, below is the code. Code is given for both affy and oligo package.

For affy:

library(vsn)
library(affy)
celFiles &lt;- list.celfiles()
affyraw=ReadAffy(filenames = celFiles)
affyraw.vsn2=vsn2(affyraw)
meanSdPlot(affyraw.vsn2)

For oligo:

library(vsn)
library(oligo)
celFiles <- list.celfiles()
affyRaw <- read.celfiles(celFiles)
affyRaw.pm.vsnm=vsnMatrix(pm(affyRaw)) # running VSN on  PM values 
meanSdPlot(affyRaw.pm.vsnm)

Please note that meanSdPlots for the above methods look identical.

ADD COMMENT

Login before adding your answer.

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