jasminezhoulab / TopDom

TopDom is a software tool to ideintify Topological Domains, which are basic builiding blocks of genome structrue. TopDom is computationally very efficient. Using detecting optimal polygon algorithm, TopDom detect topological domains in a linear time. As well as, this tool requires only a single parameter, which enable user to use easily.
4 stars 4 forks source link

Error at Step 4 #4

Closed esebesty closed 3 years ago

esebesty commented 3 years ago

I'm getting the following error, when using the R package version of TopDom:

Step 3 Running Time : 2.33799999999974
Step 3 : Done!
#########################################################################
Step 4 : Convert bins to domains (internal step)
#########################################################################
Error in ret[i, "from.id"]:ret[i, "to.id"] : NA/NaN argument

I was able to identify, that the code fails on this line, but can't figure out the details. Looks like I have a bunch of lines in the ret data.frame with an NA in the to.id column, and the code fails on the first line where the tag is domain and we have the NA:

> ret
     chr from.id from.coord to.id to.coord    tag    size
21  chr1       1          0    NA        0    gap       0
22  chr1       1          0    NA        0    gap       0
33  chr1       1          0    NA        0    gap       0
38  chr1       1          0    NA        0 domain       0
47  chr1       1          0    NA        0 domain       0
54  chr1       1          0    NA        0 domain       0
62  chr1       1          0    NA        0 domain       0
70  chr1       1          0    NA        0 domain       0
77  chr1       1          0    NA        0 domain       0
85  chr1       1          0    NA        0 domain       0
95  chr1       1          0    NA        0 domain       0
100 chr1       1          0    NA        0 domain       0
105 chr1       1          0    NA        0 domain       0
114 chr1       1          0    NA        0 domain       0
122 chr1       1          0    NA        0 domain       0
150 chr1       1          0    NA        0 domain       0
157 chr1       1          0    NA        0 domain       0
163 chr1       1          0    NA        0 domain       0
168 chr1       1          0    NA        0 domain       0
171 chr1       1          0     2  2000000 domain 2000000
177 chr1       3    2000000     2  2000000 domain       0
188 chr1       3    2000000     3  3000000 domain 1000000
78  chr1       4    3000000     3  3000000 domain       0
115 chr1       4    3000000     3  3000000 domain       0
151 chr1       4    3000000     3  3000000 domain       0

Changing to zero-based identifiers as in issue #1 here, did not help. The chromosome coordinates are already zero-based. Any suggestions?

NathanHarmston commented 3 years ago

I had a similar error to you - and discovered that I had an additional column in the matrix file that was causing the lookup to fail.

i.e. chr1 1 40000 NA 0 0

YMMV,

nathan

esebesty commented 3 years ago

Unfortunately, this doesn't seem to be the issue in my case.

alkurowska commented 2 years ago

How did you solve the problem? I have the same issue and cannot solve it.

alkurowska commented 2 years ago

@esebesty would appreciate your help