Error in exprs(object)[index, , drop = FALSE] : subscript out of bounds while using GCRMA
1
0
Entering edit mode
@deepakjuit-17132
Last seen 6.3 years ago

Hello, 

I am getting the error while using gcrma on wheat micro array data. 

> data 

size of arrays=1164x1164 features (20 kb)
cdf=wheat (61290 affyids)
number of samples=6
number of genes=61290
annotation=wheat
notes=

> dim(exprs(x))

1354896       6

> pData(x)
                      sample   treatment
CL_C_R_46.CEL CL_C_R_1   control
CL_C_R_47.CEL CL_C_R_2   control
CL_C_R_48.CEL CL_C_R_3   control
CL_S_R_40.CEL CL_S_R_1    stress
CL_S_R_41.CEL CL_S_R_2    stress
CL_S_R_42.CEL CL_S_R_3    stress

 > head(exprs(x))
  CL_C_R_46.CEL CL_C_R_47.CEL CL_C_R_48.CEL CL_S_R_40.CEL CL_S_R_41.CEL
1                 245                 198                 176                 298                 188
2                7596                6592                8318                6832                7159
3                 309                 257                 292                 319                 250
4                7727                6857                8359                7294                7538
5                 224                 204                  98                 137                 181
6                 153                 104                 135                 192                  84
  CL_S_R_42.CEL
1                 204
2                6404
3                 252
4                6578
5                 177
6                  98

As there are index in place of probe ids. 

> head(featureNames(data))
[1] "AFFX-BioB-3_at"  "AFFX-BioB-5_at"  "AFFX-BioB-M_at"  "AFFX-BioC-3_at"  "AFFX-BioC-5_at" 
[6] "AFFX-BioDn-3_at"
> length(featureNames(data))
[1] 61290

when I do normalization using gcrna i encounterd following error 

> my.affinity.info = compute.affinities2("wheat")
Computing affinities.Done.
Warning message:
xy2i is deprecated and will be removed in the next BioC release.
Use xy2indices in the affy package instead. 

my.affinity.info looks like below.. i think there is an error as size of array is 0 x 0

> my.affinity.info
AffyBatch object
size of arrays=0x0 features (16 kb)
cdf=wheat (61290 affyids)
number of samples=1
number of genes=61290
annotation=

 

 

> data.gcrma = gcrma(x,affinity.info=my.affinity.info)
Adjusting for optical effect......Done.
Error in exprs(object)[index, , drop = FALSE] : subscript out of bounds

 

Please help to solve the problem. any help appreciated. 

> sessioninfo()

R version 3.5.0 (2018-04-23)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows Server 2008 R2 x64 (build 7601) Service Pack 1

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252   
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C                          
[5] LC_TIME=English_United States.1252    

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

other attached packages:
[1] simpleaffy_2.56.0   gcrma_2.52.0        genefilter_1.62.0   affy_1.58.0         Biobase_2.40.0     
[6] BiocGenerics_0.26.0 wheatcdf_2.18.0    

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.18          AnnotationDbi_1.42.1  XVector_0.20.0        splines_3.5.0        
 [5] zlibbioc_1.26.0       IRanges_2.14.10       bit_1.1-14            lattice_0.20-35      
 [9] xtable_1.8-2          blob_1.1.1            tools_3.5.0           grid_3.5.0           
[13] DBI_1.0.0             survival_2.42-6       yaml_2.2.0            bit64_0.9-7          
[17] digest_0.6.15         preprocessCore_1.42.0 affyio_1.50.0         Matrix_1.2-14        
[21] bitops_1.0-6          S4Vectors_0.18.3      RCurl_1.95-4.11       memoise_1.1.0        
[25] RSQLite_2.1.1         compiler_3.5.0        BiocInstaller_1.30.0  Biostrings_2.48.0    
[29] XML_3.98-1.16         stats4_3.5.0          annotate_1.58.0      
 

 

gcrma wheatcdf cdf • 2.0k views
ADD COMMENT
0
Entering edit mode
@james-w-macdonald-5106
Last seen 1 day ago
United States

If you read the help page for compute.affinities, there is this:

 Use 'compute.affinities2' if there are no MM probes.

But you are using the Wheat Genome Array, which does have MM probes! Also, do note that you don't have to compute the affinities separately (particularly if you aren't doing anything but the default), and can just use gcrma directly.

> dat <- ReadAffy()
> eset <- gcrma(dat)
Adjusting for optical effect............Done.
Computing affinities.Done.
Adjusting for non-specific binding............Done.
Normalizing
Calculating Expression
> eset
ExpressionSet (storageMode: lockedEnvironment)
assayData: 61290 features, 12 samples
  element names: exprs
protocolData
  sampleNames: GSM675415.CEL.gz GSM675416.CEL.gz ... GSM675426.CEL.gz
    (12 total)
  varLabels: ScanDate
  varMetadata: labelDescription
phenoData
  sampleNames: GSM675415.CEL.gz GSM675416.CEL.gz ... GSM675426.CEL.gz
    (12 total)
  varLabels: sample
  varMetadata: labelDescription
featureData: none
experimentData: use 'experimentData(object)'
Annotation: wheat

> sessionInfo()
R version 3.5.0 (2018-04-23)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 17134)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.1252
[2] LC_CTYPE=English_United States.1252   
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C                          
[5] LC_TIME=English_United States.1252    

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

other attached packages:
 [1] GEOquery_2.48.0      wheatprobe_2.18.0    AnnotationDbi_1.42.1
 [4] IRanges_2.14.10      S4Vectors_0.18.3     wheatcdf_2.18.0     
 [7] gcrma_2.52.0         affy_1.58.0          Biobase_2.40.0      
[10] BiocGenerics_0.26.0

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.18          BiocInstaller_1.30.0  compiler_3.5.0       
 [4] pillar_1.3.0          XVector_0.20.0        bindr_0.1.1          
 [7] tools_3.5.0           zlibbioc_1.26.0       digest_0.6.15        
[10] bit_1.1-14            RSQLite_2.1.1         memoise_1.1.0        
[13] preprocessCore_1.42.0 tibble_1.4.2          pkgconfig_2.0.1      
[16] rlang_0.2.1           DBI_1.0.0             curl_3.2             
[19] bindrcpp_0.2.2        xml2_1.2.0            dplyr_0.7.6          
[22] hms_0.4.2             Biostrings_2.48.0     bit64_0.9-7          
[25] tidyselect_0.2.4      glue_1.3.0            R6_2.2.2             
[28] limma_3.36.2          tidyr_0.8.1           readr_1.1.1          
[31] purrr_0.2.5           blob_1.1.1            magrittr_1.5         
[34] splines_3.5.0         assertthat_0.2.0      crayon_1.3.4         
[37] affyio_1.50.0       
ADD COMMENT

Login before adding your answer.

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