R/readSeqMLove.R

Defines functions readSeqMLove

Documented in readSeqMLove

readSeqMLove <-
function(filename) {
	## Assume all matched reads from output
	seqMatch = read.table(filename, as.is=TRUE)
	seqChr = factor(seqMatch[,1])
	seqFront = seqMatch[,3]
	normalLFflag = (seqFront=="F")
	seqPosF = rep(0, dim(seqMatch)[1])
	seqPosF[normalLFflag] = as.numeric(seqMatch[normalLFflag,2])
	seqPosF[-normalLFflag] = as.numeric(seqMatch[-normalLFflag,4])
	seqPosR = rep(0, dim(seqMatch)[1])
	seqPosR[normalLFflag] = as.numeric(seqMatch[normalLFflag,4])
	seqPosR[-normalLFflag] = as.numeric(seqMatch[-normalLFflag,2])
	rm(seqMatch)
	return(list(seqF=seqPosF, seqR=seqPosR, seqChr=seqChr))
}

Try the SeqCNVCBS package in your browser

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

SeqCNVCBS documentation built on May 2, 2019, 6:51 p.m.