Master of Science
0
0
Entering edit mode
@adeoluogunleye-21310
Last seen 4.7 years ago

Hi guys, I am a new user of Rstudio, I got error with CNTools package when I was trying to obtain the reduced segment from copy number segment data from TCGA. "Error in cbind(map, do.call("cbind", args = lapply(splited, getGeneSegMean))) : object 'geneMap' not found" After uploading the data which contain the columns ("AliquotID", "Chromosome", "Start", "End", "NumProbes", "Segment_Mean"). I ran the following code as stated in CNTools documentation;

library(CNTools)
data.frame(sampleData)
seg <- CNSeg(sampleData[which(is.element(sampleData[, "ID"],sample(unique(sampleData[, "ID"]), 1))), ])
rsBygene <- getRS(seg, by = "gene", imput = FALSE, XY = FALSE, what = "mean", geneMap = geneMap)

Thanks for your suggestion in advance

CNTools • 694 views
ADD COMMENT
0
Entering edit mode

What does the title of your question have to do with the question itself?

ADD REPLY
0
Entering edit mode

Agree with other comment - In the future please provide a descriptive title relating to the issue you are having.

The above code from the documentation doesn't work for you as you have miscopied data.frame(sampleData) which should be data(sampleData) . I could run the following example in the man documentation with no issue:

   library(CNTools)
   data("sampleData")
   # take a subset of the data for speed
   seg <- CNSeg(sampleData[which(is.element(sampleData[, "ID"], 
       sample(unique(sampleData[, "ID"]), 10))), ])
   rsBypair <- getRS(seg, by = "pair", imput = FALSE, XY = FALSE, what = "mean")
   rsBypair

Perhaps the CNTools maintainer may be able to provide more detail, but according to the vignette (accessible for this package with vignette("HowTo")

 geneMap: a matrix containing five columns named as chrom - the chromosome a
gene is on, start - start location of a gene, end - ending location of a gene, geneid -
entrez gene id, and genename - official gene symbol. geneInfo is required when by
== ”gene”. An example of geneInfo can be found by loading the geneInfo object
using data(”geneInfo”). The object was built for human genes based on build 36.

So before running the above getRS command utilizing geneMap argument, the following is shown in the vignette:

data("geneInfo")
geneInfo <- geneInfo[sample(1:nrow(geneInfo), 2000), ]
rdByGene <- getRS(cnseg, by = "gene", imput = FALSE, XY = FALSE, geneMap = geneInfo)

Hope this helps.

ADD REPLY

Login before adding your answer.

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