navinlabcode / copykat

Other
193 stars 53 forks source link

Error in .External2(C_X11, paste0("jpeg::", quality, ":", filename), g$width #103

Open decodebiology opened 9 months ago

decodebiology commented 9 months ago

Hi,

Thanks for this wonderful tool. I ran into this following issue. I tried plot.genes="FALSE" and plot.genes="TRUE", the error remains the same. Help me in resolving this issue.

sname <- "SY03_444OM"
copykat.test <- copykat(rawmat=exp.rawdata, id.type="S", ngene.chr=5, win.size=25, KS.cut=0.1, sam.name=(paste0(sname)), distance="euclidean", norm.cell.names="",output.seg="TRUE", plot.genes="FALSE", genome="hg20",n.cores=8)

Run log with error:

[1] "running copykat v1.1.0"
[1] "step1: read and filter data ..."
[1] "33694 genes, 11690 cells in raw data"
[1] "8831 genes past LOW.DR filtering"
[1] "step 2: annotations gene coordinates ..."
[1] "start annotation ..."
[1] "step 3: smoothing data with dlm ..."
[1] "step 4: measuring baselines ..."
number of iterations= 136
number of iterations= 503
number of iterations= 165
number of iterations= 205
number of iterations= 180
number of iterations= 223
[1] "step 5: segmentation..."
[1] "step 6: convert to genomic bins..."
[1] "step 7: adjust baseline ..."
[1] "step 8: final prediction ..."
[1] "step 9: saving results..."
[1] "step 10: ploting heatmap ..."

Error in .External2(C_X11, paste0("jpeg::", quality, ":", filename), g$width,  :
  unable to start device JPEG
Calls: copykat -> jpeg
In addition: Warning messages:
1: In asMethod(object) :
  sparse->dense coercion: allocating vector of size 2.9 GiB
2: In jpeg(paste(sample.name, "heatmap.jpeg", sep = ""), height = h *  :
  unable to open connection to X11 display ''
Execution halted

I also checked if X11() is configured in the server and it looks fine. I tried other plots and it works fine.

> capabilities()
       jpeg         png        tiff       tcltk         X11        aqua
       TRUE        TRUE        TRUE        TRUE        TRUE       FALSE
   http/ftp     sockets      libxml        fifo      cledit       iconv
       TRUE        TRUE        TRUE        TRUE        TRUE        TRUE
        NLS       Rprof     profmem       cairo         ICU long.double
       TRUE        TRUE       FALSE        TRUE        TRUE        TRUE
    libcurl
       TRUE
smartinez101 commented 7 months ago

I am also running into the same error.

recervictory commented 3 months ago

I am also facing the same issue in the clusters even though I used a plot.genes = "FALSE",.

recervictory commented 3 months ago

@decodebiology @smartinez101 I resolved the code of JPEG by changing it to PDF. You Cn install it from my repo

https://github.com/recervictory/copykat by using following command in R.

library(devtools) install_github("recervictory/copykat")