hansenlab / minfi

Devel repository for minfi
58 stars 67 forks source link

lm.fit Error during preprocessFunnorm for EPIC V2 array #253

Closed ahwanpandey closed 8 months ago

ahwanpandey commented 8 months ago

Hello,

I am getting this error during processing of the EPIC V2 array. Please help.

> targets = read.delim(targets_file, sep =',', stringsAsFactors = FALSE, colClasses = "character")
> RGSet  <- read.metharray.exp(targets = targets)
> RGSet@annotation["array"] = "IlluminaHumanMethylationEPICv2"
> RGSet@annotation["annotation"] = "20a1.hg38"
> RGSet

class: RGChannelSet 
dim: 1105209 16 
metadata(0):
assays(2): Green Red
rownames(1105209): 1600157 1600179 ... 99810982 99810990
rowData names(0):
colnames(16): 207686140007_R01C01 207686140007_R02C01 ... 207686140014_R07C01
  207686140014_R08C01
colData names(14): Sample_Name Tube_Name ... Basename filenames
Annotation
  array: IlluminaHumanMethylationEPICv2
  annotation: 20a1.hg38

> getManifest(RGSet)

IlluminaMethylationManifest object
Annotation
  array: IlluminaHumanMethylationEPICv2
Number of type I probes: 128271 
Number of type II probes: 808719 
Number of control probes: 635 
Number of SNP type I probes: 24 
Number of SNP type II probes: 41 

> GRset.norm <- preprocessFunnorm(RGSet, sex = phenoData$Sex)

[preprocessFunnorm] Background and dye bias correction with noob
[preprocessFunnorm] Mapping to genome
[preprocessFunnorm] Quantile extraction
[preprocessFunnorm] Normalization
Error in lm.fit(x = design, y = t(res)) : NA/NaN/Inf in 'y'

my SessionInfo is as follows

> sessionInfo()
R version 4.0.4 (2021-02-15)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19045)

Matrix products: default

locale:
[1] LC_COLLATE=English_Australia.1252  LC_CTYPE=English_Australia.1252    LC_MONETARY=English_Australia.1252 LC_NUMERIC=C                      
[5] LC_TIME=English_Australia.1252    

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

other attached packages:
 [1] IlluminaHumanMethylationEPICv2anno.20a1.hg38_0.99.0 IlluminaHumanMethylationEPICv2manifest_0.99.1       data.table_1.14.2                                  
 [4] sva_3.38.0                                          BiocParallel_1.24.1                                 genefilter_1.72.1                                  
 [7] mgcv_1.8-40                                         nlme_3.1-157                                        limma_3.46.0                                       
[10] RColorBrewer_1.1-3                                  minfi_1.36.0                                        bumphunter_1.32.0                                  
[13] locfit_1.5-9.4                                      iterators_1.0.14                                    foreach_1.5.2                                      
[16] Biostrings_2.58.0                                   XVector_0.30.0                                      SummarizedExperiment_1.20.0                        
[19] Biobase_2.50.0                                      MatrixGenerics_1.2.1                                matrixStats_0.62.0                                 
[22] GenomicRanges_1.42.0                                GenomeInfoDb_1.26.7                                 IRanges_2.24.1                                     
[25] S4Vectors_0.28.1                                    BiocGenerics_0.36.1                                

loaded via a namespace (and not attached):
 [1] bitops_1.0-7              bit64_4.0.5               progress_1.2.2            httr_1.4.3                tools_4.0.4               doRNG_1.8.6              
 [7] nor1mix_1.3-0             utf8_1.2.2                R6_2.5.1                  HDF5Array_1.18.1          DBI_1.1.2                 rhdf5filters_1.2.1       
[13] tidyselect_1.1.2          prettyunits_1.1.1         base64_2.0                preprocessCore_1.52.1     bit_4.0.4                 curl_4.3.2               
[19] compiler_4.0.4            cli_3.3.0                 xml2_1.3.3                DelayedArray_0.16.3       rtracklayer_1.50.0        readr_2.1.2              
[25] quadprog_1.5-8            askpass_1.1               rappdirs_0.3.3            stringr_1.4.0             digest_0.6.29             Rsamtools_2.6.0          
[31] illuminaio_0.32.0         siggenes_1.64.0           GEOquery_2.58.0           pkgconfig_2.0.3           scrime_1.3.5              sparseMatrixStats_1.2.1  
[37] dbplyr_2.1.1              fastmap_1.1.0             rlang_1.0.2               rstudioapi_0.13           RSQLite_2.2.14            DelayedMatrixStats_1.12.3
[43] generics_0.1.2            mclust_5.4.9              dplyr_1.0.9               RCurl_1.98-1.6            magrittr_2.0.3            GenomeInfoDbData_1.2.4   
[49] Matrix_1.4-1              Rcpp_1.0.8.3              Rhdf5lib_1.12.1           fansi_1.0.3               lifecycle_1.0.1           edgeR_3.32.1             
[55] stringi_1.7.6             MASS_7.3-57               zlibbioc_1.36.0           rhdf5_2.34.0              plyr_1.8.7                BiocFileCache_1.14.0     
[61] grid_4.0.4                blob_1.2.3                crayon_1.5.1              lattice_0.20-45           splines_4.0.4             annotate_1.68.0          
[67] multtest_2.46.0           GenomicFeatures_1.42.3    hms_1.1.1                 beanplot_1.3.1            pillar_1.7.0              rngtools_1.5.2           
[73] codetools_0.2-18          biomaRt_2.46.3            XML_3.99-0.9              glue_1.6.2                tzdb_0.3.0                vctrs_0.4.1              
[79] tidyr_1.2.0               openssl_2.0.1             purrr_0.3.4               reshape_0.8.9             assertthat_0.2.1          cachem_1.0.6             
[85] xtable_1.8-4              survival_3.3-1            tibble_3.1.7              GenomicAlignments_1.26.0  AnnotationDbi_1.52.0      memoise_2.0.1            
[91] ellipsis_0.3.2

Thanks, Ahwan

ahwanpandey commented 8 months ago

By the way, not sure if this has to do with anything but I get these warnings in "read.metharray.exp". Also should mention that preprocessRaw(RGSet) works fine and I can generate violin plots and beta distribution plots for my data without any issues.

> RGSet  <- read.metharray.exp(targets = targets)
There were 32 warnings (use warnings() to see them)
> warnings()
Warning messages:
1: In readChar(con, nchars = n) : truncating string with embedded nuls
2: In readChar(con, nchars = n) : truncating string with embedded nuls
3: In readChar(con, nchars = n) : truncating string with embedded nuls
4: In readChar(con, nchars = n) : truncating string with embedded nuls
5: In readChar(con, nchars = n) : truncating string with embedded nuls
6: In readChar(con, nchars = n) : truncating string with embedded nuls
7: In readChar(con, nchars = n) : truncating string with embedded nuls
8: In readChar(con, nchars = n) : truncating string with embedded nuls
9: In readChar(con, nchars = n) : truncating string with embedded nuls
10: In readChar(con, nchars = n) : truncating string with embedded nuls
11: In readChar(con, nchars = n) : truncating string with embedded nuls
12: In readChar(con, nchars = n) : truncating string with embedded nuls
13: In readChar(con, nchars = n) : truncating string with embedded nuls
14: In readChar(con, nchars = n) : truncating string with embedded nuls
15: In readChar(con, nchars = n) : truncating string with embedded nuls
16: In readChar(con, nchars = n) : truncating string with embedded nuls
17: In readChar(con, nchars = n) : truncating string with embedded nuls
18: In readChar(con, nchars = n) : truncating string with embedded nuls
19: In readChar(con, nchars = n) : truncating string with embedded nuls
20: In readChar(con, nchars = n) : truncating string with embedded nuls
21: In readChar(con, nchars = n) : truncating string with embedded nuls
22: In readChar(con, nchars = n) : truncating string with embedded nuls
23: In readChar(con, nchars = n) : truncating string with embedded nuls
24: In readChar(con, nchars = n) : truncating string with embedded nuls
25: In readChar(con, nchars = n) : truncating string with embedded nuls
26: In readChar(con, nchars = n) : truncating string with embedded nuls
27: In readChar(con, nchars = n) : truncating string with embedded nuls
28: In readChar(con, nchars = n) : truncating string with embedded nuls
29: In readChar(con, nchars = n) : truncating string with embedded nuls
30: In readChar(con, nchars = n) : truncating string with embedded nuls
31: In readChar(con, nchars = n) : truncating string with embedded nuls
32: In readChar(con, nchars = n) : truncating string with embedded nuls
ahwanpandey commented 8 months ago

OK, no errors when using a newer version of minfi and R. It works!

>   sessionInfo()
R version 4.2.0 (2022-04-22)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)

Matrix products: default
BLAS:   /usr/lib64/libblas.so.3.4.2
LAPACK: /usr/lib64/liblapack.so.3.4.2

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

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

other attached packages:
 [1] IlluminaHumanMethylationEPICv2anno.20a1.hg38_0.99.0
 [2] IlluminaHumanMethylationEPICv2manifest_0.99.1
 [3] data.table_1.14.2
 [4] sva_3.44.0
 [5] BiocParallel_1.30.2
 [6] genefilter_1.78.0
 [7] mgcv_1.8-40
 [8] nlme_3.1-157
 [9] limma_3.52.1
[10] RColorBrewer_1.1-3
[11] minfi_1.44.0
[12] bumphunter_1.38.0
[13] locfit_1.5-9.5
[14] iterators_1.0.14
[15] foreach_1.5.2
[16] Biostrings_2.64.0
[17] XVector_0.36.0
[18] SummarizedExperiment_1.26.1
[19] Biobase_2.56.0
[20] MatrixGenerics_1.8.0
[21] matrixStats_0.62.0
[22] GenomicRanges_1.48.0
[23] GenomeInfoDb_1.32.2
[24] IRanges_2.30.0
[25] S4Vectors_0.34.0
[26] BiocGenerics_0.42.0

loaded via a namespace (and not attached):
 [1] rjson_0.2.21              ellipsis_0.3.2
 [3] siggenes_1.70.0           mclust_5.4.10
 [5] base64_2.0                bit64_4.0.5
 [7] AnnotationDbi_1.58.0      fansi_1.0.3
 [9] xml2_1.3.3                codetools_0.2-18
[11] splines_4.2.0             sparseMatrixStats_1.8.0
[13] cachem_1.0.6              scrime_1.3.5
[15] Rsamtools_2.12.0          annotate_1.74.0
[17] dbplyr_2.1.1              png_0.1-7
[19] HDF5Array_1.24.1          readr_2.1.2
[21] compiler_4.2.0            httr_1.4.3
[23] assertthat_0.2.1          Matrix_1.5-4
[25] fastmap_1.1.0             cli_3.6.1
[27] prettyunits_1.1.1         tools_4.2.0
[29] glue_1.6.2                GenomeInfoDbData_1.2.8
[31] dplyr_1.0.9               rappdirs_0.3.3
[33] doRNG_1.8.2               Rcpp_1.0.10
[35] vctrs_0.6.3               rhdf5filters_1.8.0
[37] multtest_2.52.0           preprocessCore_1.58.0
[39] rtracklayer_1.56.0        DelayedMatrixStats_1.18.0
[41] stringr_1.4.0             lifecycle_1.0.3
[43] restfulr_0.0.13           rngtools_1.5.2
[45] XML_3.99-0.9              beanplot_1.3.1
[47] edgeR_3.38.1              zlibbioc_1.42.0
[49] MASS_7.3-57               hms_1.1.1
[51] rhdf5_2.40.0              GEOquery_2.64.2
[53] yaml_2.3.5                curl_4.3.2
[55] memoise_2.0.1             biomaRt_2.52.0
[57] reshape_0.8.9             stringi_1.7.6
[59] RSQLite_2.2.14            BiocIO_1.6.0
[61] GenomicFeatures_1.48.3    filelock_1.0.2
[63] rlang_1.1.1               pkgconfig_2.0.3
[65] bitops_1.0-7              nor1mix_1.3-0
[67] lattice_0.20-45           purrr_0.3.4
[69] Rhdf5lib_1.18.2           GenomicAlignments_1.32.0
[71] bit_4.0.4                 tidyselect_1.1.2
[73] plyr_1.8.7                magrittr_2.0.3
[75] R6_2.5.1                  generics_0.1.2
[77] DelayedArray_0.22.0       DBI_1.1.2
[79] pillar_1.7.0              survival_3.3-1
[81] KEGGREST_1.36.0           RCurl_1.98-1.6
[83] tibble_3.1.7              crayon_1.5.1
[85] utf8_1.2.2                BiocFileCache_2.4.0
[87] tzdb_0.3.0                progress_1.2.2
[89] grid_4.2.0                blob_1.2.3
[91] digest_0.6.29             xtable_1.8-4
[93] tidyr_1.2.0               illuminaio_0.38.0
[95] openssl_2.0.2             askpass_1.1
[97] quadprog_1.5-8