plotprintseq {DAAGbio}R Documentation

Sequence of movements of spotted microarray printhead

Description

Shows the sequence of movements of a spotted microarray printhead, when a slide is printed.

Usage

plotprintseq(ngrid.r = 4, ngrid.c = 4, nspot.r = 16, nspot.c = 12,
gridorder = expand.grid(row = 1:ngrid.c, col = 1:ngrid.r),
spotorder = list(x = nspot.r:1, y = nspot.c:1), rowmajor = FALSE, eps =
1, delay1 = 100,
delay2 = 2000)

Arguments

ngrid.r

Number of rows of grids

ngrid.c

Number of columns of grids

nspot.r

Number of rows of spots in a grid

nspot.c

Number of columns of spots in a grid

gridorder

A data frame whose rows specify grids, in order of printing

spotorder

A list, specifying the order across rows and up or down each column in a grid

rowmajor

Order of printing of spots within grids.

eps

Distance between grids

delay1

Delay in shifting by one spot

delay2

Delay in shifting to new column or new row

Examples

plotprintseq()

## The function is currently defined as
function(ngrid.r=4, ngrid.c=4,
             nspot.r=16, nspot.c=12,
             gridorder=expand.grid(row=1:ngrid.c, col=1:ngrid.r),
             spotorder=list(x=nspot.r:1, y=nspot.c:1),
             rowmajor=FALSE, eps=1, delay1=100, delay2=2000){
        oldpar <- par(mar=par()$mar-c(0,0,2.5,0))
        on.exit(par(oldpar))
        plotpoints <- function(i, j, delay1=5000, delay2=10000){
            points(i+xy$x, j+xy$y, pch=15,
                   cex=0.5, col="cyan")
            x <- 0
            for(k in 1:delay2)x <- x+1
            points(i+xy$x, j+xy$y, pch=15,
                   cex=0.85, col="grey60")
            x <- 0
            for(k in 1:delay1)x <- x+1
        }

        xy <- gridorder-1
        names(xy) <- c("x","y")
        xy$x <- xy$x*(nspot.c+eps)
        xy$y <- xy$y*(nspot.r+eps)
        plot(c(1, ngrid.c*(nspot.c+eps)),
             c(1, ngrid.r*(nspot.r+eps)),
             type="n",xlab="",ylab="",axes=FALSE)
        mtext(side=1, line=1,
              paste("Grid layout:  #rows of Grids =", ngrid.r,
                      "   #columns of Grids =", ngrid.c))
        mtext(side=1, line=2.5,
              paste("In each grid:  #rows of Spots =", nspot.r,
                      "  #columns of Spots =", nspot.c))
        if (rowmajor)
        for(j in spotorder$x) for(i in spotorder$y)
        	plotpoints(i,j, delay1=delay1, delay2=delay2)
        	else
        	for(i in spotorder$y) for(j in spotorder$x)
        	plotpoints(i,j, delay1=delay1, delay2=delay2)
            }

[Package DAAGbio version 0.63-4 Index]