Ringo and dye swaps
1
0
Entering edit mode
jbethune ▴ 10
@jbethune-4187
Last seen 9.6 years ago
Dear all, I'm using Ringo to analyse agilent tiling arrays. I have two arrays measuring the same sample but the second one is dye-swapped. The obivious solution is to create a target-file like this: SlideNumber FileName Species Tissue Cy3 Cy5 Antibody dosR1 array1.txt m_bovis unspec input dosR dosR dosR2 array2.txt m_bovis unspec dosR input dosR where the Cy3 and Cy5 values are exchanged for the second array. But this exchange of Cy3 and Cy5 values does not have any effect on the result (the values are the same and the plot of the dye-swapped array seems to be upside-down in both cases). I would very much appreciate if someone could tell me if this approach with the target file is right so that I can search for the error elsewhere. If you are interested in further details, this is the relevant code: dataDir <- "data/"; used_genome <- "m. bovis"; load( file = file.path( dataDir, "m_bovis_gff.RData" ) ); replicateAnalysis <- function( arrayfiles, targetfile ) { library( "Ringo" ); RG <- read.maimages( arrayfiles, source="agilent" ); RG$targets <- readTargets( targetfile ); pA <- extractProbeAnno( RG, "agilent", genome=used_genome, microarray=paste( "Agilent Array with species", used_genome ) ); X <- preprocess( RG[ RG$genes$ControlType == 0, ], method="nimblegen", idColumn="ProbeName" ); sampleNames( X ) <- X$SlideNumber; smoothX <- computeRunningMedians( X, modColumn="Antibody", winHalfSize=500, min.probes=3, probeAnno=pA ); sampleNames( smoothX ) <- paste( sampleNames( X ), "smooth", sep="." ); plot( seq( nrow( exprs( smoothX ) ) ), exprs( smoothX )[,1], col="red", type="l", xlab="", ylab="" ); if( length( arrayfiles ) == 2 ) { lines( seq( nrow( exprs( smoothX ) ) ), exprs( smoothX )[,2], col="blue", type="l" ); } return( smoothX ); } hm <- c( file.path( dataDir, "array1.txt" ), file.path( dataDir, "array2.txt" ) ); target_hm <- file.path( dataDir, "targets_11_1_replicates" ); hm_result <- replicateAnalysis( hm, target_hm ); title( "HM Design replicates", xlab="position", ylab="fold change" ); legend( "topright", c( "dosR1", "dosR2" ), fill=c("red", "blue"), col=c("red", "blue" ) );
Ringo Ringo • 962 views
ADD COMMENT
0
Entering edit mode
@joern-toedling-3465
Last seen 9.6 years ago
Hello, using the targets file to indicate dye-swaps is a nice idea, but unfortunately Ringo currently cannot understand this. The values that Ringo works with in later steps are always the ratios ChIP/input and they are assumed to correspond to the separate channels. So when calling "preprocess" one can indicate which channel (Cy3/Cy5) is ChIP and which is Input but no such dye-swaps at the moment. If you are using a within-array normalization, such as the Nimblegen scaling or Loess" you will need to replace the respective columns in the object resulting from preprocess. For example, when they are on log-scale as in this case, the inverse will give you the log(ChIP/input): exprs(X)[,2] <- -exprs(X)[,2] For between-array normalization types, you need to replace the respective columns before to ensure that one channel is only ChIP, the other only Input. In your case: temp <- RG$G[,2] # G corresponds to Cy3 RG$G[,2] <- RG$R[,2] RG$R[,2] <- temp This should do the trick. I apologize for this slightly dirty hack, but I did not have dye-swap samples in mind when I wrote "preprocess". Maybe it would be good to have an extra argument in the function for such cases. Regards, Joern On Thu, 29 Jul 2010 12:42:12 +0200, jbethune wrote > Dear all, > > I'm using Ringo to analyse agilent tiling arrays. I have two arrays > measuring the same sample but the second one is dye-swapped. > > The obivious solution is to create a target-file like this: > > SlideNumber FileName Species Tissue Cy3 Cy5 Antibody > dosR1 array1.txt m_bovis unspec input dosR dosR > dosR2 array2.txt m_bovis unspec dosR input dosR > > where the Cy3 and Cy5 values are exchanged for the second array. > > But this exchange of Cy3 and Cy5 values does not have any effect on the > result (the values are the same and the plot of the dye-swapped array > seems to be upside-down in both cases). > > I would very much appreciate if someone could tell me if this > approach with the target file is right so that I can search for the error > elsewhere. > > If you are interested in further details, this is the relevant code: > > dataDir <- "data/"; > > used_genome <- "m. bovis"; > load( file = file.path( dataDir, "m_bovis_gff.RData" ) ); > > replicateAnalysis <- function( arrayfiles, targetfile ) { > library( "Ringo" ); > RG <- read.maimages( arrayfiles, source="agilent" ); > RG$targets <- readTargets( targetfile ); > pA <- extractProbeAnno( RG, "agilent", genome=used_genome, > microarray=paste( "Agilent Array with species", used_genome ) ); > X <- preprocess( RG[ RG$genes$ControlType == 0, ], > method="nimblegen", idColumn="ProbeName" ); sampleNames( X ) <- X$SlideNumber; > smoothX <- computeRunningMedians( X, modColumn="Antibody", > winHalfSize=500, min.probes=3, probeAnno=pA ); > sampleNames( smoothX ) <- paste( sampleNames( X ), "smooth", > sep="." ); plot( seq( nrow( exprs( smoothX ) ) ), exprs( smoothX > )[,1], col="red", type="l", xlab="", ylab="" ); if( length( > arrayfiles ) == 2 ) { lines( seq( nrow( exprs( smoothX ) ) ), > exprs( smoothX )[,2], col="blue", type="l" ); } return( smoothX > ); } > > hm <- c( file.path( dataDir, "array1.txt" ), file.path( dataDir, > "array2.txt" ) ); > target_hm <- file.path( dataDir, "targets_11_1_replicates" ); > > hm_result <- replicateAnalysis( hm, target_hm ); > title( "HM Design replicates", xlab="position", ylab="fold change" ); > legend( "topright", c( "dosR1", "dosR2" ), fill=c("red", "blue"), > col=c("red", "blue" ) ); > > --- Joern Toedling Institut Curie -- U900 26 rue d'Ulm, 75005 Paris, FRANCE Tel. +33 (0)156246927
ADD COMMENT

Login before adding your answer.

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