[BioC] tilingArray - plotAlongChrom problem

Krys Kelly kak28 at cam.ac.uk
Wed Sep 13 16:07:47 CEST 2006


Hi Wolfgang

I also have two answers, a big thanks and then a technical reply!

1) I really appreciate all the excellent hard work that the authors put into
bioconductor which is a most invaluable resource.  I also think it is
wonderful how the authors and others help those of us who are having
problems, so I hope you didn't think I sounded negative in my posting.

2) plotAlongChrom is complex and I am afraid that, although I spent some
time with the documentation, I did not realize that it required data for
both strands. Somehow I missed the significance of "objects of class
segmentation with names given by paste(chr, c("+", "-"), sep=".")" on page 8
of the Segmentation demo documentation. But yes, we only have data from one
strand. I have taken up your suggestion and I now have a graph. This means
that I can do as you say by looking at the grid package and using
plotAlongChrom as a template to tweak and produce the graph I am trying to
make.

My apologies for not including the sessionInfo(). Also, for the confusing
bit of code where I overwrote seg at x. I alternated between running the
script, pasting bits of the script to the R window and typing things
directly into R and, at some point, I obviously got very confused.

I will try and think if there is some way that I would have found the
documentation easier. One small thing that did confuse me was the old
version of the vignette when you go directly to the documentation here:
http://www.bioconductor.org/repository/devel/vignette/findsegments.pdf; and
that the name of the new vignette dated April 25, 2006 here:
http://bioconductor.org/packages/1.8/bioc/html/tilingArray.html is called
findsegments.pdf) and the demo is called segmentation.pdf. It would be
helpful if they were called segment.pdf and segmentationDemo.pdf.

Well, thanks for all your help and for seeing me later on this afternoon.

Best wishes

Dr Krystyna A Kelly
University of Cambridge
Department of Pathology
Molteno Building, Tennis Court Road
Cambridge CB2 1QP
Tel:    01223 333331
Email: kak28 at cam.ac.uk
 

-----Original Message-----
From: Wolfgang Huber [mailto:huber at ebi.ac.uk] 
Sent: 12 September 2006 18:18
To: Krys Kelly
Cc: bioconductor at stat.math.ethz.ch
Subject: Re: [BioC] tilingArray - plotAlongChrom problem

Dear Krys,

the plotAlongChrom function wants to plot data from both strands of a
strand-specific tiling array, such as shown here:
http://www.ebi.ac.uk/huber-srv/cgi-bin/viewYeastTilingArray.pl?gene=10:05550
00

I have two answers, a disclaimer and then a technical reply:

1.) I understand your data is from a non-strand specific array (?). If
that is the case and you want to use the function, you'll need to tweak
it. We have tried to document the function properly, but it is doing a
lot of different things, pulls together data from different places, and
is not easy to use. Some effort in making it work on your own data
should be expected - hopefully still less than writing a similar
function from scratch. But I would recommend looking at the grid package
and consider 'plotAlongChrom' as a template from which you can work on,
rather than a ready-made product that will always work out of the box
for you.

Any concrete suggestions on where or how to improve the documentation
are welcome - remember that this is an 'open-source, open-development
project'.

2.) You didn't provide the output of "sessionInfo()". Please make sure
to use the latest version, e.g. by saying:

update.packages(repos='http://bioconductor.org/packages/1.9/bioc',
ask=FALSE)


I don't understand your code example, since you assign
  seg at x  <-array$Y/2
but then overwrite it
  seg at x <- as.vector(1:nrow(seg at y))

Possibly, to try the function, just adding
  assign("1.-", seg, segObj)
should work, then you'll see the same data twice in a layout as in the
example above.

Hope this helps, let me know if you have further questions (possibly we
can also discuss some in a visit of you at the EBI),

 Wolfgang



> I have data from a 650kb section of a chromosome on a tiling array. 
> 
> When I run a segmentation and try to plot the results along the chromosome
I
> get the following error:
> 
>  > plotAlongChrom(segObj, chr=1, coord=c(1, 100000), gff=gff)
> Error in get(x, envir, mode, inherits) : variable "1.-.dat" was not found
> 
> Here is my code:
> 
> INFILE  <- "RH_i_vs_cell.txt"
> GFFFILE <- "t_gondii_ME49_Ib_650kb.gff"
> 
> array <- read.table(INFILE, header=TRUE)
> gff   <- read.table(GFFFILE, header=TRUE)
> 
> # maxseg corresponds to 50kb; longest gene in 650kb = 24,338bp (TASK data)
> maxseg <- 1000 
> maxk   <- 1000
> seg    <- segment(array$value, maxk=maxk, maxseg=maxseg)
> seg at x  <-array$Y/2 # add midpoints of probes to the segmentation object
> 
> # Do plotAlongChrom
> seg at x <- as.vector(1:nrow(seg at y))
> seg at flag <- rep(as.integer(0), times=12995)
> seg at nrSegments <- as.integer(111)
> 
> segObj <- new.env(parent=baseenv())
> assign("1.+", seg, segObj)
> 
> grid.newpage()
> plotAlongChrom(segObj, chr=1, coord=c(1, 100000), gff=gff)
> 
> I am finding the documentation in the R help and the "Segmentation demo"
> hard to follow and I would be grateful for any help about where I am going
> wrong.
> 
> Thanks
> 
> Krys
> 
> 
> Dr Krystyna A Kelly
> University of Cambridge
> Department of Pathology
> Molteno Building, Tennis Court Road
> Cambridge CB2 1QP
> Tel:    01223 333331
> Email: kak28 at cam.ac.uk
> 
> _______________________________________________
> 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


-- 
------------------------------------------------------------------
Wolfgang Huber  EBI/EMBL  Cambridge UK  http://www.ebi.ac.uk/huber



More information about the Bioconductor mailing list