R/is_multiseg.r

Defines functions is.multiseg

####################################################################
## Author: Gro Nilsen, Knut Liestřl and Ole Christian Lingjćrde.
## Maintainer: Gro Nilsen <gronilse@ifi.uio.no>
## License: Artistic 2.0
## Part of the copynumber package
## Reference: Nilsen and Liestřl et al. (2012), BMC Genomics
####################################################################

#Function to check if segments come from pcf-routine or multipcf-routine


##Input:
### segments: a data frame with segmentation results from pcf, multipcf or aspcf

## Output:
### multi: logical value indicating whether segments comes from multipcf or not

##Required by:
## checkSegments
## getUnisegFormat
## selectSegments

##Requires:
## none


is.multiseg <- function(segments){
	#If not multisegment, the first column name should be "sampleID"
	multi <- ifelse(colnames(segments)[1]=="sampleID",FALSE,TRUE)
	
	return(multi)
}#end is.multiseg

Try the copynumber package in your browser

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

copynumber documentation built on Nov. 8, 2020, 6:10 p.m.