Question: Master of Science
0
gravatar for adeolu.ogunleye
3 months ago by
adeolu.ogunleye0 wrote:

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 • 107 views
ADD COMMENTlink written 3 months ago by adeolu.ogunleye0

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

ADD REPLYlink written 3 months ago by ramrs10

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 REPLYlink written 12 weeks ago by shepherl ♦♦ 1.5k
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: 268 users visited in the last hour