metagene error when plot metagene reads signal
1
0
Entering edit mode
Wojeff • 0
@wojeff-14309
Last seen 4.4 years ago
Hi,
I am using ""metagene" to plot average reads signal around gene, but it gave error like this:
 Error in intoNbins(gr, bcount) : all 'width(gr)' must be >= 'n'.

My command is :

mg <- metagene$new(genes, "H3K4me3.bam", cores = 8, force_seqlevels = TRUE)

After add the parameter of  "bin_count=30",

Error in .subset2(public_bind_env, "initialize")(...) :  parameter  no use (bin_count = 30), besides,  some times  it gave error "
Error in intoNbins(gr, bcount) : all 'width(gr)' must be >= 'n'" , and i don't know why?

Thanks

metagene metagene$new • 1.4k views
ADD COMMENT
1
Entering edit mode
@charles-joly-beauparlant-4777
Last seen 5.7 years ago
Canada

Hello,

The error happens when you have a region smaller than the bin_count parameter value.

In your example, if genes is a GRanges object, you can test this by doing:

summary(width(genes))

The min value should be smaller than 30.

Depending on what you want to see with the metagene plot, you might consider resizing your regions, i.e.:

genes <- resize(genes, 1000, fix = "center")

Thank you for your interest in metagene! Charles.

ADD COMMENT

Login before adding your answer.

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