YinLiLin / CMplot

📊 Circular and Rectangular Manhattan Plot
520 stars 112 forks source link

Error in plot.window(...) : need finite 'xlim' values #46

Open Shicheng-Guo opened 3 years ago

Shicheng-Guo commented 3 years ago

Hi YinLi

I am wondering why cmplot have such error response. Thanks

   SNP Chromosome Position UKB_BLOOD_BIOMARKER
1    1          1    30600                   1
2    2          1    30610                   1
3    3          1    30620                   1
4    4          1    30630                   1
5    5          1    30640                   1
6    6          1    30650                   1
7    7          1    30660                   1
8    8          1    30670                   1
9    9          1    30680                   1
10  10          1    30690                   1
11  11          1    30700                   1
12  12          1    30710                   1
13  13          1    30720                   1
14  14          1    30730                   1
15  15          1    30740                   1
16  16          1    30750                   1
17  17          1    30760                   1
18  18          1    30770                   1
19  19          1    30780                   1
20  20          1    30790                   1
21  21          1    30800                   1
22  22          1    30810                   1
23  23          1    30820                   1
24  24          1    30830                   1
25  25          1    30840                   1
26  26          1    30850                   1
27  27          1    30860                   1
28  28          1    30870                   1
29  29          1    30880                   1
30  30          1    30890                   1
>   CMplot(input,plot.type="q",box=FALSE,file="jpg",memo=output,dpi=300,conf.int=TRUE,conf.int.col=NULL,threshold.col="red",threshold.lty=3,file.output=TRUE,verbose=TRUE,width=5,height=5)
 QQ Plotting UKB_BLOOD_BIOMARKER.
Error in plot.window(...) : need finite 'xlim' values
In addition: Warning message:
In max(x, na.rm = TRUE) : no non-missing arguments to max; returning -Inf
YinLiLin commented 3 years ago

Did you use the latest version of CMplot?

Yangxiaohan0120 commented 2 years ago

I've got the same question. Did you solve it ?

Yangxiaohan0120 commented 2 years ago

I've solved this problem. Though CMplot used data.frame as data input, it scales the x limit by the third column rather than the "Position" column. You need to design your data as "SNP Chromosome Position" so that this package can recognize your data.

I started with "Chromosome Position SNP" first with this error. Then I correct my data with the order and get figures.

YinLiLin commented 2 years ago

@Yangxiaohan0120 Thank you. Very useful answer to this issue 👍🏻.