jokergoo / rGREAT

GREAT Analysis - Functional Enrichment on Genomic Regions
https://jokergoo.github.io/rGREAT
Other
81 stars 11 forks source link

Large bed results in ylim error in graph generation #3

Closed semenko closed 8 years ago

semenko commented 8 years ago

Thanks again for this awesome package!

I've noticed that certain .bed files result in errors during graph generation. (This isn't an important issue for me, since I'm just using the raw tabular outputs.)

Here's an example bed: https://cgs.wustl.edu/~semenko/error.bed (~1M).

When run against MM10 / Great 3.0, the graph generation routines in R all error with "need finite 'ylim' values"

jokergoo commented 8 years ago

Hi, sorry for the late reply. I was on vocation last week and there was no stable internet connection.

For the problem you met, it is because GREAT annotates regions to some genes with empty names ("") and the distance to these empty genes would be NA, that's why ylim is not valid.

I fixed this bug now and you can install the new version on GitHub.

As I noticed, when a region can not be annotated to genes (maybe too far from the gene), GREAT will assign NA as the annotated gene to that region, but it can also happen that GREAT assign an empty string for the region (like in your case). So when GREAT makes the "gene-region association plot", these genes with empty names will still be taken as "real genes", while in rGREAT, these genes are taken as "non-genes". You may see the difference of the numbers on the left plot in both figures.

screen shot 2015-10-25 at 12 44 56

test

Also, I noticed that GREAT will give warnings on your data set and now rGREAT will also print out the warning messages.

screen shot 2015-10-25 at 12 56 52

and in R terminal:

screen shot 2015-10-25 at 13 14 51
semenko commented 8 years ago

Hey -- very cool! Thanks so much for the debugging I really appreciate it -- the rGREAT package has been incredibly helpful!

(And thanks for the hypergeometric saturation warning on the command line, too.)