cigarToBlock: Convert cigar and starts to qStarts, tStarts, blockSizes as...

View source: R/dna.R

cigarToBlockR Documentation

Convert cigar and starts to qStarts, tStarts, blockSizes as in blat

Description

Convert cigar and starts to qStarts, tStarts, blockSizes as in blat

Usage

cigarToBlock(cigars, starts, startEnds = FALSE)

Arguments

cigars

vector of SAM cigar strings

starts

vector of starting positions in target

startEnds

if FALSE single line with comma separated starts, if TRUE data.frame with single start, end and id column

Value

dataframe with qStarts,tStarts,sizes if !startEnds or dataframe with starts, ends and ids if startEnds

Examples

cigars<-c('100M','10H10M1000H','10M10I20M10D2M','10S10M10H','100M10000N100M')
starts<-1:5
cigarToBlock(cigars,starts)
cigarToBlock(cigars,starts,startEnds=TRUE)

sherrillmix/dnar documentation built on July 18, 2022, 10:07 p.m.