Question: metagene error when plot metagene reads signal
0
gravatar for wuzefeng2008
15 months ago by
wuzefeng20080 wrote:
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 • 336 views
ADD COMMENTlink modified 15 months ago by Charles Joly Beauparlant160 • written 15 months ago by wuzefeng20080
Answer: metagene error when plot metagene reads signal
1
gravatar for Charles Joly Beauparlant
15 months ago by
Canada
Charles Joly Beauparlant160 wrote:

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 COMMENTlink written 15 months ago by Charles Joly Beauparlant160
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: 227 users visited in the last hour