View source: R/addAnnotation.R
flipQueryAnnotation | R Documentation |
This function takes loaded PAF alignments using readPaf
function and postprocessed using
flipPaf
function. In case the PAF alignments were flipped ranges defined in 'query.annot.gr'
will be flipped accordingly to match query coordinates defined in 'paf.table'.
flipQueryAnnotation(paf.table, query.annot.gr = NULL)
paf.table |
A |
query.annot.gr |
A |
A GRanges-class
object.
David Porubsky
## Get PAF to process
paf.file <- system.file("extdata", "test1.paf", package = "SVbyEye")
## Read in PAF
paf.table <- readPaf(paf.file = paf.file, include.paf.tags = TRUE, restrict.paf.tags = "cg")
## Flip PAF alignments
paf.table <- flipPaf(paf.table = paf.table, force = TRUE)
## Load query annotation file
query.annot <- system.file("extdata", "test1_query_annot.txt", package = "SVbyEye")
query.annot.df <- read.table(query.annot, header = TRUE, sep = "\t", stringsAsFactors = FALSE)
query.annot.gr <- GenomicRanges::makeGRangesFromDataFrame(query.annot.df)
## Synchronize orientation of query annotation file with flipped PAF alignments
flipQueryAnnotation(paf.table = paf.table, query.annot.gr = query.annot.gr)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.