Hi,

if you look carefully at the following code:

for(chiptype in names(csRawList)) {
  cs <- csRawList[[chipType]]
  [...]
  csAccList[[chipType]]<- csAcc
}

you'll see that the for loop is using iterator variable 'chiptype'
whereas you get and assign the elements in the lists using 'chipType'.
 They are not the same variables.   The value of 'chipType' remains
the same through-out the for loop and therefore is the same name used
twice to assign the csAccList.  It's value is the value set in the
last iteration of the previous for loop (when loading the data sets)
and is 'Mapping50K_Xba240'.

Hope this solves your problem

Henrik

On Thu, Oct 30, 2008 at 11:40 AM, Henrik Bengtsson <[EMAIL PROTECTED]> wrote:
> On Thu, Oct 30, 2008 at 10:59 AM, biobee <[EMAIL PROTECTED]> wrote:
>>
>> Hi Henrik,
>>
>> From the csAccList itself the 2nd chiptype doesnot come along.
>
> Then it is pretty clear that something goes wrong when you do the ACC step;
>
> csAccList <- list();
> for(chiptype in names (csRawList)){
>  cs <- csRawList[[chipType]]
>  acc <- AllelicCrosstalkCalibration(cs)
>  print(acc)
>  csAcc<- process(acc, verbose=log)
>  csAccList[[chipType]]<- csAcc
> }
>
> You cannot ignore errors, if they occur.  If there are errors that are
> reported in this step that you don't understand, let us know, but
> otherwise I leave it to you (or one of your collegues) to troubleshoot
> this.
>
> Also, I am starting to assume that you cut'n'paste code into the R
> prompt.  That is useful for very small analysis, but for longer you
> should certainly write your script in an *.R file and run it using
> source().  If you do that, any error will interrupt your script from
> continuing.
>
> It is rather important that you understand how basic concepts such as
> lists in work in R in order to complete and trust your analysis.
> Without that understanding you will not be able to troubleshoot what
> is going, and you will get stuck in the most basic steps.  I suggest
> that you pick up one of the introductory books/manuals/courses on R.
>
> /Henrik
>
>>
>>
>>
>> On Oct 30, 1:12 pm, "Henrik Bengtsson" <[EMAIL PROTECTED]> wrote:
>>> Hi,
>>>
>>>
>>>
>>>
>>>
>>> On Wed, Oct 29, 2008 at 9:54 PM, biobee <[EMAIL PROTECTED]> wrote:
>>>
>>> > Hi Henrik,
>>>
>>> > I ran the script as explained in the 'Paired total copy number
>>> > analysis' . The script runs fine all the way,however, I wasnot able to
>>> > get raw CN estimates for both chiptypes. When I print cesFlnList, I
>>> > get result for only one of the chiptype.
>>>
>>> >> cesFlnList
>>> > $Mapping50K_Xba240
>>> > CnChipEffectSet:
>>> > Name: katia-TumorNormal1
>>> > Tags: ACC,-XY,RMA,+300,A+B,FLN,-XY
>>> > Path: plmData/katia-TumorNormal1,ACC,-XY,RMA,+300,A+B,FLN,-XY/
>>> > Mapping50K_Xba240
>>> > Platform: Affymetrix
>>> > Chip type: Mapping50K_Xba240,monocell
>>> > Number of arrays: 16
>>> > Names: TLL_ALL_10SA_REM, TLL_ALL_10SA, ..., TLL_ALL_9AM
>>> > Time period: 2008-10-29 23:36:31 -- 2008-10-29 23:36:33
>>>
>>> > Am I doing something wrong now?
>>>
>>> Locate at what stage that 2nd chip type is not coming along, i.e. look
>>> at the output of each possible print(csRawList), print(csAccList), ...
>>>
>>> /Henrik
>>>
>>>
>>>
>>>
>>>
>>> > Here is my script:
>>>
>>> > library(aroma.affymetrix)
>>>
>>> > log <- Arguments$getVerbose(-8)
>>> > timestampOn(verbose)
>>>
>>> > dataSetName <- "katia-TumorNormal1"
>>> > chipTypes <- c("Mapping50K_Hind240", "Mapping50K_Xba240")
>>>
>>> > pairs <- matrix(c(
>>> > "TLL_ALL_10SA_REM","TLL_ALL_10SA",
>>> > "TLL_ALL_13BP_REM","TLL_ALL_13BP",
>>> > "TLL_ALL_1BD_REM","TLL_ALL_1BD",
>>> > "TLL_ALL_2NP_REM","TLL_ALL_2NP",
>>> > "TLL_ALL_3MM_REM","TLL_ALL_3MM",
>>> > "TLL_ALL_5NL_REM","TLL_ALL_5NL",
>>> > "TLL_ALL_6TA_REM","TLL_ALL_6TA",
>>> > "TLL_ALL_9AM_REM","TLL_ALL_9AM"
>>> > ),ncol=2,byrow=TRUE)
>>> > colnames(pairs) <- c("normal", "tumor")
>>>
>>> > #processing samples:
>>>
>>> > csRawList <- list()
>>> > for(chipType in chipTypes){
>>> > cs <- AffymetrixCelSet
>>> > $fromName(dataSetName,checkChipType=FALSE,chipType=chipType)
>>> > stopifnot(all(getNames(cs) %in% pairs))
>>> > csRawList[[chipType]]<- cs
>>> > }
>>> > print(csRawList)
>>>
>>> > #allellic crosstalk
>>> > csAccList <- list();
>>> > for(chiptype in names (csRawList)){
>>> > cs <- csRawList[[chipType]]
>>> > acc <- AllelicCrosstalkCalibration(cs)
>>> > print(acc)
>>> > csAcc<- process(acc, verbose=log)
>>> > csAccList[[chipType]]<- csAcc
>>> > }
>>>
>>> > #Summarization
>>>
>>> > cesList<- list()
>>> > for(chipType in names (csAccList)){
>>> > cs <- csAccList[[chipType]]
>>> > plm <- RmaCnPlm(cs, mergeStrands=TRUE, combineAlleles=TRUE,shift=+300)
>>> > print(plm)
>>> > fit(plm, verbose=log)
>>> > ces <- getChipEffectSet(plm)
>>> > cesList[[chipType]]<- ces
>>> > }
>>>
>>> > #PCR fragment length normalization
>>> > cesFlnList<- list()
>>> > for(chipType in names(cesList)){
>>> > ces <- cesList[[chipType]]
>>> > fln <- FragmentLengthNormalization(ces)
>>> > print(fln)
>>> > cesFln<- process(fln,verbose=log)
>>> > cesFlnList[[chiptype]]<- cesFln
>>> > }
>>>
>>> > Also, I tried the other method of running the steps given above for
>>> > each chip seperately. It runs fine for both chiptypes
>>> > Mapping50K_Hind240, Mapping50K_Xba240 , and seperate directories are
>>> > created for each chiptype under plmData and probeData , except that
>>> > the final object cesFlnList shows results for only one chiptype.
>>> > Is this right?
>>>
>>> > Please help! Thanks
>>>
>>> > On Oct 27, 5:33 pm, "Henrik Bengtsson" <[EMAIL PROTECTED]> wrote:
>>> >> Hi,
>>>
>>> >> the mistake you are doing is that you tell R/aroma.affymetrix to
>>> >> process both chip types, but you only have/load data for one of them.
>>> >> You do:
>>>
>>> >> chipTypes <- c("Mapping50K_Hind240", "Mapping50K_Xba240")
>>>
>>> >> and this is what is used in the for loops.  If you only want to
>>> >> process one of the chip types, the simplest modification you can do to
>>> >> solve the problem is to replace the above with:
>>>
>>> >> chipTypes <- "Mapping50K_Hind240"
>>>
>>> >> I recommend that you read up a bit more on R - it'll help
>>> >> troubleshoot/detect these problems.  In the meanwhile, I've updated
>>> >> the Vignette 'Paired total copy number analysis' to be robust against
>>> >> this kind of mistakes.
>>>
>>> >> Cheers
>>>
>>> >> Henrik
>>>
>>> >> On Sat, Oct 25, 2008 at 2:05 PM,biobee<[EMAIL PROTECTED]> wrote:
>>>
>>> >> > Hi Henrik,
>>>
>>> >> > I checked and my csAccList[[chipType]] returns NULL. However chipTypes
>>> >> > is not empty. It reurns the following:
>>> >> >> chipTypes
>>> >> > [1] "Mapping50K_Hind240" "Mapping50K_Xba240"
>>>
>>> >> > Also my csAccList gives the following output:
>>> >> >> csAccList
>>> >> > $Mapping50K_Hind240
>>> >> > AffymetrixCelSet:
>>> >> > Name: katia-TumorNormal1
>>> >> > Tags: ACC,-XY
>>> >> > Path: probeData/katia-TumorNormal1,ACC,-XY/Mapping50K_Hind240
>>> >> > Platform: Affymetrix
>>> >> > Chip type: Mapping50K_Hind240
>>> >> > Number of arrays: 16
>>> >> > Names: TLL_ALL_10SA, TLL_ALL_10SA_REM, ..., TLL_ALL_9AM_REM
>>> >> > Time period: 2007-04-27 12:59:07 -- 2007-11-13 14:42:59
>>> >> > Total file size: 391.64MB
>>> >> > RAM: 0.02MB
>>>
>>> >> >>csAcc
>>> >> > AffymetrixCelSet:
>>> >> > Name: katia-TumorNormal1
>>> >> > Tags: ACC,-XY
>>> >> > Path: probeData/katia-TumorNormal1,ACC,-XY/Mapping50K_Hind240
>>> >> > Platform: Affymetrix
>>> >> > Chip type: Mapping50K_Hind240
>>> >> > Number of arrays: 16
>>> >> > Names: TLL_ALL_10SA, TLL_ALL_10SA_REM, ..., TLL_ALL_9AM_REM
>>> >> > Time period: 2007-04-27 12:59:07 -- 2007-11-13 14:42:59
>>> >> > Total file size: 391.64MB
>>> >> > RAM: 0.02MB
>>>
>>> >> > I have traced all the steps that I run from the beginning , but I am
>>> >> > not sure where I am going wrong. I have copied my script below for
>>> >> > reference. This script runs for one chipType for eg.(50K_Hind240) and
>>> >> > I plan to run these steps again for the second chipType: 50K_Xba240.
>>>
>>> >> > library(aroma.affymetrix)
>>>
>>> >> > log <- Arguments$getVerbose(-8)
>>> >> > timestampOn(verbose)
>>>
>>> >> > dataSetName <- "katia-TumorNormal1"
>>> >> > chipTypes <- c("Mapping50K_Hind240", "Mapping50K_Xba240")
>>>
>>> >> > pairs <- matrix(c(
>>> >> > "TLL_ALL_10SA_REM","TLL_ALL_10SA",
>>> >> > "TLL_ALL_13BP_REM","TLL_ALL_13BP",
>>> >> > "TLL_ALL_1BD_REM","TLL_ALL_1BD",
>>> >> > "TLL_ALL_2NP_REM","TLL_ALL_2NP",
>>> >> > "TLL_ALL_3MM_REM","TLL_ALL_3MM",
>>> >> > "TLL_ALL_5NL_REM","TLL_ALL_5NL",
>>> >> > "TLL_ALL_6TA_REM","TLL_ALL_6TA",
>>> >> > "TLL_ALL_9AM_REM","TLL_ALL_9AM"
>>> >> > ),ncol=2,byrow=TRUE)
>>> >> > colnames(pairs) <- c("normal", "tumor")
>>>
>>> >> > chipType <- chipTypes[1]
>>>
>>> >> > #processing samples:
>>>
>>> >> > csRawList <- list()
>>> >> > for(chipType in chipTypes){
>>> >> > cs <- AffymetrixCelSet
>>> >> > $fromName(dataSetName,checkChipType=FALSE,chipType=chipType)
>>> >> > stopifnot(all(getNames(cs) %in% pairs))
>>> >> > csRawList[[chipType]]<- cs
>>> >> > }
>>> >> > print(csRawList)
>>>
>>> >> > #Allellic calibration
>>> >> > csAccList <- list();
>>> >> > for(chiptype in chipTypes){
>>> >> > cs <- csRawList[[chipType]]
>>> >> > acc <- AllelicCrosstalkCalibration(cs)
>>> >> > print(acc)
>>> >> > csAcc<- process(acc, verbose=log)
>>> >> > csAccList[[chipType]]<- csAcc
>>> >> > }
>>>
>>> >> > #Summarization
>>>
>>> >> > cesList<- list()
>>> >> > for(chipType in chipTypes){
>>> >> > cs <- csAccList[[chipType]]
>>> >> > plm <- RmaCnPlm(cs, mergeStrands=TRUE, combineAlleles=TRUE, E,shift=
>>> >> > +300)
>>> >> > plm
>>> >> > fit(plm, verbose=log)
>>> >> > ces <- getChipEffectSet(plm)
>>> >> > cesList[[chipType]]<- ces
>>> >> > }
>>>
>>> >> > #PCR fragment length normalization
>>> >> > cesFlnList<- list()
>>> >> > for(chipType in names(cesList)){
>>> >> > ces <- cesList[[chipType]]
>>> >> > fln <- FragmentLengthNormalization(ces)
>>> >> > print(fln)
>>> >> > cesFln<- process(fln,verbose=log)
>>> >> > cesFlnList[[chiptype]]<- cesFln
>>> >> > }
>>>
>>> >> > thanks
>>> >> > Manisha
>>>
>>> >> > On Oct 22, 1:13 pm, "Henrik Bengtsson" <[EMAIL PROTECTED]> wrote:
>>> >> >> [I took the freedom to bring this thread back to the mailing list, cf
>>> >> >> FAQ. 2008-03-26]
>>>
>>> >> >> Hi.
>>>
>>> >> >> On Wed, Oct 22, 2008 at 7:17 AM,biobeewrote:
>>> >> >> > Hi Henrik,
>>>
>>> >> >> > Please see the details you required for troubleshooting this 
>>> >> >> > problem:
>>>
>>> >> >> > verbose output of the error:
>>>
>>> >> >> >> #Summarization
>>>
>>> >> >> >> cesList<- list()
>>> >> >> >> for(chipType in chipTypes){
>>> >> >> > + cs <- csAccList[[chipType]]
>>> >> >> > + plm <- RmaCnPlm(cs, combineAlleles=TRUE, mergeStrands=TRUE,shift=
>>> >> >> > +300)
>>> >> >> > + plm
>>> >> >> > + fit(plm, verbose=verbose)
>>> >> >> > + ces <- getChipEffectSet(plm)
>>> >> >> > + cesList[[getInputChipType]]<- ces
>>> >> >> > + }
>>> >> >> > Error in UseMethod("getCdf") : no applicable method for "getCdf"
>>> >> >> > Calls: fit -> fit.ProbeLevelModel -> getCdf
>>> >> >> > Execution halted
>>>
>>> >> >> > traceback() report:
>>> >> >> >> traceback()
>>> >> >> > 3: getCdf(cs)
>>> >> >> > 2: fit.ProbeLevelModel(plm, verbose = verbose)
>>> >> >> > 1: fit(plm, verbose = verbose)
>>>
>>> >> >> So I strongly suspect that the data set 'cs' you pass to RmaCnPlm() is
>>> >> >> NULL.  For 'cs' to become NULL, the expression csAccList[[chipType]]
>>> >> >> must return NULL.  Check you 'csAccList' and see if it is an empty
>>> >> >> list.  Other things that come into play is the value of 'chipTypes'.
>>> >> >> You probably made a mistake earlier than what you "script" shows.
>>> >> >> This is why I keep asking everyone to post the complete script along
>>> >> >> with problem reports, because it is much easier to troubleshoot when
>>> >> >> you have the full picture.
>>>
>>> >> >> Cheers
>>>
>>> >> >> Henrik
>>>
>>> >> >> > sessionInfo()
>>> >> >> >> sessionInfo()
>>> >> >> > R version 2.7.2 (2008-08-25)
>>> >> >> > x86_64-unknown-linux-gnu
>>>
>>> >> >> > locale:
>>> >> >> > LC_CTYPE=en_US.iso885915;LC_NUMERIC=C;LC_TIME=en_US.iso885915;LC_COLLATE=en­­­_US.iso885915;LC_MONETARY=C;LC_MESSAGES=en_US.iso885915;LC_PAPER=en_US.is­o­8­85915;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=en_US.iso885­91­5;­LC_IDENTIFICATION=C
>>>
>>> >> >> > attached base packages:
>>> >> >> > [1] stats     graphics  grDevices utils     datasets  methods
>>> >> >> > base
>>>
>>> >> >> > other attached packages:
>>> >> >> >  [1] aroma.affymetrix_0.9.4 aroma.apd_0.1.3
>>> >> >> > R.huge_0.1.6
>>> >> >> >  [4] affxparser_1.12.2      aroma.core_0.9.4
>>> >> >> > sfit_0.1.5
>>> >> >> >  [7] aroma.light_1.8.1      digest_0.3.1
>>> >> >> > matrixStats_0.1.3
>>> >> >> > [10] R.rsp_0.3.4            R.cache_0.1.7
>>> >> >> > R.utils_1.0.4
>>> >> >> > [13] R.oo_1.4.6             R.methodsS3_1.0.3
>>>
>>> >> >> > Hope this helps to troubleshoot the problem.
>>>
>>> ...
>>>
>>> read more »- Hide quoted text -
>>>
>>> - Show quoted text -- Hide quoted text -
>>>
>>> - Show quoted text -
>> >>
>>
>

--~--~---------~--~----~------------~-------~--~----~
When reporting problems on aroma.affymetrix, make sure 1) to run the latest 
version of the package, 2) to report the output of sessionInfo() and 
traceback(), and 3) to post a complete code example.


You received this message because you are subscribed to the Google Groups 
"aroma.affymetrix" group.
To post to this group, send email to aroma-affymetrix@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/aroma-affymetrix?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to