text: user156: The latest version of Albacore from Oxford Nanopore Technologies calls bases from raw fast5 files. A useful piece of output is the sequence_summary.txt, which is a big tab-delimited file with information on each read. 
  One of the columns in there is the channel, which references the channel number from 1 to 512 on the flowcell. 
  These channels obviously have a physical layout on the flowcell. What is the layout? I.e. how many channels are there per row and per column, and how do the channel numbers map to the rows and columns?
  My best guess is that it's a 16*32 array, but I don't know for sure, and even if I did I wouldn't know whether the channels map across the shorter or the longer axis in order (or maybe they are not in order at all, but that would be silly).
  
  user681: poRe has a show.layout() function which shows you the 32*16 grid on which the channels are arranged. EDIT: THIS APPEARS NOT TO BE THE CORRECT PHYSICAL LAYOUT.
       [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13]
   [1,]  125  121  117  113  109  105  101   97   93    89    85    81    77
   [2,]  126  122  118  114  110  106  102   98   94    90    86    82    78
   [3,]  127  123  119  115  111  107  103   99   95    91    87    83    79
   [4,]  128  124  120  116  112  108  104  100   96    92    88    84    80
   [5,]  253  249  245  241  237  233  229  225  221   217   213   209   205
   [6,]  254  250  246  242  238  234  230  226  222   218   214   210   206
   [7,]  255  251  247  243  239  235  231  227  223   219   215   211   207
   [8,]  256  252  248  244  240  236  232  228  224   220   216   212   208
   [9,]  381  377  373  369  365  361  357  353  349   345   341   337   333
  [10,]  382  378  374  370  366  362  358  354  350   346   342   338   334
  [11,]  383  379  375  371  367  363  359  355  351   347   343   339   335
  [12,]  384  380  376  372  368  364  360  356  352   348   344   340   336
  [13,]  509  505  501  497  493  489  485  481  477   473   469   465   461
  [14,]  510  506  502  498  494  490  486  482  478   474   470   466   462
  [15,]  511  507  503  499  495  491  487  483  479   475   471   467   463
  [16,]  512  508  504  500  496  492  488  484  480   476   472   468   464
        [,14] [,15] [,16] [,17] [,18] [,19] [,20] [,21] [,22] [,23] [,24] [,25]
   [1,]    73    69    65    61    57    53    49    45    41    37    33    29
   [2,]    74    70    66    62    58    54    50    46    42    38    34    30
   [3,]    75    71    67    63    59    55    51    47    43    39    35    31
   [4,]    76    72    68    64    60    56    52    48    44    40    36    32
   [5,]   201   197   193   189   185   181   177   173   169   165   161   157
   [6,]   202   198   194   190   186   182   178   174   170   166   162   158
   [7,]   203   199   195   191   187   183   179   175   171   167   163   159
   [8,]   204   200   196   192   188   184   180   176   172   168   164   160
   [9,]   329   325   321   317   313   309   305   301   297   293   289   285
  [10,]   330   326   322   318   314   310   306   302   298   294   290   286
  [11,]   331   327   323   319   315   311   307   303   299   295   291   287
  [12,]   332   328   324   320   316   312   308   304   300   296   292   288
  [13,]   457   453   449   445   441   437   433   429   425   421   417   413
  [14,]   458   454   450   446   442   438   434   430   426   422   418   414
  [15,]   459   455   451   447   443   439   435   431   427   423   419   415
  [16,]   460   456   452   448   444   440   436   432   428   424   420   416
        [,26] [,27] [,28] [,29] [,30] [,31] [,32]
   [1,]    25    21    17    13     9     5     1
   [2,]    26    22    18    14    10     6     2
   [3,]    27    23    19    15    11     7     3
   [4,]    28    24    20    16    12     8     4
   [5,]   153   149   145   141   137   133   129
   [6,]   154   150   146   142   138   134   130
   [7,]   155   151   147   143   139   135   131
   [8,]   156   152   148   144   140   136   132
   [9,]   281   277   273   269   265   261   257
  [10,]   282   278   274   270   266   262   258
  [11,]   283   279   275   271   267   263   259
  [12,]   284   280   276   272   268   264   260
  [13,]   409   405   401   397   393   389   385
  [14,]   410   406   402   398   394   390   386
  [15,]   411   407   403   399   395   391   387
  [16,]   412   408   404   400   396   392   388
  
  
  user73: There are actually 2048 usable sequencing wells, hexagonally packed with four wells connected to the same sequencing sensor/channel via a multiplex (mux) selector. The combination of the mux and the channel number determines the physical location of the well. Unfortunately, the association between channel number and physical location is not obvious, and within each channel the muxes are also not in an obvious order, i.e. [3,4,1,2,2,1,4,3] for two adjacent channels.
  Here's an "official" text description of the layout as it was for R7; it hasn't changed for the most recent flow cells (R9.5):
  
  Channels 1-64 occur at the top of the chip (the other low channel numbers are at the bottom)
  Channels order down the chip: 1-64, 449-512, 385-448, 321-384, 257-320, 193-256, 129-192, 65-128
  Muxes run from left to right in the order: 3, 4, 1, 2, 2, 1, 4, 3
  
  To confirm this layout, I pulled the channel/position lookup table definitions out of MinKNOW, and it seems to be the same as this:
  
  Here's the code to produce this image (I haven't adjusted it to have a hexagonal structure):
  #!/usr/bin/Rscript
  library(rjson);
  
  layout.fname <- "/opt/ONT/MinKNOW/Client/resources/app/resources/channels.json";
  
  data.list <- fromJSON(file=layout.fname);
  
  png("MinION_FC_Layout.png", width=3072, height=1536, pointsize=24);
  par(mar=c(4,4,0.5,0.5), lwd=3);
  data.mat <- matrix(unlist(data.list), ncol=2, byrow=TRUE);
  plot(data.mat, pch=21,
       bg=(colorRampPalette(c("white","grey"))(2048))[1:2048],
       col=c("red","yellow","green","blue"),
       xlab="locX", ylab="locY", cex=2,
       xlim=c(7,76), ylim=c(0,33));
  text(x=data.mat, labels=rep(1:512, each=4), cex=0.4);
  legend("top",legend=c(1,2,3,4), fill=c("red","yellow","green","blue"),
         inset=0.05, title="MUX");
  text(x=6, y=data.mat[data.mat[,1] == 8,2],
       labels = ceiling(which(data.mat[,1] == 8) / 4));
  text(x=77, y=data.mat[data.mat[,1] == 75,2],
       labels = ceiling(which(data.mat[,1] == 75) / 4));
  arrows(x0=c(8,75), x1=c(39,44), y0=33, length=0.2);
  invisible(dev.off());
  
  
original_text: 156: <p>The latest version of Albacore from Oxford Nanopore Technologies calls bases from raw fast5 files. A useful piece of output is the <code>sequence_summary.txt</code>, which is a big tab-delimited file with information on each read. </p>
  
  <p>One of the columns in there is the <code>channel</code>, which references the channel number from 1 to 512 on the flowcell. </p>
  
  <p>These channels obviously have a physical layout on the flowcell. What is the layout? I.e. how many channels are there per row and per column, and how do the channel numbers map to the rows and columns?</p>
  
  <p>My best guess is that it's a 16*32 array, but I don't know for sure, and even if I did I wouldn't know whether the <code>channels</code> map across the shorter or the longer axis in order (or maybe they are not in order at all, but that would be silly).</p>
   681: <p><a href="https://github.com/mw55309/poRe_docs" rel="nofollow noreferrer">poRe</a> has a <code>show.layout()</code> function which shows you the 32*16 grid on which the channels are arranged. EDIT: THIS APPEARS NOT TO BE THE CORRECT PHYSICAL LAYOUT.</p>
  
  <pre><code>     [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12] [,13]
   [1,]  125  121  117  113  109  105  101   97   93    89    85    81    77
   [2,]  126  122  118  114  110  106  102   98   94    90    86    82    78
   [3,]  127  123  119  115  111  107  103   99   95    91    87    83    79
   [4,]  128  124  120  116  112  108  104  100   96    92    88    84    80
   [5,]  253  249  245  241  237  233  229  225  221   217   213   209   205
   [6,]  254  250  246  242  238  234  230  226  222   218   214   210   206
   [7,]  255  251  247  243  239  235  231  227  223   219   215   211   207
   [8,]  256  252  248  244  240  236  232  228  224   220   216   212   208
   [9,]  381  377  373  369  365  361  357  353  349   345   341   337   333
  [10,]  382  378  374  370  366  362  358  354  350   346   342   338   334
  [11,]  383  379  375  371  367  363  359  355  351   347   343   339   335
  [12,]  384  380  376  372  368  364  360  356  352   348   344   340   336
  [13,]  509  505  501  497  493  489  485  481  477   473   469   465   461
  [14,]  510  506  502  498  494  490  486  482  478   474   470   466   462
  [15,]  511  507  503  499  495  491  487  483  479   475   471   467   463
  [16,]  512  508  504  500  496  492  488  484  480   476   472   468   464
        [,14] [,15] [,16] [,17] [,18] [,19] [,20] [,21] [,22] [,23] [,24] [,25]
   [1,]    73    69    65    61    57    53    49    45    41    37    33    29
   [2,]    74    70    66    62    58    54    50    46    42    38    34    30
   [3,]    75    71    67    63    59    55    51    47    43    39    35    31
   [4,]    76    72    68    64    60    56    52    48    44    40    36    32
   [5,]   201   197   193   189   185   181   177   173   169   165   161   157
   [6,]   202   198   194   190   186   182   178   174   170   166   162   158
   [7,]   203   199   195   191   187   183   179   175   171   167   163   159
   [8,]   204   200   196   192   188   184   180   176   172   168   164   160
   [9,]   329   325   321   317   313   309   305   301   297   293   289   285
  [10,]   330   326   322   318   314   310   306   302   298   294   290   286
  [11,]   331   327   323   319   315   311   307   303   299   295   291   287
  [12,]   332   328   324   320   316   312   308   304   300   296   292   288
  [13,]   457   453   449   445   441   437   433   429   425   421   417   413
  [14,]   458   454   450   446   442   438   434   430   426   422   418   414
  [15,]   459   455   451   447   443   439   435   431   427   423   419   415
  [16,]   460   456   452   448   444   440   436   432   428   424   420   416
        [,26] [,27] [,28] [,29] [,30] [,31] [,32]
   [1,]    25    21    17    13     9     5     1
   [2,]    26    22    18    14    10     6     2
   [3,]    27    23    19    15    11     7     3
   [4,]    28    24    20    16    12     8     4
   [5,]   153   149   145   141   137   133   129
   [6,]   154   150   146   142   138   134   130
   [7,]   155   151   147   143   139   135   131
   [8,]   156   152   148   144   140   136   132
   [9,]   281   277   273   269   265   261   257
  [10,]   282   278   274   270   266   262   258
  [11,]   283   279   275   271   267   263   259
  [12,]   284   280   276   272   268   264   260
  [13,]   409   405   401   397   393   389   385
  [14,]   410   406   402   398   394   390   386
  [15,]   411   407   403   399   395   391   387
  [16,]   412   408   404   400   396   392   388
  </code></pre>
   73: <p>There are actually 2048 usable sequencing wells, hexagonally packed with four wells connected to the same sequencing sensor/channel via a multiplex (mux) selector. The combination of the mux and the channel number determines the physical location of the well. Unfortunately, the association between channel number and physical location is not obvious, and within each channel the muxes are also not in an obvious order, i.e. <code>[3,4,1,2,2,1,4,3]</code> for two adjacent channels.</p>
  
  <p>Here's an "official" text description of the layout as it was for R7; it hasn't changed for the most recent flow cells (R9.5):</p>
  
  <ul>
  <li>Channels 1-64 occur at the top of the chip (the other low channel numbers are at the bottom)</li>
  <li>Channels order down the chip: 1-64, 449-512, 385-448, 321-384, 257-320, 193-256, 129-192, 65-128</li>
  <li>Muxes run from left to right in the order: 3, 4, 1, 2, 2, 1, 4, 3</li>
  </ul>
  
  <p>To confirm this layout, I pulled the channel/position lookup table definitions out of MinKNOW, and it seems to be the same as this:</p>
  
  <p><a href="https://i.stack.imgur.com/AGcU3.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/AGcU3.jpg" alt="Current MinION channel layout"></a></p>
  
  <p>Here's the code to produce this image (I haven't adjusted it to have a hexagonal structure):</p>
  
  <pre><code>#!/usr/bin/Rscript
  library(rjson);
  
  layout.fname &lt;- "/opt/ONT/MinKNOW/Client/resources/app/resources/channels.json";
  
  data.list &lt;- fromJSON(file=layout.fname);
  
  png("MinION_FC_Layout.png", width=3072, height=1536, pointsize=24);
  par(mar=c(4,4,0.5,0.5), lwd=3);
  data.mat &lt;- matrix(unlist(data.list), ncol=2, byrow=TRUE);
  plot(data.mat, pch=21,
       bg=(colorRampPalette(c("white","grey"))(2048))[1:2048],
       col=c("red","yellow","green","blue"),
       xlab="locX", ylab="locY", cex=2,
       xlim=c(7,76), ylim=c(0,33));
  text(x=data.mat, labels=rep(1:512, each=4), cex=0.4);
  legend("top",legend=c(1,2,3,4), fill=c("red","yellow","green","blue"),
         inset=0.05, title="MUX");
  text(x=6, y=data.mat[data.mat[,1] == 8,2],
       labels = ceiling(which(data.mat[,1] == 8) / 4));
  text(x=77, y=data.mat[data.mat[,1] == 75,2],
       labels = ceiling(which(data.mat[,1] == 75) / 4));
  arrows(x0=c(8,75), x1=c(39,44), y0=33, length=0.2);
  invisible(dev.off());
  </code></pre>
  