2
$\begingroup$

I would like to plot using estimateCellCounts as I do not know my cell counts for the blood samples I am using however, it seem that I cannot get estimateCellCounts to work with EPIC arrays.

Detailing Attempts:

Attempt 1:

  • I first attempted it with EPIC arrays but it wouldn't take it.
estimateCellCounts(RGset, 
                   compositeCellType = "Blood",
                   processMethod = "auto", 
                   probeSelect = "auto",
                   cellTypes = c("Bcell", 
                                 "CD4T", 
                                 "CD8T", 
                                 "Eos", 
                                 "Gran", 
                                 "Mono", 
                                 "Neu", 
                                 "NK"
                                ),
                   referencePlatform = "IlluminaHumanMethylationEPIC",
                   returnAll = TRUE,
                   meanPlot = TRUE,
                   verbose = TRUE)

And the associated error:

Loading required package: FlowSorted.Blood.EPIC
Loading required package: ExperimentHub
Loading required package: AnnotationHub
Loading required package: BiocFileCache
Loading required package: dbplyr

Attaching package: 'AnnotationHub'

The following object is masked from 'package:Biobase':
    cache

Warning message in data(list = referencePkg):
"data set 'FlowSorted.Blood.EPIC' not found"
Error in get(referencePkg): object 'FlowSorted.Blood.EPIC' not found
Traceback:
1. estimateCellCounts(RGset, compositeCellType = "Blood", processMethod = "auto", 
 .     probeSelect = "auto", cellTypes = c("Bcell", "CD4T", "CD8T", 
 .         "Eos", "Gran", "Mono", "Neu", "NK"), referencePlatform = "IlluminaHumanMethylationEPIC", 
 .     returnAll = TRUE, meanPlot = TRUE, verbose = TRUE)
2. get(referencePkg)
3. get(referencePkg)

Adding the library("FlowSorted.Blood.EPIC") did not stop the error "data set 'FlowSorted.Blood.EPIC' not found".

Attempt 2:

  1. Then, I looked up the error I got first on Github and found that converting to 450k was recommended. So I used the convertArray.
  2. Then it threw up an error saying "FlowSorted.Blood.450k" was not installed.

Attempt 3:

So I installed and loaded the library and re-ran to get the code below and the error below. However, this does not change the issue that it does not seem to run. The code I used and the error is below - any suggestions are appreciated:

library("FlowSorted.Blood.450k")

RGset_450k = convertArray(RGset, 
                          outType = c("IlluminaHumanMethylation450k"),
                          verbose = TRUE
                         ) 

estimateCellCounts(RGset_450k, 
                   compositeCellType = "Blood",
                   processMethod = "auto", 
                   probeSelect = "auto",
                   cellTypes = c("Bcell", 
                                 "CD4T", 
                                 "CD8T", 
                                 "Eos", 
                                 "Gran", 
                                 "Mono", 
                                 "Neu", 
                                 "NK"
                                ),
                   referencePlatform = "IlluminaHumanMethylation450k",
                   returnAll = TRUE,
                   meanPlot = TRUE,
                   verbose = TRUE)

Error:

Error in p[trainingProbes, ]: subscript out of bounds
Traceback:

1. estimateCellCounts(RGset_450k, compositeCellType = "Blood", processMethod = "auto", 
 .     probeSelect = "auto", cellTypes = c("Bcell", "CD4T", "CD8T", 
 .         "Eos", "Gran", "Mono", "Neu", "NK"), referencePlatform = "IlluminaHumanMethylation450k", 
 .     returnAll = TRUE, meanPlot = TRUE, verbose = TRUE)

How would I make it get around this error as it does not output any results? Any suggestions/solutions are appreciated.

$\endgroup$
2
  • $\begingroup$ Seems that one person found that there was an issue with NAs ( support.bioconductor.org/p/9148370 ) I am not sure if this is the case for me but adding this here as a comment just in case someone else has this issue with the NAs. The pull request seems to not have been approved yet. $\endgroup$
    – Indira
    Commented Jul 18, 2023 at 17:25
  • $\begingroup$ I added source("/path/to/Forked_Minfi/R/estimateCellCounts.R") before the estimateCellCounts but I get the following error after running the command Error in .isMatrixBackedOrStop(rgSet, "estimateCellCounts"): could not find function ".isMatrixBackedOrStop" Traceback: 1. estimateCellCounts(RGset_450k, compositeCellType = "Blood", processMethod = "auto", . probeSelect = "auto", cellTypes = c("Bcell", "CD4T", "CD8T", . "Eos", "Gran", "Mono", "Neu", "NK"), referencePlatform = "IlluminaHumanMethylation450k", . returnAll = TRUE, meanPlot = TRUE, verbose = TRUE) $\endgroup$
    – Indira
    Commented Jul 18, 2023 at 18:40

1 Answer 1

2
$\begingroup$

I am the developer of FlowSorted.Blood.EPIC, I will try to provide you with some guidance. First, the FlowSorted.Blood.EPIC is located on ExperimentHub, which means that you need to ask the program to download the database first before running estimateCellCounts (minfi) or estimateCellCounts2 (FlowSorted.Blood.EPIC).

For estimateCellCounts2, I explain this here if you are using a 450K array GitHub FlowSorted.Blood.EPIC. If you are using EPIC you can read the help file of estimateCellCounts2. Although we believe our method improves the cell estimates, you can load the library and use minfi's "auto" selection or the same option on estimateCellCounts2 (that is your decision as a user of the library).

library(FlowSorted.Blood.EPIC)
FlowSorted.Blood.EPIC <-
    libraryDataGet("FlowSorted.Blood.EPIC")
FlowSorted.Blood.EPIC

Then you can run estimateCellCounts according to minfi's help.

Good luck.

$\endgroup$
2
  • $\begingroup$ Welcome to the site @LucasSalas and thank you for your comprehensive response, much appreciated. $\endgroup$
    – M__
    Commented Aug 18, 2023 at 13:38
  • $\begingroup$ Thank you so much @Lucas Salas $\endgroup$
    – Indira
    Commented Aug 18, 2023 at 21:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.