An issue with Qualimap counts tool. Figure margins too large

Issue #75 resolved
Darko Cucin created an issue

Hi everyone,
I encountered an issue when I used the Qualimap counts command. When I tried to analyse a larger number of samples, the R script throw out an error which indicates to me that figure margins are too large when making scatterplots.

Here is my command line and the error:

  • This is my command line where I used test data from the website and multiply them to get more samples. I first used my data and encountered the same error and then used test data.
qualimap counts --data GlcN_countsqc_input_41.txt -outdir test_41_samples 
  • This is the error.
Java memory size is set to 1200M
Launching application...

OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=1024m; support was removed in 8.0
QualiMap v.2.3
Built on 2023-05-19 16:57

Selected tool: counts
Rscript /opt/qualimap_v2.3/scripts/countsQC.r --homedir /opt/qualimap_v2.3/scripts --input /tmp/qualimap1691657475370//input.txt -k 5 -o /tmp/qualimap1691657475370/
Reading input data using input description from /tmp/qualimap1691657475370//input.txt
Loaded counts for  21405  features
Num samples: 41
Conditions:
   Conditions
1       nGlcn
2       nGlcn
3       nGlcn
4       pGlcn
5       pGlcn
6       pGlcn
7       nGlcn
8       nGlcn
9       nGlcn
10      pGlcn
11      pGlcn
12      pGlcn
13      nGlcn
14      nGlcn
15      nGlcn
16      pGlcn
17      pGlcn
18      pGlcn
19      nGlcn
20      nGlcn
21      nGlcn
22      pGlcn
23      pGlcn
24      pGlcn
25      nGlcn
26      nGlcn
27      nGlcn
28      pGlcn
29      pGlcn
30      pGlcn
31      nGlcn
32      nGlcn
33      nGlcn
34      pGlcn
35      pGlcn
36      pGlcn
37      nGlcn
38      nGlcn
39      nGlcn
40      pGlcn
41      pGlcn

Compare conditions  FALSE
[1] "Annotation data is not available."
'data.frame':   21405 obs. of  41 variables:
 $ nGlcn01 : int  641 73 2359 39 1 292 421 16 812 445 ...
 $ nGlcn02 : int  641 73 2359 39 1 292 421 16 812 445 ...
 $ nGlcn03 : int  641 73 2359 39 1 292 421 16 812 445 ...
 $ pGlcn01 : int  542 17 1563 165 0 184 300 5 566 273 ...
 $ pGlcn02 : int  542 17 1563 165 0 184 300 5 566 273 ...
 $ pGlcn03 : int  542 17 1563 165 0 184 300 5 566 273 ...
 $ nGlcn011: int  776 47 2497 124 3 220 380 7 727 375 ...
 $ nGlcn021: int  776 47 2497 124 3 220 380 7 727 375 ...
 $ nGlcn031: int  776 47 2497 124 3 220 380 7 727 375 ...
 $ pGlcn011: int  776 47 2497 124 3 220 380 7 727 375 ...
 $ pGlcn021: int  676 21 1460 357 0 170 312 5 496 297 ...
 $ pGlcn031: int  676 21 1460 357 0 170 312 5 496 297 ...
 $ nGlcn012: int  676 21 1460 357 0 170 312 5 496 297 ...
 $ nGlcn022: int  676 21 1460 357 0 170 312 5 496 297 ...
 $ nGlcn032: int  545 54 1600 33 1 218 353 10 632 387 ...
 $ pGlcn012: int  545 54 1600 33 1 218 353 10 632 387 ...
 $ pGlcn022: int  545 54 1600 33 1 218 353 10 632 387 ...
 $ pGlcn032: int  545 54 1600 33 1 218 353 10 632 387 ...
 $ nGlcn013: int  787 15 1522 127 0 199 353 7 629 406 ...
 $ nGlcn023: int  787 15 1522 127 0 199 353 7 629 406 ...
 $ nGlcn033: int  787 15 1522 127 0 199 353 7 629 406 ...
 $ pGlcn013: int  787 15 1522 127 0 199 353 7 629 406 ...
 $ pGlcn023: int  491 32 2126 83 6 228 316 6 569 305 ...
 $ pGlcn033: int  491 32 2126 83 6 228 316 6 569 305 ...
 $ nGlcn014: int  491 32 2126 83 6 228 316 6 569 305 ...
 $ nGlcn024: int  491 32 2126 83 6 228 316 6 569 305 ...
 $ nGlcn034: int  791 29 2149 144 1 237 393 6 784 410 ...
 $ pGlcn014: int  791 29 2149 144 1 237 393 6 784 410 ...
 $ pGlcn024: int  791 29 2149 144 1 237 393 6 784 410 ...
 $ pGlcn034: int  791 29 2149 144 1 237 393 6 784 410 ...
 $ nGlcn015: int  368 63 1296 31 0 270 310 8 692 399 ...
 $ nGlcn025: int  368 63 1296 31 0 270 310 8 692 399 ...
 $ nGlcn035: int  368 63 1296 31 0 270 310 8 692 399 ...
 $ pGlcn015: int  368 63 1296 31 0 270 310 8 692 399 ...
 $ pGlcn025: int  699 24 1075 48 1 178 270 2 435 320 ...
 $ pGlcn035: int  699 24 1075 48 1 178 270 2 435 320 ...
 $ nGlcn016: int  699 24 1075 48 1 178 270 2 435 320 ...
 $ nGlcn026: int  699 24 1075 48 1 178 270 2 435 320 ...
 $ nGlcn036: int  243 79 1010 7 0 202 366 18 529 395 ...
 $ pGlcn016: int  243 79 1010 7 0 202 366 18 529 395 ...
 $ pGlcn026: int  243 79 1010 7 0 202 366 18 529 395 ...

attr(*, "factors")= Factor w/ 2 levels "nGlcn","pGlcn": 1 1 1 2 2 2 1 1 1 2 ...
[1] 21405    41
Init NOISeq data...

Draw global plots...
Compute counts density...
Compute scatterplots..
Warning message:
In all(lapply(counts, is.numeric)) :
  coercing argument of type 'list' to logical
Error in plot.new() : figure margins too large
Calls: pairs ... pairs.default -> localPlot -> plot -> plot.default -> plot.new
Execution halted
Failed to run counts
java.lang.RuntimeException: The RScript process finished with error.
 Check log for details.
    at org.bioinfo.ngs.qc.qualimap.process.CountsQcAnalysis.run(CountsQcAnalysis.java:120)
    at org.bioinfo.ngs.qc.qualimap.main.CountsQcTool.execute(CountsQcTool.java:186)
    at org.bioinfo.ngs.qc.qualimap.main.NgsSmartTool.run(NgsSmartTool.java:190)
    at org.bioinfo.ngs.qc.qualimap.main.NgsSmartMain.main(NgsSmartMain.java:113)

I wonder if you have any suggestions on how to solve this problem or if the tool is limited to a certain number of samples.

I will also attach the files that I used to run this task.

Kind regards,
Darko Cucin.

Comments (5)

  1. Konstantin Okonechnikov repo owner

    Hi! The issue is connected to default image width and height : they are simply too small for such high number of samples. This can be fixed by editing countsQC.R with increase of coefficient:

    image.width <- 4*480
    image.height <- 4*480
    

    If would be useful I can add the coefficient or image size as an additional option.

  2. Darko Cucin reporter

    Hi Konstantin,

    Thank you for a detailed explanation. I think that it will be usable if you add this parameter as an option. Then users will not have to change the countsQC.R script. Also, in the parameter description, you can point out that if running the task with a larger number of samples, setting this parameter is advisable.

  3. Log in to comment