R/mappedReads2Nhits_chr.R

Defines functions `mappedReads2Nhits_chr`

`mappedReads2Nhits_chr` <-
function(input,strand,chrL,w,considerStrand){
if(considerStrand=="Sum"){pos<-(pos2Nhits(input=input,w=w,l=chrL))};
if(considerStrand=="Foward"){pos<-(pos2Nhits(input=input[strand=="+"],w=w,l=chrL))};
if(considerStrand=="Reverse"){pos<-(pos2Nhits(input=input[strand=="-"],w=w,l=chrL))};
if(considerStrand=="Minimum"){
whichones<-(strand=="-");rm(strand);
t1<-pos2Nhits(input=input[whichones],w=w,l=chrL);
input<-input[!whichones];rm(whichones);gc(verbose=FALSE);
t2<-pos2Nhits(input=input,w=w,l=chrL);gc(verbose=FALSE);
pos<-pmin.int(t1,t2)
}
return(pos)
}

Try the CSAR package in your browser

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

CSAR documentation built on Nov. 8, 2020, 6:50 p.m.