xy2indices in Affy package : nr or nc parameter
1
0
Entering edit mode
VeloSand • 0
@velosand-9107
Last seen 4.5 years ago
France

Hi,

I'm having trouble when using the xy2indices function of affy package. In version 1.40.0 of affy, one parameter for this function was nr (number of rows on the chip). In the version I'm currently using 1.48.0 (but it was already the case in version 1.46.1), this parameter doesn't exist anymore and seems to be replaced by nc (number of columns on the chip).

Moreover when I'm trying to indicate the number of columns in the nc parameters, the indices seem wrong. Hereafter is an example.

> # X positions from 1 to 4 i.e. 5 rows

> x=c(1,2,3,4,5,1,2,3,4,5,1,2,3,4,5)

> # Y positions from 1 to 3 i.e. 3 columns

> y=c(1,1,1,1,1,2,2,2,2,2,3,3,3,3,3)

> # What I thought would work

> xy2indices(x-1,y-1,nc=3)

 [1]  1  2  3  4  5  4  5  6  7  8  7  8  9 10 11

> # What seems to work

> xy2indices(x-1,y-1,nc=5)

 [1]  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15

It looks like the parameter is now called number of columns but should still contain the number of rows. Am I using it in the wrong way?

For Info

> sessionInfo()
R version 3.2.1 (2015-06-18)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1

locale:
[1] LC_COLLATE=French_France.1252  LC_CTYPE=French_France.1252    LC_MONETARY=French_France.1252
[4] LC_NUMERIC=C                   LC_TIME=French_France.1252    

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

other attached packages:
 [1] psych_1.5.8           car_2.1-0             mixOmics_5.1.2        ggplot2_1.0.1         MASS_7.3-44          
 [6] RColorBrewer_1.1-2    geneplotter_1.48.0    annotate_1.48.0       XML_3.98-1.3          lattice_0.20-33      
[11] ABarray_1.38.0        multtest_2.26.0       affyPLM_1.46.0        preprocessCore_1.32.0 gcrma_2.42.0         
[16] affy_1.48.0           limma_3.26.1          org.EcK12.eg.db_3.2.3 RSQLite_1.0.0         DBI_0.3.1            
[21] AnnotationDbi_1.32.0  IRanges_2.4.1         S4Vectors_0.8.0       Biobase_2.30.0        BiocGenerics_0.16.0  

loaded via a namespace (and not attached):
 [1] reshape2_1.4.1       splines_3.2.1        tcltk_3.2.1          colorspace_1.2-6     mgcv_1.8-9          
 [6] survival_2.38-3      nloptr_1.0.4         affyio_1.40.0        plyr_1.8.3           stringr_1.0.0       
[11] zlibbioc_1.16.0      Biostrings_2.38.0    MatrixModels_0.4-1   munsell_0.4.2        gtable_0.1.2        
[16] SparseM_1.7          BiocInstaller_1.20.0 quantreg_5.19        pbkrtest_0.4-2       proto_0.3-10        
[21] Rcpp_0.12.1          xtable_1.8-0         scales_0.3.0         XVector_0.10.0       lme4_1.1-10         
[26] mnormt_1.5-3         ellipse_0.3-8        digest_0.6.8         stringi_1.0-1        grid_3.2.1          
[31] tools_3.2.1          magrittr_1.5         rgl_0.95.1367        pheatmap_1.0.7       Matrix_1.2-2        
[36] minqa_1.2.4          nnet_7.3-11          igraph_1.0.1         nlme_3.1-122        

 

Thanks in advance for your answers.

xy2indices affy • 668 views
ADD COMMENT
0
Entering edit mode
@james-w-macdonald-5106
Last seen 21 hours ago
United States

This issue was really contentious in the past, primarily because it's sort of confusing. But note that what you are specifying is 3 ROWS and 5 COLUMNS, not the opposite. This comes from the fact that the Affy scanner scans things by row, like this, where each number indicates when the feature is scanned:

1 2 3 4 5
6 7 8 9 10

So those are the indices. Now the x-coordinates are the horizontal positions, and the y-coordinates are the vertical positions, counting from the top left corner. So 1 is at (1,1), and 2 is at (2,1), and 3 is at (3,1). And if you specify x = c(1,2,3,4,5,1,2,3,4,5,1,2,3,4,5) and y = c(1,1,1,1,1,2,2,2,2,2,3,3,3,3,3), you are saying there are 5 columns (1-5) and three rows (1-3).

This actually doesn't matter for the vast majority of arrays that the affy package is intended to measure, as IIRC, all of the 3'-biased arrays are square, so nc == nr. We just ran into problems when we started using the affy package for newer generation arrays, which are sometimes rectangular.

ADD COMMENT

Login before adding your answer.

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