R/check.chipname.R

Defines functions check.chipname

Documented in check.chipname

check.chipname<-function(chip,obj.chip,cdfname=NULL){
		if(chip=="" & obj.chip=="" & is.null(cdfname))
			stop("The chip type must be specified either by the SAM object",
				"\n or by 'chipname' or 'cdfname'.")
		if(chip=="")
			chip<-obj.chip
		if(chip!=obj.chip & obj.chip!="")
			stop("'chipname' differs from the chip type of the SAM object.")
		if(!is.null(cdfname)){
			if(!is.character(cdfname))
				stop("'cdfname' must be a character string.")
			tmp<-tolower(cdfname)
			tmp<-gsub("_","",tmp)
			tmp<-gsub("-","",tmp)
			tmp<-gsub(" ","",tmp)
			if(chip!="" & tmp!=chip)
				stop("'chipname' differs from the chip type specified by",
					" 'cdfname'.")
			chip<-tmp
		}
		chip
}

Try the siggenes package in your browser

Any scripts or data that you put into this service are public.

siggenes documentation built on Nov. 8, 2020, 6:26 p.m.