This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Error while running readTranscriptFeatures in methylkit

I am using methylkit package for annotation of methylated CpG sites into exons/introns/exon-intron boundary etc. For that I have my .bed file with list of CpGs with methylation values and I downloaded refGene file from the ucsc browser. I am using the following step1 code for getting the results:

gene.obj = readTranscriptFeatures("P:/New folder/YOUNGCONTROL.bed", "P:/New folder/refGene.bed" , package = "methylKit")

But I got the error of unused argument. I know somebody has commented me to use one bed file but looking into vignettes it species to have one target file and one annotation file, I don't know whether I am correct or not. Anyway if someone knows how to fix this error then it will be of great help.

Thanks.

r

try this first and post the error log if any @ sinha.puja :

 gene.obj = readTranscriptFeatures("P:/New folder/YOUNGCONTROL.bed")

After using the above command I got an error mentioned below: Error: cannot allocate vector of size 157.0 Mb In addition: Warning message: In eval(quote(list(...)), env) : NAs introduced by coercion

Anyone please help.

gene.obj = readTranscriptFeatures("P:/New folder/YOUNGCONTROL.bed")

After using the above command second time I got the following error:
 Calculating intron coordinates...
**Error in .Call2("solve_user_SEW0", start, end, width, PACKAGE = "IRanges") : 
  In range 1: at least two out of 'start', 'end', and 'width', must
  be supplied.**
In addition: Warning messages:
1: In eval(quote(list(...)), env) : NAs introduced by coercion
2: In rep.ref$V2 + b.start.size[, 1] :
  longer object length is not a multiple of shorter object length
3: In rep.ref$V2 + b.start.size[, 1] + b.start.size[, 2] :
  longer object length is not a multiple of shorter object length
4: In rep.ref$V2 + b.start.size[, 1] :
  longer object length is not a multiple of shorter object length

Anyone knows the solution for the error then please help.

Please use ADD COMMENT/ADD REPLY when responding to existing posts to keep threads logically organized. SUBMIT ANSWER is for new answers to original question.

1 answer

Hi @sinha.puja,

The function readTranscriptFeatures is supposed to read the refGene file, so your code should be:

gene.obj = readTranscriptFeatures("P:/New folder/refGene.bed")

Best,

Alex

Log in to answer this question.