Search
Question: Two color Nucleosomes ChIP-ChIP data analysis using Ringo package.
0
gravatar for ashubiochem
3.3 years ago by
United States
ashubiochem0 wrote:

Dear All,

I want to analyze two color .GPR files from Agilent 4x44K array downloaded from GEO. This data set is a nucleosomal ChIP-ChIP experiment where channel 1 and 2 are labeled with two different antibodies. I am a newbie to ChIP-ChIP data analysis, though I could manage to create the RGlist and ExpressionSet using limma and Ringo package. Further I tried using CMARRT algorithm from Starr package to find Chip-enriched regions. But it throws error "Error in density.default(logR) : 'x' contains missing values". Please point out the mistake in the script I am using for analysis.

targets <- readTargets("targets.txt", row.names="Name")
RG <- read.maimages(targets,columns=list(R="F635 Mean",G="F532 Mean",Rb="B635 Median",Gb="B532 Median"), wt.fun=wtflags(weight=0,cutoff=-50),
          annotation=c("Block","Row","Column","ID","Name")) 
eSetB <- preprocess(RG, method="loess", ChIPChannel="R", inputChannel="G",
                    returnMAList=FALSE, idColumn="ID", backgroundCorrect(RG, method="subtract"))
peaks = cmarrt.ma(eSetB, GPL_probeAnno, chr = NULL, M= NULL,
                   frag.length = 300)

"Error in density.default(logR) : 'x' contains missing values"

I have noticed that if i avoid mentioning Rb="B635 Median",Gb="B532 Median" in the limma package's read.maimages command, The script does not throw any error, and i get the peaks as list object. It would be great If someone could point out the mistake and help in troubleshooting.

sessionInfo()   

R version 3.2.0 (2015-04-16)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 8 x64 (build 9200)

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

attached base packages:
[1] grid      parallel  stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] Starr_1.24.0        affxparser_1.40.0   affy_1.46.1         Ringo_1.32.0        lattice_0.20-31    
 [6] Matrix_1.2-1        limma_3.24.12       RColorBrewer_1.1-2  Biobase_2.28.0      BiocGenerics_0.14.0

loaded via a namespace (and not attached):
 [1] AnnotationDbi_1.30.1  MASS_7.3-42           splines_3.2.0         zlibbioc_1.14.0      
 [5] IRanges_2.2.5         pspline_1.0-17        xtable_1.7-4          GenomeInfoDb_1.4.1   
 [9] tools_3.2.0           DBI_0.3.1             genefilter_1.50.0     survival_2.38-3      
[13] preprocessCore_1.30.0 affyio_1.36.0         S4Vectors_0.6.1       RSQLite_1.0.0        
[17] BiocInstaller_1.18.3  stats4_3.2.0          XML_3.98-1.3          annotate_1.46.0      
[21] vsn_3.36.0 

  
ADD COMMENTlink modified 3.2 years ago • written 3.3 years ago by ashubiochem0
0
gravatar for James W. MacDonald
3.3 years ago by
United States
James W. MacDonald48k wrote:

The hint comes from ?backgroundCorrect:

Details:

     This function implements the background correction methods
     reviewed or developed in Ritchie et al (2007) and Silver at al
     (2009). Ritchie et al (2007) recommend  method="normexp"  whenever
      RG  contains local background estimates. Silver et al (2009)
     shows that either  normexp.method="mle"  or
      normexp.method="saddle"  are excellent options for normexp. If
      RG  contains morphological background estimates instead
     (available from SPOT or GenePix image analysis software), then
      method="subtract"  performs well.

     If  method="none"  then no correction is done, i.e., the
     background intensities are treated as zero. If  method="subtract"
     then the background intensities are subtracted from the foreground
     intensities. This is the traditional background correction method,
     but is not necessarily recommended. If  method="movingmin"  then
     the background estimates are replaced with the minimums of the
     backgrounds of the spot and its eight neighbors, i.e., the
     background is replaced by a moving minimum of 3x3 grids of spots.

     The remaining methods are all designed to produce positive
     corrected intensities. If  method="half"  then any intensity which
     is less than 0.5 after background subtraction is reset to be equal
     to 0.5. If  method="minimum"  then any intensity which is zero or
     negative after background subtraction is set equal to half the
     minimum of the positive corrected intensities for that array. If
      method="edwards"  a log-linear interpolation method is used to
     adjust lower intensities as in Edwards (2003). If
      method="normexp"  a convolution of normal and exponential
     distributions is fitted to the foreground intensities using the
     background intensities as a covariate, and the expected signal
     given the observed foreground becomes the corrected intensity.
     This results in a smooth monotonic transformation of the
     background subtracted intensities such that all the corrected
     intensities are positive.

If you use a background correction method that can result in negative values, then when you take logs you get a NaN, which will be interpreted as a missing value.

ADD COMMENTlink written 3.3 years ago by James W. MacDonald48k

James W. MacDonald

Thanks, I modified the command 

eSetB <- preprocess(RG, method="loess", ChIPChannel="R", inputChannel="G",
+                     returnMAList=FALSE, idColumn="ID", verbose=TRUE, ... = backgroundCorrect(RG, method="normexp"))

but It's throwing the error.

Error in normalizeWithinArrays(myRG, method = "loess", ...) :
  unused argument (... = list(R = c(21769.33, 20702.33, 1450.875, 1449.783, 1451.832, 1451.558, 1452.242, 1453.474, 1451.012, 1452.652, 1456.218.......

could you suggest me the correct command?

ADD REPLYlink written 3.3 years ago by ashubiochem0

Look at the command you used. Do you see your error?
 

ADD REPLYlink written 3.3 years ago by James W. MacDonald48k

Thanks,  I could figure out the problem in the command. I am absolute beginner in R.

backgroundCorrect(RG, method="normexp")) 

should be done before preprocessing step in Ringo.

 

ADD REPLYlink written 3.2 years ago by ashubiochem0
Please log in to add an answer.

Help
Access

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