R/getWellIdsTecan.R

#' The aliases are generated by extracting the information from parsed data of the file
#' generated by the tecan machine. See \code{\link{readYeastGrower}} and \code{\link{readGenios}}.
#' @title Get aliases for wells
#' @param data parsed data of the file. See \code{\link{readYeastGrower}} and \code{\link{readGenios}}
#' @return vector containing the aliases
#' @author Julien Gagneur, Andreas Neudecker
#' @export
#' @examples 
#' data <- readYeastGrower( system.file("extdata", "Plate1_YPFruc.txt", package="cellGrowth"))
#' ids <- getWellIdsTecan(data)
#' 
getWellIdsTecan = function(data){
    aliasLine = data$header[ which( substr( data$header, 1, 10 ) == "Well_Alias" ) ]
	
	if ( length(aliasLine) == 1 )
	{
		## yeast grower
  	  	als0 = strsplit(aliasLine, ",|=|\"|\ ")[[1]][-1]
 		als0 = als0[als0!=""]
		als0
	}
	else
	{
		## genios
		names(data$OD)
	}
#    row = substr(als0, 1, 1)
#    col = as.integer(substr(als0, 2, nchar(als0)))
#    return(  paste(row, col, sep="") )
} 
SamGG/cellGrowth documentation built on May 9, 2019, 3:30 a.m.