using geneplotter with my own data
1
0
Entering edit mode
@matthew-hobbs-298
Last seen 9.6 years ago
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 geneplotter • 807 views
ADD COMMENT
0
Entering edit mode
Jeff Gentry ★ 3.9k
@jeff-gentry-12
Last seen 9.6 years ago
> 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 COMMENT

Login before adding your answer.

Traffic: 833 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