annotateWithGeneParts
1
0
Entering edit mode
Punjika • 0
@c0a30ebe
Last seen 2.9 years ago
India

Enter the body of text here

Code should be placed in three backticks as shown below


library(genomation)
library(methylKit)
setwd("/home/user/R/x86_64-pc-linux-gnu-library/4.0/genomation/extdata")
gff.file=system.file("extdata/Bubalus_bubalis.gtf", package = "genomation")
gff = gffToGRanges(gff.file)
head(gff)
Anno <- GRangesList(gff)
setwd("~/Desktop/Final_sort")
diffAnnhyper3=annotateWithGeneParts(as(myDiff25p.hyper,"Granges"),Anno) 

> diffAnnhyper3=annotateWithGeneParts(as(myDiff25p.hyper,"Granges"),Anno)
Error in h(simpleError(msg, call)) : 
  error in evaluating the argument 'target' in selecting a method for function 'annotateWithGeneParts': no method or default for coercing “methylDiff” to “Granges”
> diffAnnhyper3=annotateWithGeneParts(as(myDiff25p.hyper,"GRanges"),Anno)
Error in (function (classes, fdef, mtable)  : 
  unable to find an inherited method for function ‘countOverlaps’ for signature ‘"GRanges", "NULL"’


PLEASE help in resolving this error
GRanges • 1.4k views
ADD COMMENT
0
Entering edit mode
Malcolm Cook ★ 1.6k
@malcolm-cook-6293
Last seen 3 days ago
United States

GRanges must be spelled as "GRanges" with both a capital "g" and a capital "r".

I expect the first of the two assignments to diffAnnhyper3 quite possibly worked.

The second assignment misspells GRanges.

The error message from the second of the two assignments indicates that myDiff25p.hyper is of class methylDiff-class, where I read: "methylDiff object can be coerced to GRanges object via as function."

But this is guesswork which I can't much improve upon without a reproducible example.

Why do you show two such assignments with different spellings of GRanges?

How come only last 2 statements of your code has a > in front it each statement?

Recommended reading:

ADD COMMENT

Login before adding your answer.

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