johnros / RRHO

Implementing the Rank-Rank Hypergeometric overlap test
2 stars 5 forks source link

Problem with unequal lists #2

Closed gdevenyi closed 3 years ago

gdevenyi commented 3 years ago

Hello,

I have lists with size 19100 and 19085 respectively. When I use the RRHO function to do an overlap comparison, I end up with a single item in the output:

> test = RRHO(chimp_rel_rrho, human_rel_rrho, stepsize = 100, alternative = "two.sided")
> test
$hypermat
          [,1]
[1,] 0.6931472

$hypermat.counts
     [,1]
[1,]    0

$hypermat.signs
     [,1]
[1,]   -1

$hypermat.by
[1] NA

$n.items
[1] 19100

$stepsize
[1] 100

$log10.ind
[1] FALSE

$call
RRHO(list1 = chimp_rel_rrho, list2 = human_rel_rrho, stepsize = 100, 
    alternative = "two.sided")

I'm not sure it's valid to have different lengths of lists, but this doesn't seem to be documented or throw any kind of error.

gdevenyi commented 3 years ago

Issue turned out to be I didn't have dataframes, I had Tibbles which almost work most of the time, but failed in some silent ways when the code tried to calculate length.

Suggest perhaps that inputs be coerced to dataframes before processing.

johnros commented 3 years ago

Dear Gabriel I have not worked on RRHO for a while. If you wish to submit a pull request, I will gladly incorporate your proposed change.

Jonathan

On Thu, Sep 17, 2020 at 9:40 PM Gabriel A. Devenyi notifications@github.com wrote:

Issue turned out to be I didn't have dataframes, I had Tibbles which almost work most of the time, but failed in some silent ways when the code tried to calculate length.

Suggest perhaps that inputs be coerced to dataframes before processing.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/johnros/RRHO/issues/2#issuecomment-694424979, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAECZHIWSIQ42GRW4XQ6FYLSGJJ3PANCNFSM4RPGFEDQ .

--

Jonathan Rosenblatt Dept. of Industrial Engineering and Management Ben Gurion University of the Negev www.john-ros.com