Last active
June 19, 2017 00:36
-
-
Save roblanf/df47b9748c3aae00809cc675aca79989 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# build the map for R9.5 flowcell, as a long-form dataframe that translates | |
# channels into rows and columns on the flowcell. Good for plotting in R. | |
p1 = data.frame(channel=33:64, row=rep(1:4, each=8), col=rep(1:8, 4)) | |
p2 = data.frame(channel=481:512, row=rep(5:8, each=8), col=rep(1:8, 4)) | |
p3 = data.frame(channel=417:448, row=rep(9:12, each=8), col=rep(1:8, 4)) | |
p4 = data.frame(channel=353:384, row=rep(13:16, each=8), col=rep(1:8, 4)) | |
p5 = data.frame(channel=289:320, row=rep(17:20, each=8), col=rep(1:8, 4)) | |
p6 = data.frame(channel=225:256, row=rep(21:24, each=8), col=rep(1:8, 4)) | |
p7 = data.frame(channel=161:192, row=rep(25:28, each=8), col=rep(1:8, 4)) | |
p8 = data.frame(channel=97:128, row=rep(29:32, each=8), col=rep(1:8, 4)) | |
q1 = data.frame(channel=1:32, row=rep(1:4, each=8), col=rep(16:9, 4)) | |
q2 = data.frame(channel=449:480, row=rep(5:8, each=8), col=rep(16:9, 4)) | |
q3 = data.frame(channel=385:416, row=rep(9:12, each=8), col=rep(16:9, 4)) | |
q4 = data.frame(channel=321:352, row=rep(13:16, each=8), col=rep(16:9, 4)) | |
q5 = data.frame(channel=257:288, row=rep(17:20, each=8), col=rep(16:9, 4)) | |
q6 = data.frame(channel=193:224, row=rep(21:24, each=8), col=rep(16:9, 4)) | |
q7 = data.frame(channel=129:160, row=rep(25:28, each=8), col=rep(16:9, 4)) | |
q8 = data.frame(channel=65:96, row=rep(29:32, each=8), col=rep(16:9, 4)) | |
# long form as a data frame | |
map = rbind(p1, p2, p3, p4, p5, p6, p7, p8, q1, q2, q3, q4, q5, q6, q7, q8) | |
# matrix form, so it looks like the flowcell | |
map.matrix = acast(map, row ~ col, value.var = "channel") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
e.g.