loadMummer: MUMmer

loadMummerR Documentation

MUMmer

Description

Load alignment coordinates from MUMmer.

Usage

loadMummer(
  file.coords,
  algo = "nucmer",
  asGRanges = TRUE,
  keep.nlong.qry = NULL,
  ref.lim = NULL,
  verbose = 1
)

Arguments

file.coords

path to the file with alignment coordinates obtained via show-coords (see the example)

algo

nucmer or promer (the latter isn't available yet)

asGRanges

if TRUE, returns a GRanges object

keep.nlong.qry

keep the N queries having the longest cumulated alignments on the reference (keep all of them by default)

ref.lim

limits on reference coordinates outside which alignments are discarded (keep all of them by default)

verbose

verbosity level (0/1)

Value

GRanges or data.frame

Author(s)

Timothee Flutre

See Also

mummer2granges

Examples

## Not run: ## MUMmer should be run beforehand, for instance:
## nucmer --maxmatch -p out-nucmer chroms.fa seqs.fa
## delta-filter -l 1000 -q out-nucmer.delta > out-nucmer_filter.delta
## show-coords -c -l -L 1000 -r -T out-nucmer_filter.delta | gzip > out-nucmer_filter_coords.txt.gz
coords <- loadMummer("out-nucmer_filter_coords.txt.gz")
library(GenomicRanges)
loc <- GRanges(seqnames=Rle("chr1"),
               ranges=IRanges(start=5, end=17))
idx <- subjectHits(findOverlaps(query=loc, subject=coords.gr))
plotAligns(coords=as.data.frame(ranges(coords.gr[idx,])))

## End(Not run)

timflutre/rutilstimflutre documentation built on Feb. 7, 2024, 8:17 a.m.