Estimating Cell Counts for EPIC V2 array data
1
0
Entering edit mode
Kim • 0
@27710395
Last seen 1 day ago
United States

Hi Everyone, Im trying to deconvolute cell types for EPICV2 Array data, and am having issues with both minifi's estimateCellCounts function and the Flow.Sorted.Blood.Epic estimateCellCounts2 functions.

propEPIC<-estimateCellCounts2(rgSetFlt, compositeCellType = "Blood", 
                                processMethod = "preprocessNoob",
                                probeSelect = "IDOL", 
                                cellTypes = c("CD8T", "CD4T", "NK", "Bcell", 
                                "Mono", "Neu"))

Running this and estimateCellCounts in minifi both give me the same .convertArray_450k_epic error:


snapshotDate(): 2022-10-31
snapshotDate(): 2022-10-31
see ?FlowSorted.Blood.EPIC and browseVignettes('FlowSorted.Blood.EPIC') for documentation
loading from cache
[convertArray] Casting as IlluminaHumanMethylationEPIC
Error in .convertArray_450k_epic(rgSet = object, outType = outType, verbose = verbose) : 
  .is450k(rgSet) || .isEPIC(rgSet) is not TRUE

Is this because of the IlluminaHumanMethylationEPICv2 Annotation I am using? Thanks in advance for any help!

rgSetFlt
class: RGChannelSet 
dim: 1105209 219 
metadata(0):
assays(2): Green Red
rownames(1105209): 1600157 1600179 ... 99810982 99810990
rowData names(0):
colnames(219): 207925050049_R07C01 207882990112_R05C01 ...
  207865030003_R05C01 207865030077_R04C01
colData names(15): Sample_Name Sample_Plate ... Basename filenames
Annotation
  array: IlluminaHumanMethylationEPICv2
  annotation: 20a1.hg38

Session Info:

 sessionInfo( )
R version 4.2.2 (2022-10-31)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)

Matrix products: default
BLAS/LAPACK: /u/local/compilers/intel/oneapi/2022.1.1/mkl/2022.0.1/lib/intel64/libmkl_gf_lp64.so.2

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

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

other attached packages:
 [1] IlluminaHumanMethylationEPICv2manifest_0.99.1      
 [2] IlluminaHumanMethylationEPICmanifest_0.3.0         
 [3] FlowSorted.Blood.EPIC_2.2.0                        
 [4] methylCC_1.12.0                                    
 [5] FlowSorted.Blood.450k_1.36.0                       
 [6] remotes_2.4.2.1                                    
 [7] RColorBrewer_1.1-3                                 
 [8] DMRcatedata_2.16.0                                 
 [9] ExperimentHub_2.6.0                                
[10] AnnotationHub_3.6.0                                
[11] BiocFileCache_2.11.1                               
[12] dbplyr_2.4.0                                       
[13] mCSEA_1.18.0                                       
[14] Homo.sapiens_1.3.1                                 
[15] TxDb.Hsapiens.UCSC.hg19.knownGene_3.2.2            
[16] org.Hs.eg.db_3.16.0                                
[17] GO.db_3.16.0                                       
[18] OrganismDbi_1.40.0                                 
[19] GenomicFeatures_1.50.4                             
[20] AnnotationDbi_1.60.2                               
[21] mCSEAdata_1.18.0                                   
[22] DMRcate_2.12.0                                     
[23] Gviz_1.42.1                                        
[24] minfiData_0.44.0                                   
[25] IlluminaHumanMethylation450kmanifest_0.4.0         
[26] missMethyl_1.32.1                                  
[27] IlluminaHumanMethylationEPICanno.ilm10b4.hg19_0.6.0
[28] IlluminaHumanMethylation450kanno.ilmn12.hg19_0.6.1 
[29] minfi_1.44.0                                       
[30] bumphunter_1.40.0                                  
[31] locfit_1.5-9.8                                     
[32] iterators_1.0.14                                   
[33] foreach_1.5.2                                      
[34] Biostrings_2.66.0                                  
[35] XVector_0.38.0                                     
[36] SummarizedExperiment_1.28.0                        
[37] Biobase_2.58.0                                     
[38] MatrixGenerics_1.10.0                              
[39] matrixStats_1.1.0                                  
[40] GenomicRanges_1.50.2                               
[41] GenomeInfoDb_1.34.9                                
[42] IRanges_2.32.0                                     
[43] S4Vectors_0.36.2                                   
[44] BiocGenerics_0.44.0                                
[45] limma_3.54.2                                       
[46] lubridate_1.9.3                                    
[47] forcats_1.0.0                                      
[48] stringr_1.5.1                                      
[49] dplyr_1.1.4                                        
[50] purrr_1.0.2                                        
[51] readr_2.1.5                                        
[52] tidyr_1.3.1                                        
[53] tibble_3.2.1                                       
[54] ggplot2_3.5.0                                      
[55] tidyverse_2.0.0                                    
[56] BiocManager_1.30.22                                

loaded via a namespace (and not attached):
  [1] rappdirs_0.3.3                rtracklayer_1.58.0           
  [3] R.methodsS3_1.8.2             bit64_4.0.5                  
  [5] knitr_1.45                    DelayedArray_0.24.0          
  [7] R.utils_2.12.3                data.table_1.15.0            
  [9] rpart_4.1.19                  KEGGREST_1.38.0              
 [11] RCurl_1.98-1.14               GEOquery_2.66.0              
 [13] AnnotationFilter_1.22.0       generics_0.1.3               
 [15] preprocessCore_1.60.2         RSQLite_2.3.5                
 [17] bit_4.0.5                     tzdb_0.4.0                   
 [19] xml2_1.3.6                    httpuv_1.6.14                
 [21] xfun_0.42                     hms_1.1.3                    
 [23] evaluate_0.23                 promises_1.2.1               
 [25] fansi_1.0.6                   restfulr_0.0.15              
 [27] scrime_1.3.5                  progress_1.2.3               
 [29] readxl_1.4.3                  DBI_1.2.2                    
 [31] htmlwidgets_1.6.4             reshape_0.8.9                
 [33] ellipsis_0.3.2                backports_1.4.1              
 [35] permute_0.9-7                 annotate_1.76.0              
 [37] biomaRt_2.54.1                deldir_2.0-4                 
 [39] sparseMatrixStats_1.10.0      vctrs_0.6.5                  
 [41] ensembldb_2.22.0              cachem_1.0.8                 
 [43] withr_3.0.0                   BSgenome_1.66.3              
 [45] checkmate_2.3.1               GenomicAlignments_1.34.1     
 [47] prettyunits_1.2.0             mclust_6.1                   
 [49] cluster_2.1.4                 lazyeval_0.2.2               
 [51] crayon_1.5.2                  genefilter_1.80.3            
 [53] edgeR_3.40.2                  pkgconfig_2.0.3              
 [55] nlme_3.1-160                  ProtGenerics_1.30.0          
 [57] nnet_7.3-18                   rlang_1.1.3                  
 [59] lifecycle_1.0.4               filelock_1.0.3               
 [61] dichromat_2.0-0.1             cellranger_1.1.0             
 [63] graph_1.76.0                  rngtools_1.5.2               
 [65] base64_2.0.1                  Matrix_1.5-1                 
 [67] Rhdf5lib_1.20.0               base64enc_0.1-3              
 [69] png_0.1-8                     rjson_0.2.21                 
 [71] bitops_1.0-7                  R.oo_1.26.0                  
 [73] rhdf5filters_1.10.1           blob_1.2.4                   
 [75] DelayedMatrixStats_1.20.0     doRNG_1.8.6                  
 [77] nor1mix_1.3-2                 jpeg_0.1-10                  
 [79] scales_1.3.0                  memoise_2.0.1                
 [81] magrittr_2.0.3                plyr_1.8.9                   
 [83] zlibbioc_1.44.0               compiler_4.2.2               
 [85] BiocIO_1.8.0                  illuminaio_0.40.0            
 [87] Rsamtools_2.14.0              cli_3.6.2                    
 [89] DSS_2.46.0                    htmlTable_2.4.2              
 [91] Formula_1.2-5                 MASS_7.3-58.1                
 [93] tidyselect_1.2.0              stringi_1.8.3                
 [95] yaml_2.3.8                    askpass_1.2.0                
 [97] latticeExtra_0.6-30           VariantAnnotation_1.44.1     
 [99] tools_4.2.2                   timechange_0.3.0             
[101] rstudioapi_0.15.0             foreign_0.8-83               
[103] bsseq_1.34.0                  gridExtra_2.3                
[105] plyranges_1.18.0              digest_0.6.34                
[107] shiny_1.8.0                   quadprog_1.5-8               
[109] Rcpp_1.0.12                   siggenes_1.72.0              
[111] BiocVersion_3.16.0            later_1.3.2                  
[113] httr_1.4.7                    biovizBase_1.46.0            
[115] colorspace_2.1-0              XML_3.99-0.16.1              
[117] splines_4.2.2                 RBGL_1.74.0                  
[119] statmod_1.5.0                 multtest_2.54.0              
[121] xtable_1.8-4                  R6_2.5.1                     
[123] Hmisc_5.1-1                   pillar_1.9.0                 
[125] htmltools_0.5.7               mime_0.12                    
[127] glue_1.7.0                    fastmap_1.1.1                
[129] BiocParallel_1.32.6           interactiveDisplayBase_1.36.0
[131] beanplot_1.3.1                codetools_0.2-18             
[133] utf8_1.2.4                    lattice_0.20-45              
[135] curl_5.2.0                    gtools_3.9.5                 
[137] openssl_2.1.1                 interp_1.1-6                 
[139] survival_3.4-0                rmarkdown_2.25               
[141] munsell_0.5.0                 rhdf5_2.42.1                 
[143] GenomeInfoDbData_1.2.9        HDF5Array_1.26.0             
[145] gtable_0.3.4
FlowSorted.Blood.EPIC minifi • 488 views
ADD COMMENT
3
Entering edit mode
@james-w-macdonald-5106
Last seen 11 hours ago
United States

See here. In particular the answer from Jan 9

1
Entering edit mode

Thank you, James. That is correct. I am a bit nervous about including non-Bioconductor packages in the pipeline. Please see below for the current solution.

devtools::install_github("jokergoo/IlluminaHumanMethylationEPICv2manifest") 
devtools::install_github("jokergoo/IlluminaHumanMethylationEPICv2anno.20a1.hg38")


library(minfi)
library(sesame) #library(ENmix)
library(IlluminaHumanMethylationEPICanno.ilm10b4.hg19)
library(IlluminaHumanMethylationEPICv2anno.20a1.hg38)
library(IlluminaHumanMethylationEPICv2manifest)

##############################
# Load RGset
RGset = read.metharray.exp(workdir,recursive = TRUE)

annotation(RGset)["array"] = "IlluminaHumanMethylationEPICv2"
annotation(RGset)["annotation"] = "20a1.hg38"

MSet <-preprocessNoob(RGset)

Betas<-getBeta(MSet)
Betas<- sesame::betasCollapseToPfx(Betas) #you can also use ENmix::rm.cgsuffix(Betas) or other function to remove replicates 


library(FlowSorted.Blood.EPIC)
IDOLOptimizedCpGsBloodv2<- IDOLOptimizedCpGs[which(IDOLOptimizedCpGs%in%rownames(Betas))]
identical(rownames(IDOLOptimizedCpGs.compTable[IDOLOptimizedCpGsBloodv2,]), IDOLOptimizedCpGsBloodv2)
propEPIC <- projectCellType_CP(
    Betas[IDOLOptimizedCpGsBloodv2, ],
    IDOLOptimizedCpGs.compTable[IDOLOptimizedCpGsBloodv2,],
    contrastWBC = NULL, nonnegative = TRUE,
    lessThanOne = FALSE
)
ADD REPLY
2
Entering edit mode

Yes, we should probably see if Zuguang Gu will submit those.

ADD REPLY
0
Entering edit mode

Thank you so much James and Lucas! The solution posted works and now I have the cell proportions. Really appreciate the help!

ADD REPLY

Login before adding your answer.

Traffic: 631 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

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

Powered by the version 2.3.6