removeSpots {arrayMagic}R Documentation

removeSpots

Description

all elements matching the strings in spotsToBeRemoved are taken out of the object arrayDataObject and if supplied out of the object exprSetArrayObject as well

Arguments

arrayDataObject object of type arrayData; required; default missing
exprSetArrayObject object of type exprSetArray; optional; default NULL
spotIdentifier character strings name of the appropriate column; default "Name"
spotsToBeRemoved vector of character strings; default NULL

Details

Value

list containing an object of type arrayData labelled arrayDataObject and an integer specifying the number of removed items labelled nrOfRemovedItems and possily an object of type exprSetArray labelled exprSetArrayObject

Author(s)

Andreas Buness <a.buness@dkfz.de>

See Also

Examples

  intensities <- array(data=runif(600),dim=c(100,2,3))
  dimnames(intensities) <- list(NULL, c("Cy3","Cy5"), NULL)
  arrayDataObject <- new("arrayData", intensities=intensities, spotattr=data.frame(Name=I(rep(c("x","y","Blank","Blank","z"),20))), hybattr=NULL)
  res <- removeSpots(arrayDataObject, spotsToBeRemoved=c("x","z"))
  stopifnot( dim(getIntensities(res[["arrayDataObject"]]))[1] == 3*20 )
  indCy3=1:3
  indCy5=4:6
  channels <- matrix( c(indCy3,indCy5), nrow=length(indCy3), byrow=FALSE )
  colnames(channels) <- c("Cy3","Cy5")
  exprSetArrayObject <- new("exprSetArray", exprs=matrix(data=runif(600),nrow=100,ncol=6), phenoData=new("phenoData", pData=data.frame(matrix(0,nrow=6,ncol=1)), varLabels=list(rep("varLabel1",1))), channels=channels)
  res2 <- removeSpots(arrayDataObject=arrayDataObject,exprSetArrayObject=exprSetArrayObject, spotsToBeRemoved=c("x","z"))
  stopifnot( dim(exprs(res2[["exprSetArrayObject"]]))[1] == 3*20 )
  res3 <- removeSpots(arrayDataObject=arrayDataObject,exprSetArrayObject=exprSetArrayObject, spotsToBeRemoved=c("ggrrrr"))
  stopifnot( dim(exprs(res3[["exprSetArrayObject"]]))[1] == 100 )
  stopifnot( dim(getIntensities(res3[["arrayDataObject"]]))[1] == 100 )
        

[Package Contents]