Question: using geneplotter with my own data
0
gravatar for Matthew Hobbs
16.4 years ago by
Matthew Hobbs80 wrote:
Hi, I am relatively new to R and BioConductor and despite looking at the help documents and vignettes am struggling with lots of things. At the moment I am trying to do something useful with the cPlot function from geneplotter. This runs OK when I follow the examples but these use data that I'm not interested in. To use my own data for chromosome names and lengths and for gene names, positions and strands I gather I need to instantiate a chromLocation object. When I try this (see below) I end up with a plot that consists only of a Y axis. Please tell me where I'm going wrong! Thanks, Matthew library(geneplotter) # make a named vector of chromosome lengths: chromLengths <- c(10000,5000) names(chromLengths)<-c('X','Y') # is strand indicated by sign of the position integer? I think so... # make a named vector of gene positions on chromosome X: Xvector<-c(100,200,-500,1000) names(Xvector)<-c('gene1', 'gene2', 'gene3', 'gene4') # make a named vector of gene positions on chromosome Y: Yvector<-c(11000,-2000) names(Yvector)<-c('gene5', 'gene6') # put these in a named list: chromList <-list(Xvector,Yvector) names(chromList) <- c('X','Y') # make a chromLocation object: mychromlocation <- buildChromClass('H. statisticiensis', 'made it all up', chromList, chromLengths) # plot it: cPlot(mychromlocation) # yuk -- ---------------------------------------------------------------------- Matthew Hobbs Garvan Institute of Medical Research 384 Victoria St Ph : (02) 9295 8327 Darlinghurst http://www.garvan.org.au email: m.hobbs@garvan.org.au
geneplotter • 489 views
ADD COMMENTlink modified 16.4 years ago by Jeff Gentry3.9k • written 16.4 years ago by Matthew Hobbs80
Answer: using geneplotter with my own data
0
gravatar for Jeff Gentry
16.4 years ago by
Jeff Gentry3.9k
Jeff Gentry3.9k wrote:
> a plot that consists only of a Y axis. Please tell me where I'm going wrong! > mychromlocation <- buildChromClass('H. statisticiensis', 'made it all up', > chromList, chromLengths) It would appear that you're using an out of date version of geneplotter. Have you updated to release 1.2 code? cPlot and friends still take an object of chromLocation, and there is a function buildChromLocation which takes as an argument a data package. If you have your own data, you'll need to construct a data package in the same format as our data packages. -J
ADD COMMENTlink written 16.4 years ago by Jeff Gentry3.9k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 415 users visited in the last hour