parseSamReadTags: Parse the optional sam read tags into a data frame

Description Usage Arguments Value Messages

View source: R/SamReads.R


Parse the optional sam read tags into a data frame


parseSamReadTags(tagList, startAt = 12)



An un-named list with one element per read line, in order. Each read line element is itself an un-named list with one element per sam record field. Each field from a given column (by default 12) must be an optional sam tag formatted as key:typeFlag:value. Only these optional sam tags are parsed. If only optional tags are present, can set startAt= 1. The order of optional tags as first encountedered determines the order reported.


The first column in the field list that is to be parsed. All columns after this are assumed to be optional tag fields. By default the 12'th column is the start of the optional tags; this is the default full sam record.


A data frame with one column per two character parsed tag. Values are converted to integer if typeFlag is i and to double if typeFlag is f. Otherwise left as character. Any tag that is found only on some lines will have a value of NA on any line where it is not found.


As this takes a long time, intermediate messages are printed to STDOUT while running.

jefferys/SamSeq documentation built on Oct. 25, 2019, 8:11 a.m.