split.AffyBatch
3
0
Entering edit mode
Wenbin Liu ▴ 10
@wenbin-liu-859
Last seen 10.2 years ago
Dear all, I was using affy package's split.AffyBatch function to split an AffyBatch (9 affy chips with 45101 probesets/chip) to two parts, expecting 3 columns for the exprSet of one part and 6 for the the other, with 45101 rows for both. However, it divided the rows instead of columns. I updated the package affy, but it didn't help. Has someone encountered a similar problem? Thanks, Wenbin __________________________________ Vote for the stars of Yahoo!'s next ad campaign!
affy affy • 1.0k views
ADD COMMENT
0
Entering edit mode
F Duan ▴ 100
@f-duan-848
Last seen 10.2 years ago
Youraffy[,1:3] # part I Youraffy[,4:9] # part II Frank -----Original Message----- From: bioconductor-bounces@stat.math.ethz.ch [mailto:bioconductor-bounces@stat.math.ethz.ch] On Behalf Of Wenbin Liu Sent: Wednesday, July 21, 2004 13:08 To: bioconductor@stat.math.ethz.ch Subject: [BioC] split.AffyBatch Dear all, I was using affy package's split.AffyBatch function to split an AffyBatch (9 affy chips with 45101 probesets/chip) to two parts, expecting 3 columns for the exprSet of one part and 6 for the the other, with 45101 rows for both. However, it divided the rows instead of columns. I updated the package affy, but it didn't help. Has someone encountered a similar problem? Thanks, Wenbin __________________________________ Vote for the stars of Yahoo!'s next ad campaign! _______________________________________________ Bioconductor mailing list Bioconductor@stat.math.ethz.ch https://www.stat.math.ethz.ch/mailman/listinfo/bioconductor
ADD COMMENT
0
Entering edit mode
@james-w-macdonald-5106
Last seen 29 minutes ago
United States
split.AffyBatch() is not designed to split AffyBatches in the manner you want. Instead, it is designed to split on rows, based on a certain factor (e.g., it is working as designed). If you want to split your AffyBatch by columns, you simply subset. For instance, to split into two AffyBatches where one contains the first three columns and the other the last six, first.abatch <- abatch[,1:3] second.abatch <- abatch[,4:9] If you want non-contiguous columns, you simply concatenate the column numbers. first.abatch <- abatch[,c(1,3,5)] second.abatch <- abatch[,c(2,4,6,7,8,9)] HTH, Jim James W. MacDonald Affymetrix and cDNA Microarray Core University of Michigan Cancer Center 1500 E. Medical Center Drive 7410 CCGC Ann Arbor MI 48109 734-647-5623 >>> Wenbin Liu <snakeeye1966@yahoo.com> 07/21/04 01:07PM >>> Dear all, I was using affy package's split.AffyBatch function to split an AffyBatch (9 affy chips with 45101 probesets/chip) to two parts, expecting 3 columns for the exprSet of one part and 6 for the the other, with 45101 rows for both. However, it divided the rows instead of columns. I updated the package affy, but it didn't help. Has someone encountered a similar problem? Thanks, Wenbin __________________________________ Vote for the stars of Yahoo!'s next ad campaign! _______________________________________________ Bioconductor mailing list Bioconductor@stat.math.ethz.ch https://www.stat.math.ethz.ch/mailman/listinfo/bioconductor
ADD COMMENT
0
Entering edit mode
James MacDonald wrote: > split.AffyBatch() is not designed to split AffyBatches in the manner you > want. Instead, it is designed to split on rows, based on a certain > factor (e.g., it is working as designed). I think I designed split.AffyBatch to split on columns (and 'example(split.AffyBatch)' seems to confirm that). Splitting on rows does not make much sense unless you update the cdfenv at the same time because of the indexing system (this is already implemented and under testing... it will go public On my machine it seems to work fine with the example (R-1.9.1, affy-1.5.1) and I cannot see what Wen-Bin refers to. For help, more information (like the version number for R and for the package, and the exact function call used.) would be needed. > If you want to split your AffyBatch by columns, you simply subset. For > instance, to split into two AffyBatches where one contains the first > three columns and the other the last six, > > first.abatch <- abatch[,1:3] > second.abatch <- abatch[,4:9] > > If you want non-contiguous columns, you simply concatenate the column > numbers. > > first.abatch <- abatch[,c(1,3,5)] > second.abatch <- abatch[,c(2,4,6,7,8,9)] > > HTH, > > Jim > > > > James W. MacDonald > Affymetrix and cDNA Microarray Core > University of Michigan Cancer Center > 1500 E. Medical Center Drive > 7410 CCGC > Ann Arbor MI 48109 > 734-647-5623 > > >>>>Wenbin Liu <snakeeye1966@yahoo.com> 07/21/04 01:07PM >>> > > Dear all, > > I was using affy package's split.AffyBatch function to > split an AffyBatch (9 affy chips with 45101 > probesets/chip) to two parts, expecting 3 columns for > the exprSet of one part and 6 for the the other, with > 45101 rows for both. However, it divided the rows > instead of columns. > > I updated the package affy, but it didn't help. > > Has someone encountered a similar problem? > > Thanks, > > Wenbin > > > > > > > __________________________________ > > Vote for the stars of Yahoo!'s next ad campaign! > > _______________________________________________ > Bioconductor mailing list > Bioconductor@stat.math.ethz.ch > https://www.stat.math.ethz.ch/mailman/listinfo/bioconductor > > _______________________________________________ > Bioconductor mailing list > Bioconductor@stat.math.ethz.ch > https://www.stat.math.ethz.ch/mailman/listinfo/bioconductor >
ADD REPLY
0
Entering edit mode
As I was pointed out by Ben Bolstad, split.AffyBatch _does_ behave erratically. After a quick look changes were made elsewhere in the subsetting functions for objects of class AffyBatch, and apparently these changes had a sneaky incidence on the outcome of (at least) split.AffyBatch. The inheritance of S4-style methods works better than in the old days this function was written, and a quick and dirty temporary fix for the problem is may be to do: rm("split.AffyBatch", envir=as.environment("package:affy")) ##(quite a fix, ha... just remove the whole...) Ex: library(affy) rm("split.AffyBatch", envir=as.environment("package:affy")) library(affydata) data(Dilution) sp <- split(Dilution, pData(Dilution)$liver) print(sp) However, now when using the function there are warning messages. I would propose to rehabilitate the functions recently declared as "deprecated" (since these changes break some methods inherited from exprSet(*))... but I suspect that the changes to the subsetting of objects of class AffyBatch were asked by users. Anyone to oppose/confirm/debate ? L. (*): an other option is to override the method with methods (and with code redundancy)...
ADD REPLY
0
Entering edit mode
@james-w-macdonald-5106
Last seen 29 minutes ago
United States
Ah, how stupid of me. I got confused looking at the help for split, which is designed to split *vectors* on a factor, hence my thinking that you were splitting on rows rather than columns. As an aside, given that there is already subsetting of an AffyBatch using the '[' operator, is split.AffyBatch simply designed to allow subsetting based e.g., on something in the phenoData slot, or is there another rationale? Best, Jim James MacDonald wrote: > split.AffyBatch() is not designed to split AffyBatches in the manner you > want. Instead, it is designed to split on rows, based on a certain > factor (e.g., it is working as designed). I think I designed split.AffyBatch to split on columns (and 'example(split.AffyBatch)' seems to confirm that). James W. MacDonald Affymetrix and cDNA Microarray Core University of Michigan Cancer Center 1500 E. Medical Center Drive 7410 CCGC Ann Arbor MI 48109 734-647-5623
ADD COMMENT

Login before adding your answer.

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