tilingArray - plotAlongChrom problem
2
0
Entering edit mode
Krys Kelly ▴ 270
@krys-kelly-1768
Last seen 9.2 years ago
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
• 1.0k views
ADD COMMENT
0
Entering edit mode
@wolfgang-huber-3550
Last seen 19 days ago
EMBL European Molecular Biology Laborat…
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:0555000 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
ADD COMMENT
0
Entering edit mode
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@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
ADD REPLY
0
Entering edit mode
Seth Falcon ★ 7.4k
@seth-falcon-992
Last seen 9.7 years ago
"Krys Kelly" <kak28 at="" cam.ac.uk=""> writes: > 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.p df; My apologies for this. The vignette listing you found was very out of date. The best way to view a package's vignette is to install the package, load Biobase, load the package, and run openVignette(). The next best way is to use the link provided on each package's summary page. To get to a summary page, click on any package name from the Software view: http://bioconductor.fhcrc.org/packages/release/Software.html I have updated the vignette listing page; old links removed, added instructions for viewing vignettes instead and a link to the BiocViews page. http://bioconductor.fhcrc.org/docs/vignettes.html Best Wishes, + seth
ADD COMMENT
0
Entering edit mode
Dear Seth, > "Krys Kelly" <kak28 at="" cam.ac.uk=""> writes: >> 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; > > My apologies for this. The vignette listing you found was very out of > date. > > The best way to view a package's vignette is to install the package, > load Biobase, load the package, and run openVignette(). Hmm, there is a problem here: this package contains two vignettes that are compute- and memory intensive, hence according to our package guidelines they are not automatically built, but rather I provide them as precomputed .pdf files in the inst/doc directory. The .Rnw files are in inst/scripts, so that interested users can run them: assessNorm.Rnw segmentation.Rnw Unfortunately, these vignettes do not appear when you say library("tilingArray")" openVignette() and I did not find Section "1.4 Writing package vignettes" in the "Writing R Extensions" guide helpful in that respect. However (thanks Herve!), they are shown in http://www.bioconductor.org/packages/1.9/bioc/html/tilingArray.html Best wishes Wolfgang > The next best way is to use the link provided on each package's > summary page. To get to a summary page, click on any package name > from the Software view: > > http://bioconductor.fhcrc.org/packages/release/Software.html > > I have updated the vignette listing page; old links removed, added > instructions for viewing vignettes instead and a link to the BiocViews > page. > > http://bioconductor.fhcrc.org/docs/vignettes.html > > > Best Wishes, > > + seth > > _______________________________________________ > 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
ADD REPLY
0
Entering edit mode
Wolfgang Huber wrote: > However (thanks Herve!), they are shown in > http://www.bioconductor.org/packages/1.9/bioc/html/tilingArray.html > Those "package detail" pages are generated by the biocViews scripts from Seth... Hence thanks Seth! H.
ADD REPLY

Login before adding your answer.

Traffic: 463 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6