Running ENmix with mouse methylation manifest: readidat error - Error in readmanifest(manifestfile) : length(control.line) == 1 && is.integer(control.line) && ! is not TRUE
Entering edit mode
minardsmitha ▴ 10
Last seen 7 weeks ago
United States

I have a directory of idat files for 210 samples. I want to use ENmix to process this data. My data is from Mouse Methylation. I downloaded the mouse Illumina manifest file from

Then I ran the following code:



rgSet <- readidat(path = getwd(),manifestfile=mf,recursive = TRUE)

Which produces this error message:

[readidat] Found 210 files with suffix _Grn.idat
[readidat] Found 210 files with suffix _Red.idat
Error in readmanifest(manifestfile) : 
  length(control.line) == 1 && is.integer(control.line) && ! is not TRUE
In addition: Warning messages:
1: In system(sprintf("grep -n \\\\[Controls\\\\] %s", file), intern = TRUE) :
  running command 'grep -n \\[Controls\\] MouseMethylation_12v1-0_A2.bpm' had status 2
2: In readmanifest(manifestfile) : NAs introduced by coercion

I have searched for a resolution to this issue and found a related post on here with no responses. I also looked at the code for readidat and see that it is finding the line in the manifest file that contains [Controls]. This line does exist in the manifest file.

Why am I getting this error and how can I fix it?

sessionInfo( )

R version 4.2.2 (2022-10-31 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19045)

Matrix products: default

[1] LC_COLLATE=English_United States.utf8  LC_CTYPE=English_United States.utf8   
[3] LC_MONETARY=English_United States.utf8 LC_NUMERIC=C                          
[5] LC_TIME=English_United States.utf8    

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

other attached packages:
 [1] limma_3.54.2                geneplotter_1.76.0          annotate_1.76.0            
 [4] XML_3.99-0.16.1             AnnotationDbi_1.60.2        lattice_0.20-45            
 [7] ENmix_1.34.02               SummarizedExperiment_1.28.0 Biobase_2.58.0             
[10] GenomicRanges_1.50.2        GenomeInfoDb_1.34.9         IRanges_2.32.0             
[13] S4Vectors_0.36.2            BiocGenerics_0.44.0         MatrixGenerics_1.10.0      
[16] matrixStats_1.3.0           doParallel_1.0.17           iterators_1.0.14           
[19] foreach_1.5.2              

loaded via a namespace (and not attached):
  [1] AnnotationHub_3.6.0           BiocFileCache_2.13.0          plyr_1.8.9                   
  [4] splines_4.2.2                 BiocParallel_1.32.6           digest_0.6.35                
  [7] htmltools_0.5.8.1             RPMM_1.25                     fansi_1.0.6                  
 [10] magrittr_2.0.3                memoise_2.0.1                 cluster_2.1.4                
 [13] tzdb_0.4.0                    Biostrings_2.66.0             readr_2.1.5                  
 [16] askpass_1.2.0                 siggenes_1.72.0               prettyunits_1.2.0            
 [19] blob_1.2.4                    rappdirs_0.3.3                dplyr_1.1.4                  
 [22] crayon_1.5.2                  RCurl_1.98-1.14               genefilter_1.80.3            
 [25] GEOquery_2.66.0               impute_1.72.3                 survival_3.5-0               
 [28] glue_1.7.0                    zlibbioc_1.44.0               XVector_0.38.0               
 [31] DelayedArray_0.24.0           Rhdf5lib_1.20.0               HDF5Array_1.26.0             
 [34] DBI_1.2.2                     rngtools_1.5.2                Rcpp_1.0.12                  
 [37] xtable_1.8-4                  progress_1.2.3                bumphunter_1.40.0            
 [40] bit_4.0.5                     mclust_6.1.1                  preprocessCore_1.60.2        
 [43] httr_1.4.7                    gplots_3.1.3.1                RColorBrewer_1.1-3           
 [46] pkgconfig_2.0.3               reshape_0.8.9                 dbplyr_2.5.0                 
 [49] locfit_1.5-9.9                utf8_1.2.4                    dynamicTreeCut_1.63-1        
 [52] tidyselect_1.2.1              rlang_1.1.3                   later_1.3.2                  
 [55] BiocVersion_3.16.0            tools_4.2.2                   cachem_1.0.8                 
 [58] cli_3.6.2                     generics_0.1.3                RSQLite_2.3.6                
 [61] ExperimentHub_2.6.0           stringr_1.5.1                 fastmap_1.1.1                
 [64] yaml_2.3.8                    bit64_4.0.5                   beanplot_1.3.1               
 [67] caTools_1.18.2                scrime_1.3.5                  purrr_1.0.2                  
 [70] KEGGREST_1.38.0               nlme_3.1-162                  doRNG_1.8.6                  
 [73] sparseMatrixStats_1.10.0      mime_0.12                     nor1mix_1.3-3                
 [76] xml2_1.3.6                    biomaRt_2.54.1                compiler_4.2.2               
 [79] rstudioapi_0.16.0             filelock_1.0.3                curl_5.2.1                   
 [82] png_0.1-8                     interactiveDisplayBase_1.36.0 tibble_3.2.1                 
 [85] stringi_1.8.4                 GenomicFeatures_1.50.4        minfi_1.44.0                 
 [88] Matrix_1.6-5                  multtest_2.54.0               vctrs_0.6.5                  
 [91] pillar_1.9.0                  lifecycle_1.0.4               rhdf5filters_1.10.1          
 [94] BiocManager_1.30.23           data.table_1.15.4             bitops_1.0-7                 
 [97] httpuv_1.6.15                 rtracklayer_1.58.0            R6_2.5.1                     
[100] BiocIO_1.8.0                  promises_1.3.0                KernSmooth_2.23-20           
[103] codetools_0.2-19              pkgload_1.3.4                 gtools_3.9.5                 
[106] MASS_7.3-58.2                 rhdf5_2.42.1                  openssl_2.1.2                
[109] rjson_0.2.21                  GenomicAlignments_1.34.1      Rsamtools_2.14.0             
[112] GenomeInfoDbData_1.2.9        hms_1.1.3                     quadprog_1.5-8               
[115] grid_4.2.2                    tidyr_1.3.1                   base64_2.0.1                 
[118] DelayedMatrixStats_1.20.0     illuminaio_0.40.0             shiny_1.8.1.1                
[121] restfulr_0.0.15
ENmix Bioconductor • 622 views
Entering edit mode
minardsmitha ▴ 10
Last seen 7 weeks ago
United States

Well it turns out there is a typo in the manifest file name. This particular issue is resolved by correcting the typo.
A new error now appears that I will try to figure out on my own. If I can't resolve the new error I will start a new question.

rgSet <- readidat(path = getwd(),manifestfile=mf,recursive = TRUE)
[readidat] Found 210 files with suffix _Grn.idat
[readidat] Found 210 files with suffix _Red.idat
Error in `$<`(`*tmp*`, "Infinium_Design_Type", value = "A") : 
  replacement has 1 row, data has 0
Entering edit mode

Hi, I am having the same issues. What was the typo that you found? And were you able to solve the next problem?

Entering edit mode

Could you try the following code and see whether you have any errors



What is the version of the ENmix that you used?

Entering edit mode

Thank you for the suggestion the ENmix version is using is ENmix_1.38.01.

I tried your suggested code, R identified the idat files but still returned the message below:

"[readidat] Found 20 files with suffix _Grn.idat [readidat] Found 20 files with suffix _Red.idat Error in system(command, as.integer(flag), f, stdout, stderr, timeout) : character string expected as first argument"

Entering edit mode

Could you try the latest version (1.40.1) to see how it works, I am not able to replicate the error message on my computer here.

Entering edit mode

I tried the latest version and encountered the same issues. The manifest file I downloaded is the .csv from the following link: Is this the correct version, or does there need to be some editing of the file to allow it to be read appropriately by R.


Login before adding your answer.

Traffic: 629 users visited in the last hour
Help About
Access RSS

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6