jokergoo / rGREAT

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

difference in the packge given results compared to the web-based tool #24

Closed peranti closed 3 years ago

peranti commented 3 years ago

Hey @jokergoo, Thanks for the package; it is very useful and easy to use.

I have made an interesting observation and wish to bring it to your notice. I have used rGREAT package for 40082 regions of interest and found the result for three regions to be inconsistent with the results from the web-based GREAT tool.

Here is the bed file used:

chr21   34398242    34398243    chr21_34398242
chr21   37852387    37852388    chr21_37852387
chr21   43735760    43735761    chr21_43735760

The results from rGREAT::plotRegionGeneAssociationGraphs the function are as below:

# GRanges object with 3 ranges and 2 metadata columns:
#     seqnames            ranges strand |        gene   distTSS
#        <Rle>         <IRanges>  <Rle> | <character> <numeric>
# [1]    chr21 34398242-34398243      * |        <NA>        NA
# [2]    chr21 37852387-37852388      * |        <NA>        NA
# [3]    chr21 43735760-43735761      * |        <NA>        NA
# -------
#   seqinfo: 1 sequence from an unspecified genome; no seqlengths

Meanwhile, the results from web-based GREAT are as below:

# GREAT version 4.0.4   Species assembly: hg19  
# Association rule: Basal+extension: 5000 bp upstream, 1000 bp downstream, 1000000 bp max extension, 
# curated regulatory domains included
chr21_34398242  OLIG2 (0)
chr21_37852387  CLDN14 (0)
chr21_43735760  TFF3 (0)

These three regions found an association with a gene through the GREAT tool and did not through rGREAT.

The R job object defined as follows:

# Submit time: 2020-09-08 11:45:38 
# Version: 4.0.4 
# Species: hg19 
# Inputs: 3 regions
# Background: wholeGenome 
# Model: Basal plus extension 
#   Proximal: 5 kb upstream, 1 kb downstream,
#   plus Distal: up to 1000 kb
# Include curated regulatory domains
# 
# Enrichment tables for following ontologies have been downloaded:
#   None

Please let me know if you need any further information on the approach used or anything else in this regard. Thanks again for your efforts!

jokergoo commented 3 years ago

OK, then there must be something wrong with the code. It should be the same. I will have a look.

Can you send me the regions you used? You can send me by email if it is confidential.

jokergoo commented 3 years ago

I have found the reason. I always assumed the distance to TSS having signs (+ or -).

Now, this bug is fixed and you can install it from GitHub (v 1.21.1).