R/rmShortInserts.R

Defines functions rmShortInserts

Documented in rmShortInserts

#Remove short inserts
rmShortInserts <- function(bam, isizeMin=100) {
  sel <- abs(bam$isize)>isizeMin
  xs <- bam$tag$XS[sel]
  ans <- lapply(bam[names(bam)!='tag'],function(z) z[sel])
  ans$tag <- list(XS=xs)
  return(ans)
}

Try the casper package in your browser

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

casper documentation built on Dec. 17, 2020, 2:01 a.m.