Hello everyone, I am in trouble with the function read.metharray.exp with minfi
In my target, I have :
- Sentrix_ID
- Sentrix_position
- Basename
As you can see the output :
> head(target)
IID X.1 X Age SEXE MEREINDIFF MEREABUS MERECONTROL PEREINDIFF PEREABUS PERECONTROL
1 MTD01 1 1 45 1 2 6 6 12 14 9
2 MTD05 2 2 49 1 0 5 5 NA NA NA
3 MTD106 3 3 28 1 0 3 3 0 0 4
4 MTD111 4 4 42 2 NA NA NA 0 2 8
5 MTD114 5 5 32 1 4 10 10 NA NA NA
6 MTD117 6 6 41 1 2 5 5 5 3 5
NBRUTURES PC1 PC2 PC3 PC4 PC5 PC6 Sentrix_ID
1 0 -0.0106071 -0.00205327 0.01052250 1.88943e-03 0.00154025 0.00460366 8784241009
2 2 0.0923103 -0.00410025 0.00670523 -6.44133e-05 0.00682637 -0.00405648 8691803162
3 1 -0.0344855 -0.02255660 0.04747420 -6.52418e-02 -0.00276713 0.16696700 8784241009
4 2 0.1626150 -0.13081700 0.04439010 3.64958e-02 0.04077800 0.37383800 8784241009
5 1 0.1421090 -0.03179220 0.00279590 -8.31372e-02 -0.01745710 0.00318225 8784241009
6 0 -0.0287510 -0.00419953 0.13936300 -1.82299e-01 0.01224690 -0.06573900 8784241009
Sentrix_Position BARCODES
1 R06C02 86918031....
2 R01C01 86918031....
3 R01C02 86918031....
4 R02C01 86918031....
5 R02C02 86918031....
6 R03C01 86918031....
Basename
1 ~/Users/clarachretienneau/Desktop/clock epigenetic/PJ1209132_ScanData/8691803162_R01C01
2 ~/Users/clarachretienneau/Desktop/clock epigenetic/PJ1209132_ScanData/8691803162_R01C02
3 ~/Users/clarachretienneau/Desktop/clock epigenetic/PJ1209132_ScanData/8691803162_R02C01
4 ~/Users/clarachretienneau/Desktop/clock epigenetic/PJ1209132_ScanData/8691803162_R02C02
5 ~/Users/clarachretienneau/Desktop/clock epigenetic/PJ1209132_ScanData/8691803162_R03C01
6 ~/Users/clarachretienneau/Desktop/clock epigenetic/PJ1209132_ScanData/8691803162_R03C02
This is how i create the Basename :
IDATs_directory <- "~/Users/clarachretienneau/Desktop/clock epigenetic/PJ1209132_ScanData"
baseDirectory <- file.path(IDATs_directory, files_name_incomplete)
target$Basename<-file.path(baseDirectory)
When I try read.metharray.exp , this is the output : it's replicate the end of the path
rgset <- read.metharray.exp(base = baseDirectory,targets = target, extended + = TRUE) Error in read.metharray(basenames = files,
extended = extended, verbose = verbose, : The following specified files do not exist:~/Users/clarachretienneau/Desktop/clock
epigenetic/PJ1209132_ScanData/8691803162_R01C01/8691803162_R01C01_Grn.idat, ~/Users/clarachretienneau/Desktop/clock
epigenetic/PJ1209132_ScanData/8691803162_R01C02/8691803162_R01C02_Grn.idat, ~/Users/clarachretienneau/Desktop/clock
epigenetic/PJ1209132_ScanData/8691803162_R02C01/8691803162_R02C01_Grn.idat, ~/Users/clarachretienneau/Desktop/clock
epigenetic/PJ1209132_ScanData/8691803162_R02C02/8691803162_R02C02_Grn.idat, ~/Users/clarachretienneau/Desktop/clock
epigenetic/PJ1209132_ScanData/8691803162_R03C01/8691803162_R03C01_Grn.idat, ~/Users/clarachretienneau/Desktop/clock
epigenetic/PJ1209132_ScanData/8691803162_R03C02/8691803162_R03C02_Grn.idat, ~/Users/clarachretienneau/Desktop/clock
epigenetic/PJ1209132_ScanData/8691803162_R04C01/8691803162_R04C01_Grn.idat, ~/Users/clarachretienneau/Desktop/clock
epigenetic/PJ1209132_ScanData/8691803162_R04C02/8691803162_R04C02_Grn.idat, ~/Users/clarachretie
I try to understand with chatgpt but it doesn't work....
Thank you very much Clara :)
sessionInfo( )
R version 4.2.3 (2023-03-15)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Monterey 12.3
Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRlapack.dylib
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] parallel stats4 stats graphics grDevices utils datasets methods base
other attached packages:
[1] minfi_1.44.0 bumphunter_1.40.0 locfit_1.5-9.9
[4] iterators_1.0.14 foreach_1.5.2 Biostrings_2.66.0
[7] XVector_0.38.0 SummarizedExperiment_1.28.0 Biobase_2.58.0
[10] MatrixGenerics_1.10.0 matrixStats_1.2.0 GenomicRanges_1.50.2
[13] GenomeInfoDb_1.34.9 IRanges_2.32.0 S4Vectors_0.36.2
[16] BiocGenerics_0.44.0
loaded via a namespace (and not attached):
[1] nlme_3.1-164 bitops_1.0-7 bit64_4.0.5
[4] filelock_1.0.3 RColorBrewer_1.1-3 progress_1.2.3
[7] httr_1.4.7 tools_4.2.3 doRNG_1.8.6
[10] nor1mix_1.3-2 utf8_1.2.4 R6_2.5.1
[13] HDF5Array_1.26.0 DBI_1.2.2 rhdf5filters_1.10.1
[16] tidyselect_1.2.1 prettyunits_1.2.0 base64_2.0.1
[19] preprocessCore_1.60.2 bit_4.0.5 curl_5.2.1
[22] compiler_4.2.3 cli_3.6.2 xml2_1.3.6
[25] DelayedArray_0.24.0 rtracklayer_1.58.0 readr_2.1.5
[28] quadprog_1.5-8 genefilter_1.80.3 askpass_1.2.0
[31] rappdirs_0.3.3 stringr_1.5.1 digest_0.6.35
[34] Rsamtools_2.14.0 illuminaio_0.40.0 siggenes_1.72.0
[37] GEOquery_2.66.0 pkgconfig_2.0.3 scrime_1.3.5
[40] sparseMatrixStats_1.10.0 limma_3.54.2 dbplyr_2.5.0
[43] fastmap_1.1.1 rlang_1.1.3 rstudioapi_0.15.0
[46] RSQLite_2.3.5 DelayedMatrixStats_1.20.0 BiocIO_1.8.0
[49] generics_0.1.3 mclust_6.0.1 BiocParallel_1.32.6
[52] dplyr_1.1.4 RCurl_1.98-1.14 magrittr_2.0.3
[55] GenomeInfoDbData_1.2.9 Matrix_1.6-5 Rcpp_1.0.12
[58] Rhdf5lib_1.20.0 fansi_1.0.6 lifecycle_1.0.4
[61] stringi_1.8.3 yaml_2.3.8 MASS_7.3-60.0.1
[64] zlibbioc_1.44.0 rhdf5_2.42.1 plyr_1.8.9
[67] BiocFileCache_2.6.1 grid_4.2.3 blob_1.2.4
[70] crayon_1.5.2 lattice_0.22-6 splines_4.2.3
[73] annotate_1.76.0 multtest_2.54.0 GenomicFeatures_1.50.4
[76] hms_1.1.3 KEGGREST_1.38.0 beanplot_1.3.1
[79] pillar_1.9.0 rjson_0.2.21 rngtools_1.5.2
[82] codetools_0.2-19 biomaRt_2.54.1 XML_3.99-0.16.1
[85] glue_1.7.0 BiocManager_1.30.22 data.table_1.15.2
[88] tzdb_0.4.0 png_0.1-8 vctrs_0.6.5
[91] purrr_1.0.2 tidyr_1.3.1 openssl_2.1.1
[94] reshape_0.8.9 cachem_1.0.8 xtable_1.8-4
[97] restfulr_0.0.15 survival_3.5-8 tibble_3.2.1
[100] GenomicAlignments_1.34.1 AnnotationDbi_1.60.2 memoise_2.0.1
Thank you for your response Basti ! I add all the idat files in a unique folder called "idat" and add it in my path
I dont't understand
I will try to create the basename with
read.metharray.sheet
because as you said I think i make mistake when i create them manuallyI think its work with
read.metharray.sheet
and after
Thank you !!!
This is indeed correct now !