read_xmap.Rd
Reads xmap as GRangesList using https://bionanogenomics.com/wp-content/uploads/2017/03/30040-XMAP-File-Format-Specification-Sheet.pdf as guide. The outputted GRangesList has one GRangesList Items per molecule, each containing an ordered set of GRanges, each cooresponding to a mapped location of a fluorescent marker in each molecule
If lift = TRUE (default) then will lift markers to genome using the affine transformation defined by the xmap i.e. scaling and offset of query and reference coordinates. This transformation is defined by QryStartPos, QryEndPos, RefStartPos, RefEndPos fields in the xmap.
read_xmap(
path,
win = NULL,
merge = TRUE,
lift = TRUE,
grl = TRUE,
verbose = FALSE,
seqlevels = NULL
)
path to xmap file
only import ranges overlapping a given interval
logical flag specifying whether to merge the xmap with the cmaps
logical flag whether to lift the original marks to reference via the map implied by the mapping (TRUE), if false will just use the reference mark annotations
logical flag whether to return a GRangesList representing each molecule as an ordered walk (ie where markers are ordered according to the SiteId in the query cmap)
vectors of reference seqlevels which is indexed by the 1-based integer RefContigID and CMapId in xmap and reference cmap, respectively. NOTE: seqlevels may need to be provided in order to output a GRanges that is compatible with a standard genome reference (eg 1,..,22, X, Y)