HenrikBengtsson / aroma.affymetrix

🔬 R package: Analysis of Large Affymetrix Microarray Data Sets
https://cran.r-project.org/package=aroma.affymetrix
10 stars 3 forks source link

doCRMAv2() error:Do not know how to unwrap object: AromaUnitTotalCnBinarySet #40

Closed MimoriK closed 3 years ago

MimoriK commented 3 years ago

Since i cannot post any new question at https://groups.google.com/forum/?oldui=1#!forum/aroma-affymetrix, I am asking for your help here.

When i tried to run the example(https://www.aroma-project.org/vignettes/PairedPSCBS-lowlevel/), an error occurred.

here is the script:

library("aroma.affymetrix")
verbose <- Arguments$getVerbose(-10, timestamp=TRUE)
dataSet <- "GSE12702"
chipType <- "Mapping250K_Nsp"
csR <- AffymetrixCelSet$byName(dataSet, chipType=chipType)
pair <- c(T="GSM318736", N="GSM318737")
csR <- csR[indexOf(csR, pair)]
res <- doASCRMAv2(csR, verbose=verbose)

The error:

Exception: Do not know how to unwrap object: AromaUnitTotalCnBinarySet

  at #10. extract.default(ass, keep, onDuplicates = "error")
          - extract.default() is in environment 'R.utils'

  at #09. extract(ass, keep, onDuplicates = "error")
          - extract() is in environment 'R.utils'

  at #08. exportTotalAndFracB.SnpChipEffectSet(cesN, verbose = verbose, 
              fields = c("total", "fracB"))
          - exportTotalAndFracB.SnpChipEffectSet() is in environment 'aroma.affymetrix'

  at #07. NextMethod("exportTotalAndFracB", fields = fields)
          - NextMethod() is in environment 'base'

  at #06. exportTotalAndFracB.CnChipEffectSet(cesN, verbose = verbose)
          - exportTotalAndFracB.CnChipEffectSet() is in environment 'aroma.affymetrix'

  at #05. exportTotalAndFracB(cesN, verbose = verbose)
          - exportTotalAndFracB() is in environment 'aroma.affymetrix'

  at #04. doCRMAv2.AffymetrixCelSet(..., combineAlleles = FALSE)
          - doCRMAv2.AffymetrixCelSet() is in environment 'aroma.affymetrix'

  at #03. doCRMAv2(..., combineAlleles = FALSE)
          - doCRMAv2() is in environment 'aroma.affymetrix'

  at #02. doASCRMAv2.default(csR, verbose = verbose)
          - doASCRMAv2.default() is in environment 'aroma.affymetrix'

  at #01. doASCRMAv2(csR, verbose = verbose)
          - doASCRMAv2() is in environment 'aroma.affymetrix'

Error: Do not know how to unwrap object: AromaUnitTotalCnBinarySet
In addition: Warning messages:
1: In transform(y) : NaNs produced
2: In transform(y) : NaNs produced
3: In (function (...)  : NaNs produced

sessionInfo:

> sessionInfo()
R version 4.0.2 (2020-06-22)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Catalina 10.15.6

Matrix products: default
BLAS:   /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRlapack.dylib

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

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

other attached packages:
[1] aroma.light_3.18.0     aroma.affymetrix_3.2.0 affxparser_1.60.0      aroma.core_3.2.1       R.devices_2.16.1      
[6] R.filesets_2.13.0      R.utils_2.10.1         R.oo_1.24.0            R.methodsS3_1.8.1     

loaded via a namespace (and not attached):
 [1] DNAcopy_1.62.0     splines_4.0.2      aroma.apd_0.6.0    R.cache_0.14.0     globals_0.13.1     tools_4.0.2       
 [7] parallel_4.0.2     R.huge_0.9.0       xfun_0.18          tinytex_0.26       PSCBS_0.65.0       matrixStats_0.57.0
[13] digest_0.6.27      R.rsp_0.44.0       base64enc_0.1-3    codetools_0.2-16   sfit_0.3.1         compiler_4.0.2    
[19] future_1.19.1      listenv_0.8.0   

traceback:

> traceback()
15: stop(cond)
14: throw.Exception(Exception(...))
13: throw(Exception(...))
12: throw.default("Do not know how to unwrap object: ", class(x)[1L])
11: throw("Do not know how to unwrap object: ", class(x)[1L])
10: extract.default(ass, keep, onDuplicates = "error")
9: extract(ass, keep, onDuplicates = "error")
8: exportTotalAndFracB.SnpChipEffectSet(cesN, verbose = verbose, 
       fields = c("total", "fracB"))
7: NextMethod("exportTotalAndFracB", fields = fields)
6: exportTotalAndFracB.CnChipEffectSet(cesN, verbose = verbose)
5: exportTotalAndFracB(cesN, verbose = verbose)
4: doCRMAv2.AffymetrixCelSet(..., combineAlleles = FALSE)
3: doCRMAv2(..., combineAlleles = FALSE)
2: doASCRMAv2.default(csR, verbose = verbose)
1: doASCRMAv2(csR, verbose = verbose)

file path:

----annotationData----chipTypes----Mapping250K_Nsp----
Mapping250K_Nsp,HB20080710.acs         Mapping250K_Nsp,monocell.CDF           Mapping250K_Nsp,monocell.CDF.md5       Mapping250K_Nsp,na31,HB20101007.ufl        Mapping250K_Nsp,na31,HB20101007.ugp    
Mapping250K_Nsp,na31,HB20101007.ugp.md5         Mapping250K_Nsp.cdf
----rawData----GSE12702----Mapping250K_Nsp----
GSM318736.CEL   GSM318737.CEL

I also tried the CEL files of GenomeWideSNP_6 array with the latest annotation files(GenomeWideSNP_6,Full.cdf, GenomeWideSNP_6,Full,na35,hg19,dbSNP141,HB20170323.ugp, GenomeWideSNP_6,Full,na35,hg19,dbSNP141,HB20170323.ufl, GenomeWideSNP_6,HB20080710.acs), but the same error occurred.

I don't know how to solve this problem, please help me, thanks!

HenrikBengtsson commented 3 years ago

Hi. Thanks for reporting.

I can reproduce this. I'll try to fix this.

/Henrik

On Mon, Oct 26, 2020 at 3:22 AM Habu notifications@github.com wrote:

Since i cannot post any new question at https://groups.google.com/forum/?oldui=1#!forum/aroma-affymetrix, I am asking for your help here.

When i tried to run the example(https://www.aroma-project.org/vignettes/PairedPSCBS-lowlevel/), an error occurred.

here is the script:

library("aroma.affymetrix") verbose <- Arguments$getVerbose(-10, timestamp=TRUE) dataSet <- "GSE12702" chipType <- "Mapping250K_Nsp" csR <- AffymetrixCelSet$byName(dataSet, chipType=chipType) pair <- c(T="GSM318736", N="GSM318737") csR <- csR[indexOf(csR, pair)] res <- doASCRMAv2(csR, verbose=verbose)

The error:

Exception: Do not know how to unwrap object: AromaUnitTotalCnBinarySet

at #10. extract.default(ass, keep, onDuplicates = "error")

  • extract.default() is in environment 'R.utils'

    at #09. extract(ass, keep, onDuplicates = "error")

  • extract() is in environment 'R.utils'

    at #08. exportTotalAndFracB.SnpChipEffectSet(cesN, verbose = verbose, fields = c("total", "fracB"))

  • exportTotalAndFracB.SnpChipEffectSet() is in environment 'aroma.affymetrix'

    at #07. NextMethod("exportTotalAndFracB", fields = fields)

  • NextMethod() is in environment 'base'

    at #06. exportTotalAndFracB.CnChipEffectSet(cesN, verbose = verbose)

  • exportTotalAndFracB.CnChipEffectSet() is in environment 'aroma.affymetrix'

    at #05. exportTotalAndFracB(cesN, verbose = verbose)

  • exportTotalAndFracB() is in environment 'aroma.affymetrix'

    at #04. doCRMAv2.AffymetrixCelSet(..., combineAlleles = FALSE)

  • doCRMAv2.AffymetrixCelSet() is in environment 'aroma.affymetrix'

    at #03. doCRMAv2(..., combineAlleles = FALSE)

  • doCRMAv2() is in environment 'aroma.affymetrix'

    at #02. doASCRMAv2.default(csR, verbose = verbose)

  • doASCRMAv2.default() is in environment 'aroma.affymetrix'

    at #01. doASCRMAv2(csR, verbose = verbose)

  • doASCRMAv2() is in environment 'aroma.affymetrix'

Error: Do not know how to unwrap object: AromaUnitTotalCnBinarySet In addition: Warning messages: 1: In transform(y) : NaNs produced 2: In transform(y) : NaNs produced 3: In (function (...) : NaNs produced

sessionInfo:

sessionInfo() R version 4.0.2 (2020-06-22) Platform: x86_64-apple-darwin17.0 (64-bit) Running under: macOS Catalina 10.15.6

Matrix products: default BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib LAPACK: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRlapack.dylib

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

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

other attached packages: [1] aroma.light_3.18.0 aroma.affymetrix_3.2.0 affxparser_1.60.0 aroma.core_3.2.1 R.devices_2.16.1 [6] R.filesets_2.13.0 R.utils_2.10.1 R.oo_1.24.0 R.methodsS3_1.8.1

loaded via a namespace (and not attached): [1] DNAcopy_1.62.0 splines_4.0.2 aroma.apd_0.6.0 R.cache_0.14.0 globals_0.13.1 tools_4.0.2 [7] parallel_4.0.2 R.huge_0.9.0 xfun_0.18 tinytex_0.26 PSCBS_0.65.0 matrixStats_0.57.0 [13] digest_0.6.27 R.rsp_0.44.0 base64enc_0.1-3 codetools_0.2-16 sfit_0.3.1 compiler_4.0.2 [19] future_1.19.1 listenv_0.8.0

traceback:

traceback() 15: stop(cond) 14: throw.Exception(Exception(...)) 13: throw(Exception(...)) 12: throw.default("Do not know how to unwrap object: ", class(x)[1L]) 11: throw("Do not know how to unwrap object: ", class(x)[1L]) 10: extract.default(ass, keep, onDuplicates = "error") 9: extract(ass, keep, onDuplicates = "error") 8: exportTotalAndFracB.SnpChipEffectSet(cesN, verbose = verbose, fields = c("total", "fracB")) 7: NextMethod("exportTotalAndFracB", fields = fields) 6: exportTotalAndFracB.CnChipEffectSet(cesN, verbose = verbose) 5: exportTotalAndFracB(cesN, verbose = verbose) 4: doCRMAv2.AffymetrixCelSet(..., combineAlleles = FALSE) 3: doCRMAv2(..., combineAlleles = FALSE) 2: doASCRMAv2.default(csR, verbose = verbose) 1: doASCRMAv2(csR, verbose = verbose)

file path:

----annotationData----chipTypes----Mapping250K_Nsp---- Mapping250K_Nsp,HB20080710.acs Mapping250K_Nsp,monocell.CDF Mapping250K_Nsp,monocell.CDF.md5 Mapping250K_Nsp,na31,HB20101007.ufl Mapping250K_Nsp,na31,HB20101007.ugp Mapping250K_Nsp,na31,HB20101007.ugp.md5 Mapping250K_Nsp.cdf ----rawData----GSE12702----Mapping250K_Nsp---- GSM318736.CEL GSM318737.CEL

I also tried the CEL files of GenomeWideSNP_6 array with the latest annotation files(GenomeWideSNP_6,Full.cdf, GenomeWideSNP_6,Full,na35,hg19,dbSNP141,HB20170323.ugp, GenomeWideSNP_6,Full,na35,hg19,dbSNP141,HB20170323.ufl, GenomeWideSNP_6,HB20080710.acs), but the same error occurred.

I don't know how to solve this problem, please help me, thanks!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

HenrikBengtsson commented 3 years ago

Turns out this is a bug in the R.filesets package; I've fixed it there. Until a new version of R.filesets is on CRAN, you can install the bug fix using:

remotes::install_github("HenrikBengtsson/R.filesets", ref="develop")
HenrikBengtsson commented 3 years ago

FYI, R.filesets 2.14.0 that fixes this problem is now on CRAN. It'll probably be a few days before the macOS binaries are available but you can always install from source.