VanLoo-lab / ascat

ASCAT R package
https://www.mdanderson.org/research/departments-labs-institutes/labs/van-loo-laboratory/resources.html#ASCAT
162 stars 85 forks source link

Warning with R 4.2.2 #142

Closed kw10 closed 1 year ago

kw10 commented 1 year ago

Hello, I'm running ASCAT v3.1.1 with R 4.2.2 and I get these warnings:

Warning messages:
1: In !is.null(homsegs) && !is.na(homsegs) :
  'length(x) = 144 > 1' in coercion to 'logical(1)'
2: In !is.null(homsegs) && !is.na(homsegs) :
  'length(x) = 105 > 1' in coercion to 'logical(1)'
3: In !is.null(homsegs) && !is.na(homsegs) :
  'length(x) = 153 > 1' in coercion to 'logical(1)'
(and 26 more lines)

which I do not see when I install and run with R 4.1.3. Do you know what the cause might be, and how I can resolve it? Are the results affected by this? Session info below.

Thanks! Kim

> sessionInfo()
R version 4.2.2 (2022-10-31)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 18.04.6 LTS

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/libf77blas.so.3.10.3
LAPACK: /usr/lib/x86_64-linux-gnu/atlas/liblapack.so.3.10.3

locale:
 [1] LC_CTYPE=en_GB.utf8       LC_NUMERIC=C             
 [3] LC_TIME=en_GB.utf8        LC_COLLATE=en_GB.utf8    
 [5] LC_MONETARY=en_GB.utf8    LC_MESSAGES=en_GB.utf8   
 [7] LC_PAPER=en_GB.utf8       LC_NAME=C                
 [9] LC_ADDRESS=C              LC_TELEPHONE=C           
[11] LC_MEASUREMENT=en_GB.utf8 LC_IDENTIFICATION=C      

attached base packages:
 [1] parallel  stats4    splines   stats     graphics  grDevices utils    
 [8] datasets  methods   base     

other attached packages:
 [1] ASCAT_3.1.1          doParallel_1.0.17    iterators_1.0.14    
 [4] foreach_1.5.2        GenomicRanges_1.50.2 GenomeInfoDb_1.34.9 
 [7] IRanges_2.32.0       S4Vectors_0.36.2     BiocGenerics_0.44.0 
[10] data.table_1.14.8    RColorBrewer_1.1-3  

loaded via a namespace (and not attached):
[1] codetools_0.2-18       bitops_1.0-7           zlibbioc_1.44.0       
[4] XVector_0.38.0         tools_4.2.2            RCurl_1.98-1.12       
[7] compiler_4.2.2         GenomeInfoDbData_1.2.9
tlesluyes commented 1 year ago

Hi @kw10,

Thank you for your feedback. This is normal behaviour in R 4.2.0+: it throws a warning if the arguments involved in a && or || check have different lengths. This has recently been enforced in R 4.3.0+ and now gives an error so it needs to be fixed on our end. This shouldn't change the results at all so you are good to go with 4.2.2, but I'll need to check all such logical operators in the ASCAT code.

Reference (search for &&): https://stat.ethz.ch/R-manual/R-devel/doc/html/NEWS.html

Let me know if you have other warnings like this.

Cheers,

Tom.

tlesluyes commented 1 year ago

Update

This warning/error should now be fixed (https://github.com/VanLoo-lab/ascat/commit/c4c10f8bc5deecc0b0e18f46dd271934e554d73e; integrated into the 'master' and 'v3.1' branches). I looked at the other &&/|| checks and they all look good but feel free to report any exceptions.

Cheers,

Tom.

kw10 commented 1 year ago

Thanks, Tom, the warning has disappeared now and there are no new issues. Would it be possible for you to create a v3.1.2 release?

Thanks! Kim

tlesluyes commented 1 year ago

Hi @kw10,

Done.

Cheers,

Tom.