Hi Henrik,

Thank you very much for your reply. What you have suggested works,
with the only problem being that there are now repeated sample names
such that the links generated by ChromosomeExplorer don't work
properly. I think this is because that I have analyzed the same sample
twice, once w.r.t the matched parental DNA (paired analysis), the
other time w.r.t. the Hapmap average (unpaired analysis). So my
question is whether there is a way I can change the names of datasets
in a AromaUnitTotalCnBinarySet. My current codes look like the
following:

library("aroma.affymetrix");
# Preprocessing using CRMAv2
dataSet = "Resistant_model";
chipType = "GenomeWideSNP_6";
cdf <- AffymetrixCdfFile$byChipType(chipType, tags="Full");
dsC = doCRMAv2(dataSet, cdf=cdf);
# paired analysis
idxP <- match("Parental", getNames(dsC));
dsP <- extract(dsC, idxP);
idxR <- match("Resistant", getNames(dsC));
dsR <- extract(dsC, idxR);
# unpaired analysis
ds <- AromaUnitTotalCnBinarySet$byName("SNP6_HAPMAP_FEMALE",
tags="ACC,ra,-XY,BPN,-XY,AVG,A+B,FLN,-XY", chipType=chipType);
# get Hapmap average file
dfRef <- getAverageFile(ds, verbose=verbose);
# combine paired and unpaired analysis
dfRefList <- rep(list(dfRef), times=2);
dsRef <- AromaUnitTotalCnBinarySet(dfRefList);
append(dsR,dsC);
append(dsP,dsRef);
cns <- CbsModel(dsR,dsP);
ce <- ChromosomeExplorer(cns);
process(ce, verbose=verbose);

The problem arose when I appended "dsC" to "dsR": since "dsC" already
contains "dsR", the resulting variable will contain three datasets:
(dsR, dsR, dsP). The corresponding reference set contains (dsP,
Hapmap, Hapmap). These three comparisons are what I intended to do,
but the two "dsR"s will have the same name which has caused the
ChromosomeExplorer display problem. Any help you can provided here is
much appreciated!

Best,
Kai


On May 25, 6:20 pm, Henrik Bengtsson <henrik.bengts...@aroma-
project.org> wrote:
> Hi,
>
> sorry for the delay - your question required some extra explanation.
>
>
>
> On Mon, May 23, 2011 at 2:37 PM, Kai <wangz...@gmail.com> wrote:
> > Hi, Henrik,
>
> > I have some Affymetrix SNP6 data on a resistant cell line model after
> > compound treatment. I want to do a paired analysis comparing the
> > resistant cell line data to the parental. To make sure that the
> > changes I see in the paired analysis is indeed acquired aberrations,
> > not simply a magnitude change between the resistant and parental, I
> > also want to analyze the resistant and parental data separately
> > against a common reference (e.g. Hapmap). So my question is how I can
> > combine both a paired and an unpaired analysis in aroma affymetrix/cn.
>
> > Some codes I have for the paired analysis are as follows:
>
> > library("aroma.affymetrix");
> > verbose <- Arguments$getVerbose(-8, timestamp=TRUE);
>
> > options(digits=4);
> > dataSet = "Resistant_model";
> > chipType = "GenomeWideSNP_6";
> > cdf <- AffymetrixCdfFile$byChipType(chipType, tags="Full");
>
> > dsC = doCRMAv2(dataSet, cdf=cdf, verbose=verbose);
> > print(dsC);
>
> > # paired analysis
> > idxP <- match("Parental", getNames(dsC));
> > dsP <- extract(dsC, idxP);
>
> > idxR <- match("Resistant", getNames(dsC));
> > dsR <- extract(dsC, idxR);
>
> > cns2 <- CbsModel(dsR,dsP);
> > print(cns2);
>
> So, first thing to note is that you are here by specifying (dsR, dsP)
> "manually" telling CbsModel how to pair the samples, i.e. first sample
> in dsR will be coupled with the first sample in dsP, the second with
> each other and so on.
>
>
>
> > ce2 <- ChromosomeExplorer(cns2);
>
> Here, ChromosomeExplorer is just doing whatever CbsModel is setup to
> do, so it has nothing to do with ChromosomeExplorer, i.e. the study
> design is specified when you setup the CbsModel.
>
> > print(ce2);
>
> > process(ce2, verbose=verbose);
>
> > I have also loaded a set of preprocessed Hapmap samples as follows:
>
> > ds <- AromaUnitTotalCnBinarySet$byName("SNP6_HAPMAP_FEMALE",
> > tags="ACC,ra,-XY,BPN,-XY,AVG,A+B,FLN,-XY",
> > chipType="GenomeWideSNP_6");
> > print(ds);
>
> > dsRef <- getAverageFile(ds, verbose=verbose);
> > print(dsRef);
>
> You should really name this 'dfRef" to indicate that it is a data
> *file* (and not a data set).
>
> Ok, so here you have (i) a data set 'ds' and (ii) a data *file*
> 'dfRef'.  What is useful to understand is that when you do:
>
> seg <- CbsModel(ds);
>
> you are implicitly doing:
>
> seg <- CbsModel(ds, dfRef);
>
> which in turn corresponds to specifying:
>
> # Create a data set of replicated reference samples
> dfRefList <- rep(list(dfRef), times=length(ds));
> dsRef <- AromaUnitTotalCnBinarySet(dfRefList);
>
> # Request a "paired" segmentation
> seg <- CbsModel(ds, dsRef);
>
> Note, you now have two CbsModel:s where both do "paired" segmentation.
>  What is left to do is make these two into one CbsModel:
>
> # Append the latter data sets to the first ones
> append(dsR, ds);
> append(dsP, dsRef);
>
> # Vola
> seg <- CbsModel(dsR, dsP);
>
> Hope this helps
>
> /Henrik
>
>
>
> > I was wondering whether there is a way that will allow me to construct
> > a AromaUnitTotalCnBinarySet consisting of: 1) Resistant, 2) Resistant
> > and 3) Parental; then compare it to another reference set consisting
> > of: 1) Parental, 2) Hapmap and 3) Hapmap.
>
> > I understand that I can do the paired and unpaired analysis
> > separately, but I want to generate one ChromsomeExplorer report
> > consisting both of them so I can easily compare across them visually.
> > Any help you can provide is much appreciated.
>
> > Best,
> > Kai
>
> > --
> > 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 with websitehttp://www.aroma-project.org/.
> > To post to this group, send email to aroma-affymetrix@googlegroups.com
> > To unsubscribe and other options, go tohttp://www.aroma-project.org/forum/

-- 
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 with website http://www.aroma-project.org/.
To post to this group, send email to aroma-affymetrix@googlegroups.com
To unsubscribe and other options, go to http://www.aroma-project.org/forum/

Reply via email to