TickingClock1992 / RIdeogram

154 stars 23 forks source link

RIdeogram rised a C stack error, could you please help me with this problem? #10

Closed zhoujj2013 closed 3 years ago

zhoujj2013 commented 4 years ago

Dear Ticking Clock,

When I use RIdeogram to create plots, I came across C stack error as following:

Loading required package: RIdeogram
Error: C stack usage  7971108 is too close to the limit
Execution halted

Could you please help me with this problem?

Best regards, Jiajian ZHOU Ph.D. Southern Medical University, China

V-JJ commented 4 years ago

Hello! The same happens to me when trying to plot my own data using "karyotype" and "label" parameters. Example of my funtion: ideogram(karyotype = Dsil_karyotype1, overlaid = NULL, label = Dsil_genes, label_type = "marker", synteny = NULL, output = "chromosome.svg")

Thanks in advance, V

TickingClock1992 commented 4 years ago

Sorry, I didn't get what's happening in your case. I didn't remember that I met this kind of error before. Can you send me all the files and scripts that you used? (haozd1992@163.com)

TickingClock1992 commented 4 years ago

Hello, I finally got the plotting data form someone who also met this error. It turns out that too much markers are closely distributed in the case. The idea is that we write a repel function to search for two contiguous markers that are distributed too closely in the chromosome, and then add and subtract a specific value to make them are not overlapped in the figure. The thing is if there are too much such markers, it will lead the repel function to a endless loop and then this error occurs. By the way, the final figure is not good as you expected with too much such markers. Here is an example that only 37 markers in the same region can be shown in my computer. I will get the same error if I add one more marker in this region. (p.s. as you can see, the markers are too dense to add a non-overlapped track next to the ideogram) Much_marker

jmodlis commented 4 years ago

Hi, Do you know how many markers and within what region size this problem happens? I'm trying to figure out if it would be possible to code in a work-around by taking a random subset of markers within these heavily populated regions. Thanks, Jen

TickingClock1992 commented 4 years ago

Hello Jen, Sorry, I have no idea how many markers in what size of region will lead to this error. But, I guess you can try several times times of random sampling. Anyway, I suggest to try other ways of data visualization, like bars on the ideograms which is also good, if you have too many markers to be shown. Hope you all good. Best, Dong

Shellfishgene commented 2 years ago

Is there something else that influences this? Because I get the same error when running the example data:

data(human_karyotype, package="RIdeogram")
data(gene_density, package="RIdeogram")
data(Random_RNAs_500, package="RIdeogram")

ideogram(karyotype = human_karyotype, label = Random_RNAs_500, label_type = "marker")

Error: C stack usage 7977748 is too close to the limit

crcardenas commented 1 year ago

Is there something else that influences this? Because I get the same error when running the example data:

data(human_karyotype, package="RIdeogram")
data(gene_density, package="RIdeogram")
data(Random_RNAs_500, package="RIdeogram")

ideogram(karyotype = human_karyotype, label = Random_RNAs_500, label_type = "marker")

Error: C stack usage 7977748 is too close to the limit

I get the same error using the example data too

> sessionInfo() 

R version 4.1.2 (2021-11-01)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 22.04.2 LTS

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.10.0
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.10.0

locale:
 [1] LC_CTYPE=en_US.UTF-8    LC_NUMERIC=C            LC_TIME=en_GB.UTF-8    
 [4] LC_COLLATE=en_US.UTF-8  LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
 [7] LC_PAPER=en_US.UTF-8    LC_NAME=C               LC_ADDRESS=C           
[10] LC_TELEPHONE=C          LC_MEASUREMENT=C        LC_IDENTIFICATION=C    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] forcats_1.0.0   stringr_1.5.0   dplyr_1.1.0     purrr_1.0.1    
 [5] tidyr_1.3.0     tibble_3.1.8    tidyverse_1.3.2 ggplot2_3.4.1  
 [9] readr_2.1.4     RIdeogram_0.2.2

loaded via a namespace (and not attached):
 [1] lubridate_1.8.0     png_0.1-8           rsvg_2.4.0         
 [4] assertthat_0.2.1    digest_0.6.31       utf8_1.2.3         
 [7] R6_2.5.1            cellranger_1.1.0    backports_1.4.1    
[10] reprex_2.0.2        evaluate_0.20       httr_1.4.2         
[13] pillar_1.8.1        rlang_1.0.6         googlesheets4_1.0.1
[16] readxl_1.4.2        rstudioapi_0.14     rmarkdown_2.20     
[19] textshaping_0.3.6   googledrive_2.0.0   bit_4.0.5          
[22] munsell_0.5.0       broom_1.0.3         compiler_4.1.2     
[25] modelr_0.1.10       xfun_0.37           systemfonts_1.0.4  
[28] pkgconfig_2.0.3     base64enc_0.1-3     htmltools_0.5.4    
[31] tidyselect_1.2.0    XML_3.99-0.9        fansi_1.0.4        
[34] crayon_1.5.2        tzdb_0.3.0          dbplyr_2.3.0       
[37] withr_2.5.0         grid_4.1.2          jsonlite_1.8.4     
[40] gtable_0.3.1        lifecycle_1.0.3     DBI_1.1.3          
[43] magrittr_2.0.3      scales_1.2.1        cli_3.6.0          
[46] stringi_1.7.12      vroom_1.6.1         grImport2_0.2-0    
[49] fs_1.6.1            xml2_1.3.3          ragg_1.2.1         
[52] ellipsis_0.3.2      generics_0.1.3      vctrs_0.5.2        
[55] tools_4.1.2         bit64_4.0.5         glue_1.6.2         
[58] hms_1.1.2           jpeg_0.1-10         parallel_4.1.2     
[61] fastmap_1.1.0       yaml_2.3.7          colorspace_2.1-0   
[64] gargle_1.3.0        rvest_1.0.3         knitr_1.42         
[67] haven_2.5.1