getSex error even when sex is provided
1
0
Entering edit mode
fgc • 0
@fgc-16132
Last seen 3.4 years ago

Dear all, 

I have a question regarding the estimateCellCounts function in minfi and I would be very thankful for your help. 

I can read ist files in batches of each two files, so each time I call estimateCellCounts it has for two samples both red and green channel as RGset. If both samples are female, I get an error from the getSex function, even though I provided the correct sex in the format the preprocessQuantile requires when calling the function:

RGset <- read.metharray(filenames[i,], verbose=TRUE) 
RGset <- bgcorrect.illumina(RGset)  

est_wbc <- estimateCellCounts(RGset, compositeCellType = "Blood", cellTypes = c("CD8T","CD4T", "NK","Bcell","Mono","Gran"),sex = datsamples$MFGender[match(sample_names[i,],datsamples$Sentrix_Code)])
     #,referencePlatform=arraytype)

 In .getSex(CN = CN, xIndex = xIndex, yIndex = yIndex, cutoff = cutoff) :
  An inconsistency was encountered while determining sex. One possibility is that only one sex is present. We recommend further checks, for example with the plotSex function.
> print(sessionInfo())
R version 3.4.4 (2018-03-15)
Platform: both apple and linux (64-bit)
Running under: both apple and linux

Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib

locale:
[1] de_DE.UTF-8/de_DE.UTF-8/de_DE.UTF-8/C/de_DE.UTF-8/de_DE.UTF-8

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

other attached packages:
 [1] IlluminaHumanMethylation450kanno.ilmn12.hg19_0.6.0
 [2] IlluminaHumanMethylation450kmanifest_0.4.0        
 [3] FlowSorted.Blood.450k_1.16.0                      
 [4] IlluminaHumanMethylationEPICmanifest_0.3.0        
 [5] ggplot2_2.2.1                                     
 [6] DescTools_0.99.24                                 
 [7] limma_3.34.9                                      
 [8] minfi_1.24.0                                      
 [9] bumphunter_1.20.0                                 
[10] locfit_1.5-9.1                                    
[11] iterators_1.0.9                                   
[12] foreach_1.4.4                                     
[13] Biostrings_2.46.0                                 
[14] XVector_0.18.0                                    
[15] SummarizedExperiment_1.8.1                        
[16] DelayedArray_0.4.1                                
[17] matrixStats_0.53.1                                
[18] Biobase_2.38.0                                    
[19] GenomicRanges_1.30.3                              
[20] GenomeInfoDb_1.14.0                               
[21] IRanges_2.12.0                                    
[22] S4Vectors_0.16.0                                  
[23] BiocGenerics_0.24.0                               
[24] openxlsx_4.1.0                                    

loaded via a namespace (and not attached):
 [1] nlme_3.1-137             bitops_1.0-6            
 [3] bit64_0.9-7              RColorBrewer_1.1-2      
 [5] progress_1.1.2           httr_1.3.1              
 [7] tools_3.4.4              doRNG_1.6.6             
 [9] nor1mix_1.2-3            R6_2.2.2                
[11] lazyeval_0.2.1           colorspace_1.3-2        
[13] DBI_1.0.0                withr_2.1.2             
[15] tidyselect_0.2.4         prettyunits_1.0.2       
[17] RMySQL_0.10.15           base64_2.0              
[19] bit_1.1-14               compiler_3.4.4          
[21] preprocessCore_1.40.0    expm_0.999-2            
[23] xml2_1.2.0               pkgmaker_0.27           
[25] rtracklayer_1.38.3       scales_0.5.0            
[27] mvtnorm_1.0-8            readr_1.1.1             
[29] genefilter_1.60.0        quadprog_1.5-5          
[31] stringr_1.3.1            digest_0.6.15           
[33] Rsamtools_1.30.0         foreign_0.8-70          
[35] illuminaio_0.20.0        siggenes_1.52.0         
[37] GEOquery_2.46.15         pkgconfig_2.0.1         
[39] manipulate_1.0.1         bibtex_0.4.2            
[41] rlang_0.2.1              RSQLite_2.1.1           
[43] bindr_0.1.1              mclust_5.4              
[45] BiocParallel_1.12.0      dplyr_0.7.5             
[47] zip_1.0.0                RCurl_1.95-4.10         
[49] magrittr_1.5             GenomeInfoDbData_1.0.0  
[51] Matrix_1.2-14            munsell_0.4.3           
[53] Rcpp_0.12.17             stringi_1.2.2           
[55] yaml_2.1.19              MASS_7.3-50             
[57] zlibbioc_1.24.0          plyr_1.8.4              
[59] grid_3.4.4               blob_1.1.1              
[61] lattice_0.20-35          splines_3.4.4           
[63] multtest_2.34.0          GenomicFeatures_1.30.3  
[65] annotate_1.56.2          hms_0.4.2               
[67] beanplot_1.2             pillar_1.2.3            
[69] boot_1.3-20              rngtools_1.3.1          
[71] codetools_0.2-15         biomaRt_2.34.2          
[73] XML_3.98-1.11            glue_1.2.0              
[75] data.table_1.11.4        gtable_0.2.0            
[77] openssl_1.0.1            purrr_0.2.5             
[79] tidyr_0.8.1              reshape_0.8.7           
[81] assertthat_0.2.0         xtable_1.8-2            
[83] survival_2.42-3          tibble_1.4.2            
[85] GenomicAlignments_1.14.2 AnnotationDbi_1.40.0    
[87] registry_0.5             memoise_1.1.0           
[89] bindrcpp_0.2.2 

 

So how can I be sure that the cell count estimation is based on the true sex? 

How can I stop the function from calling getSex? 

Many thanks for any help! 

Best, fgc 

minfi estimatecellcounts getSex preprocessQuantile • 973 views
ADD COMMENT
0
Entering edit mode
@kasper-daniel-hansen-2979
Last seen 4 months ago
United States
This could well be a bug. Does it work if you just run your data through preprocessQuantile? Best, Kasper On Wed, Jun 20, 2018 at 3:13 PM, fgc [bioc] <noreply@bioconductor.org> wrote: > Activity on a post you are following on support.bioconductor.org > > User fgc <https: support.bioconductor.org="" u="" 16132=""/> wrote Question: > getSex error even when sex is provided > <https: support.bioconductor.org="" p="" 110184=""/>: > > Dear all, > > I have a question regarding the estimateCellCounts function in minfi and I > would be very thankful for your help. > > I can read ist files in batches of each two files, so each time I call > estimateCellCounts it has for two samples both red and green channel as > RGset. If both samples are female, I get an error from the getSex function, > even though I provided the correct sex in the format the preprocessQuantile > requires when calling the function: > > RGset <- read.metharray(filenames[i,], verbose=TRUE) > RGset <- bgcorrect.illumina(RGset) > > est_wbc <- estimateCellCounts(RGset, compositeCellType = "Blood", cellTypes = c("CD8T","CD4T", "NK","Bcell","Mono","Gran"),sex = datsamples$MFGender[match(sample_names[i,],datsamples$Sentrix_Code)]) > #,referencePlatform=arraytype) > > In .getSex(CN = CN, xIndex = xIndex, yIndex = yIndex, cutoff = cutoff) : > > An inconsistency was encountered while determining sex. One possibility is that only one sex is present. We recommend further checks, for example with the plotSex function. > > print(sessionInfo()) > R version 3.4.4 (2018-03-15) > Platform: *both apple and linux* (64-bit) > Running under: *both apple and linux* > > Matrix products: default > BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib > LAPACK: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib > > locale: > [1] de_DE.UTF-8/de_DE.UTF-8/de_DE.UTF-8/C/de_DE.UTF-8/de_DE.UTF-8 > > attached base packages: > [1] stats4 parallel stats graphics grDevices utils datasets > [8] methods base > > other attached packages: > [1] IlluminaHumanMethylation450kanno.ilmn12.hg19_0.6.0 > [2] IlluminaHumanMethylation450kmanifest_0.4.0 > [3] FlowSorted.Blood.450k_1.16.0 > [4] IlluminaHumanMethylationEPICmanifest_0.3.0 > [5] ggplot2_2.2.1 > [6] DescTools_0.99.24 > [7] limma_3.34.9 > [8] minfi_1.24.0 > [9] bumphunter_1.20.0 > [10] locfit_1.5-9.1 > [11] iterators_1.0.9 > [12] foreach_1.4.4 > [13] Biostrings_2.46.0 > [14] XVector_0.18.0 > [15] SummarizedExperiment_1.8.1 > [16] DelayedArray_0.4.1 > [17] matrixStats_0.53.1 > [18] Biobase_2.38.0 > [19] GenomicRanges_1.30.3 > [20] GenomeInfoDb_1.14.0 > [21] IRanges_2.12.0 > [22] S4Vectors_0.16.0 > [23] BiocGenerics_0.24.0 > [24] openxlsx_4.1.0 > > loaded via a namespace (and not attached): > [1] nlme_3.1-137 bitops_1.0-6 > [3] bit64_0.9-7 RColorBrewer_1.1-2 > [5] progress_1.1.2 httr_1.3.1 > [7] tools_3.4.4 doRNG_1.6.6 > [9] nor1mix_1.2-3 R6_2.2.2 > [11] lazyeval_0.2.1 colorspace_1.3-2 > [13] DBI_1.0.0 withr_2.1.2 > [15] tidyselect_0.2.4 prettyunits_1.0.2 > [17] RMySQL_0.10.15 base64_2.0 > [19] bit_1.1-14 compiler_3.4.4 > [21] preprocessCore_1.40.0 expm_0.999-2 > [23] xml2_1.2.0 pkgmaker_0.27 > [25] rtracklayer_1.38.3 scales_0.5.0 > [27] mvtnorm_1.0-8 readr_1.1.1 > [29] genefilter_1.60.0 quadprog_1.5-5 > [31] stringr_1.3.1 digest_0.6.15 > [33] Rsamtools_1.30.0 foreign_0.8-70 > [35] illuminaio_0.20.0 siggenes_1.52.0 > [37] GEOquery_2.46.15 pkgconfig_2.0.1 > [39] manipulate_1.0.1 bibtex_0.4.2 > [41] rlang_0.2.1 RSQLite_2.1.1 > [43] bindr_0.1.1 mclust_5.4 > [45] BiocParallel_1.12.0 dplyr_0.7.5 > [47] zip_1.0.0 RCurl_1.95-4.10 > [49] magrittr_1.5 GenomeInfoDbData_1.0.0 > [51] Matrix_1.2-14 munsell_0.4.3 > [53] Rcpp_0.12.17 stringi_1.2.2 > [55] yaml_2.1.19 MASS_7.3-50 > [57] zlibbioc_1.24.0 plyr_1.8.4 > [59] grid_3.4.4 blob_1.1.1 > [61] lattice_0.20-35 splines_3.4.4 > [63] multtest_2.34.0 GenomicFeatures_1.30.3 > [65] annotate_1.56.2 hms_0.4.2 > [67] beanplot_1.2 pillar_1.2.3 > [69] boot_1.3-20 rngtools_1.3.1 > [71] codetools_0.2-15 biomaRt_2.34.2 > [73] XML_3.98-1.11 glue_1.2.0 > [75] data.table_1.11.4 gtable_0.2.0 > [77] openssl_1.0.1 purrr_0.2.5 > [79] tidyr_0.8.1 reshape_0.8.7 > [81] assertthat_0.2.0 xtable_1.8-2 > [83] survival_2.42-3 tibble_1.4.2 > [85] GenomicAlignments_1.14.2 AnnotationDbi_1.40.0 > [87] registry_0.5 memoise_1.1.0 > [89] bindrcpp_0.2.2 > > > > So how can I be sure that the cell count estimation is based on the true > sex? > > How can I stop the function from calling getSex? > > Many thanks for any help! > > Best, Franziska > > ------------------------------ > > Post tags: minfi, estimatecellcounts, getSex, preprocessQuantile > > You may reply via email or visit https://support.bioconductor. > org/p/110184/ >
ADD COMMENT

Login before adding your answer.

Traffic: 647 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