Description Usage Arguments Details Value Examples
View source: R/BreakpointGRanges.R
Converts a breakpoint GRanges object to a Pairs object
Converts a BEDPE Pairs containing pairs of GRanges loaded using to a breakpoint GRanges object.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | breakpointgr2pairs(
bpgr,
writeQualAsScore = TRUE,
writeName = TRUE,
bedpeName = NULL,
firstInPair = NULL
)
pairs2breakpointgr(
pairs,
placeholderName = "bedpe",
firstSuffix = "_1",
secondSuffix = "_2",
nameField = "name",
renameScoreToQUAL = TRUE
)
|
bpgr |
breakpoint GRanges object |
writeQualAsScore |
write the breakpoint GRanges QUAL field as the score fields for compatibility with BEDPE rtracklayer export |
writeName |
write the breakpoint GRanges QUAL field as the score fields for compatibility with BEDPE rtracklayer export |
bedpeName |
function that returns the name to use for the breakpoint. Defaults to the sourceId, name column, or row names (in that priority) of the first breakend of each pair. |
firstInPair |
function that returns TRUE for breakends that are considered the first in the pair, and FALSE for the second in pair breakend. By default, the first in the pair is the breakend with the lower ordinal in the breakpoint GRanges object. |
pairs |
a Pairs object consisting of two parallel genomic loci. |
placeholderName |
prefix to use to ensure each entry has a unique ID. |
firstSuffix |
first in pair name suffix to ensure breakend name uniqueness |
secondSuffix |
second in pair name suffix to ensure breakend name uniqueness |
nameField |
Fallback field for row names if the Pairs object does not contain any names. BEDPE files loaded using rtracklayer use the "name" field. |
renameScoreToQUAL |
renames the 'score' column to 'QUAL'. Performing this rename results in a consistent variant quality score column name for variant loaded from BEDPE and VCF. |
Breakpoint-level column names will override breakend-level column names.
Pairs GRanges object suitable for export to BEDPE by rtracklayer
Breakpoint GRanges object.
1 2 3 4 5 6 7 | vcf.file <- system.file("extdata", "gridss.vcf", package = "StructuralVariantAnnotation")
bpgr <- breakpointRanges(VariantAnnotation::readVcf(vcf.file))
pairgr <- breakpointgr2pairs(bpgr)
#rtracklayer::export(pairgr, con="example.bedpe")
bedpe.file <- system.file("extdata", "gridss.bedpe", package = "StructuralVariantAnnotation")
bedpe.pairs <- rtracklayer::import(bedpe.file)
bedpe.bpgr <- pairs2breakpointgr(bedpe.pairs)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.