[BioC] gcrma background correction-saving output

Sucheta Tripathy sutripa at vbi.vt.edu
Thu Dec 7 23:03:59 CET 2006


Dear List,

Thanks to all who responded to my earlier question. While I can get going
with reading multiple CEL files at a time for background correction, I
would like to save the outputs of each CEL file as a separate text file.
While I tried something like this to have the outputs as separate columns
in one file:

library(affy)
library(gcrma)
affinfo=compute.affinities("soybean")
myDat <-ReadAffy()
sessionInfo()
tmp1=bg.adjust.gcrma(myDat,optical.correct=T,affinity.info=affinfo)
write.table(tmp1, file="out.txt", row.names=FALSE, col.names=FALSE, sep="\t")

I get the following error

Error:
-------
Error in as.data.frame.default(x[[i]], optional = TRUE) :
    cannot coerce class "AffyBatch" into a data.frame

I hope somebody can help me with this.

many thanks

Sucheta

On Wed, December 6, 2006 11:57 pm, Kasper Daniel Hansen wrote:
> Most likely this is a bug coming from the fact that a matrix with 1
> row (or column) usually gets silently changed to a vector. I am just
> guessing based on the fact that it only seems to happen with 1 chip. You
> are only doing background adjusting which should work ok with only one
> chip - a full GCRMA with multichip summarization would not make a whole
> lot of sense with 1 chip.
>
> Kasper
>
>
> On Dec 5, 2006, at 10:05 PM, Sucheta Tripathy wrote:
>
>
>> Hi Jean, List,
>>
>>
>> Finally I managed to make the script
>>
>>
>> library(affy) library(gcrma) affinfo=compute.affinities("soybean") myDat
>> <-ReadAffy()
>> sessionInfo()
>> tmp1=bg.adjust.gcrma(myDat,optical.correct=T,affinity.info=affinfo)
>>
>> run in my machine. The only thing I have noticed was it works with 2
>> chips read simultaneously by ReadAffy(). For instance if I have only one
>> CEL
>> file instead of 2 CEL files in the working directory then I end up having
>>  the same error that I used to get before. Is there a reason for that?
>>
>> Error Message:
>> --------------
>>
>>
>> Adjusting for optical effect.Done.
>> Computing affinities.Done.
>> Error in model.frame(formula, rownames, variables, varnames, extras,
>> extranames,  : variable lengths differ (found for 'x') Execution halted
>> -----
>>
>>
>> my session info: ----------------
>> R version 2.4.0 (2006-10-03)
>> i686-pc-linux-gnu
>>
>> locale:
>> LC_CTYPE=en_US;LC_NUMERIC=C;LC_TIME=en_US;LC_COLLATE=C;LC_MONETARY=en_
>> US;LC_MESS
>> AGES=en_US;LC_PAPER=en_US;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEA
>> SUREMENT=e
>> n_US;LC_IDENTIFICATION=C
>>
>> attached base packages: [1] "splines"   "tools"     "methods"   "stats"
>> "graphics"
>> "grDevices"
>> [7] "utils"     "datasets"  "base"
>>
>>
>> other attached packages: soybeanprobe   soybeancdf        gcrma
>> matchprobes affy       affyio "1.14.0"     "1.12.0"      "2.7.0"
>> "1.6.0"
>> "1.12.1"      "1.0.0"
>> Biobase
>> "1.12.2"
>>
>>
>>
>>
>>
>> Thanks
>>
>>
>> Sucheta
>>
>>
>>
>> --
>> Sucheta Tripathy, Ph.D.
>> Virginia Bioinformatics Institute Phase-I
>> Washington street.
>> Virginia Tech.
>> Blacksburg,VA 24061-0447
>> phone:(540)231-8138
>> Fax:  (540) 231-2606
>>
>>
>> web page: http://staff.vbi.vt.edu/sutripa blog    :
>> http://genomics-array.blogspot.com/
>> quick ref: http://faculty.ucr.edu/~tgirke/Documents/R_BioCond/
>> R_BioCondManual.html
>>
>>
>> _______________________________________________
>> Bioconductor mailing list
>> Bioconductor at stat.math.ethz.ch
>> https://stat.ethz.ch/mailman/listinfo/bioconductor
>> Search the archives: http://news.gmane.org/
>> gmane.science.biology.informatics.conductor
>


-- 
Sucheta Tripathy, Ph.D.
Virginia Bioinformatics Institute Phase-I
Washington street.
Virginia Tech.
Blacksburg,VA 24061-0447
phone:(540)231-8138
Fax:  (540) 231-2606

web page: http://staff.vbi.vt.edu/sutripa
blog    : http://genomics-array.blogspot.com/
quick ref:
http://faculty.ucr.edu/~tgirke/Documents/R_BioCond/R_BioCondManual.html



More information about the Bioconductor mailing list