Question: question about limma2annaffy
0
12.7 years ago by
Jenny Drnevich2.2k
Jenny Drnevich2.2k wrote:
Hi Jim, I'm learning to use your limma2annaffy function, and I have a few questions. In the affycoretools vignette (Feb 6, 2007), you call limma2annaffy this way: > limma2annaffy(eset, fit2, design, annotation(eset), pfilt = 0.05) I think there's a typo in this, because you've left out the contrast matrix. When I try the same on my data: > limma2annaffy(gcrma.pres, fit2, design, annotation(gcrma.pres),pfilt=0.05) Error in vector("list", dim(contrast)[2]) : negative length vectors are not allowed When I try naming the annotation(gcrma.pres) argument, I get this: > limma2annaffy(gcrma.pres, fit2, design, lib=annotation(gcrma.pres),pfilt=0.05) Error in vector("list", dim(contrast)[2]) : argument "contrast" is missing, with no default It does work when I add the contrast matrix: > limma2annaffy(gcrma.pres, fit2, design, cont.matrix,annotation(gcrma.pres),pfilt=0.05) So, besides pointing out an apparent error in the vignette, I had a question as to what you would do if you didn't use a contrast matrix? Now, most all the time that I analyze affy data I do use a contrast matrix, but you don't always have to use one. I have some other questions/suggestions to improve the ease of use of affycoretools, but they are too complicated to put in this e-mail... Thanks, Jenny > sessionInfo() R version 2.5.0 Under development (unstable) (2007-02-03 r40636) i386-pc-mingw32 locale: LC_COLLATE=English_United States.1252;LC_CTYPE=English_United States.1252;LC_MONETARY=English_United States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252 attached base packages: [1] "splines" "tools" "stats" "graphics" "grDevices" "utils" [7] "datasets" "methods" "base" other attached packages: canine2 affyQCReport lattice geneplotter RColorBrewer "1.15.13" "1.13.16" "0.14-16" "1.12.0" "0.2-3" simpleaffy made4 scatterplot3d ade4 affyPLM "2.9.1" "1.8.0" "0.3-24" "1.4-2" "1.11.13" affydata affycoretools annaffy xtable gcrma "1.11.1" "1.7.7" "1.7.2" "1.4-3" "2.7.1" matchprobes biomaRt RCurl XML GOstats "1.7.4" "1.9.16" "0.8-0" "1.4-1" "2.1.11" Category genefilter survival KEGG RBGL "2.1.11" "1.13.8" "2.31" "1.15.1" "1.11.4" annotate GO graph limma affy "1.13.6" "1.15.1" "1.13.5" "2.9.10" "1.13.14" affyio Biobase RWinEdt "1.3.3" "1.13.36" "1.7-5" > Jenny Drnevich, Ph.D. Functional Genomics Bioinformatics Specialist W.M. Keck Center for Comparative and Functional Genomics Roy J. Carver Biotechnology Center University of Illinois, Urbana-Champaign 330 ERML 1201 W. Gregory Dr. Urbana, IL 61801 USA ph: 217-244-7355 fax: 217-265-5066 e-mail: drnevich at uiuc.edu
ADD COMMENTlink
modified 12.7 years ago by James W. MacDonald51k • written 12.7 years ago by Jenny Drnevich2.2k
Answer: question about limma2annaffy
0
12.7 years ago by
United States
James W. MacDonald51k wrote:
Hi Jenny, Jenny Drnevich wrote: > Hi Jim, > > I'm learning to use your limma2annaffy function, and I have a few > questions. In the affycoretools vignette (Feb 6, 2007), you call > limma2annaffy this way: > > > limma2annaffy(eset, fit2, design, annotation(eset), pfilt = 0.05) > > I think there's a typo in this, because you've left out the contrast > matrix. When I try the same on my data: Yeah, that's a typo. It never came up in a build/check cycle because it never really gets called in the Sweave() document. Thanks for pointing it out though. > > > limma2annaffy(gcrma.pres, fit2, design, annotation(gcrma.pres),pfilt=0.05) > Error in vector("list", dim(contrast)[2]) : > negative length vectors are not allowed > > When I try naming the annotation(gcrma.pres) argument, I get this: > > > limma2annaffy(gcrma.pres, fit2, design, > lib=annotation(gcrma.pres),pfilt=0.05) > Error in vector("list", dim(contrast)[2]) : > argument "contrast" is missing, with no default > > It does work when I add the contrast matrix: > > > limma2annaffy(gcrma.pres, fit2, design, > cont.matrix,annotation(gcrma.pres),pfilt=0.05) > > > So, besides pointing out an apparent error in the vignette, I had a > question as to what you would do if you didn't use a contrast matrix? Now, > most all the time that I analyze affy data I do use a contrast matrix, but > you don't always have to use one. I have some other questions/suggestions > to improve the ease of use of affycoretools, but they are too complicated > to put in this e-mail... You can _always_ use a contrasts matrix, even if you don't need one. The thing about limma2annaffy() is I use the colnames of the contrasts matrix to name the output files, so there has to be one. So there are two things you can do. Say you fit a factor effects model with a set of tumor/normal samples, three of each: > design <- model.matrix(~ factor(rep(1:2, each=3))) > design (Intercept) factor(rep(1:2, each = 3))2 1 1 0 2 1 0 3 1 0 4 1 1 5 1 1 6 1 1 attr(,"assign") [1] 0 1 attr(,"contrasts") attr(,"contrasts")\$factor(rep(1:2, each = 3)) [1] "contr.treatment" Now the second column of the design matrix specifies the tumor - normal contrast, so a contrasts matrix is superfluous. However, this contrast will work with limma2annaffy(): > contrast <- matrix(c(0,1), dimnames=list(c("normal", "tumor"), "tumor vs normal")) > contrast tumor vs normal normal 0 tumor 1 Or you can just specify a cell means model in the first place. Alternatively, you could just select the probesets that are significant and use probes2table(). But that would be more work if you want t-stats, p-values, etc. If you want to send me an email offline, I would be happy to hear your suggestions. I am always up for improving things. Best, Jim -- James W. MacDonald University of Michigan Affymetrix and cDNA Microarray Core 1500 E Medical Center Drive Ann Arbor MI 48109 734-647-5623 ********************************************************** Electronic Mail is not secure, may not be read every day, and should not be used for urgent or sensitive issues.
ADD COMMENTlink written 12.7 years ago by James W. MacDonald51k
Please log in to add an answer.

Content
Help
Access

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