File: pairs2breakpointgr.Rd

package info (click to toggle)
r-bioc-structuralvariantannotation 1.22.0%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,576 kB
  • sloc: makefile: 2
file content (79 lines) | stat: -rw-r--r-- 2,725 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/BreakpointGRanges.R
\name{breakpointgr2pairs}
\alias{breakpointgr2pairs}
\alias{pairs2breakpointgr}
\title{Converts a breakpoint GRanges object to a Pairs object}
\usage{
breakpointgr2pairs(
  bpgr,
  writeQualAsScore = TRUE,
  writeName = TRUE,
  bedpeName = NULL,
  firstInPair = NULL
)

pairs2breakpointgr(
  pairs,
  placeholderName = "bedpe",
  firstSuffix = "_1",
  secondSuffix = "_2",
  nameField = "name",
  renameScoreToQUAL = TRUE
)
}
\arguments{
\item{bpgr}{breakpoint GRanges object}

\item{writeQualAsScore}{write the breakpoint GRanges QUAL field as the score
fields for compatibility with BEDPE rtracklayer export}

\item{writeName}{write the breakpoint GRanges QUAL field as the score
fields for compatibility with BEDPE rtracklayer export}

\item{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.}

\item{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.}

\item{pairs}{a Pairs object consisting of two parallel genomic loci.}

\item{placeholderName}{prefix to use to ensure each entry has a unique ID.}

\item{firstSuffix}{first in pair name suffix to ensure breakend name uniqueness}

\item{secondSuffix}{second in pair name suffix to ensure breakend name uniqueness}

\item{nameField}{Fallback field for row names if the Pairs object does not contain any names.
BEDPE files loaded using rtracklayer use the "name" field.}

\item{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.}
}
\value{
Pairs GRanges object suitable for export to BEDPE by rtracklayer

Breakpoint GRanges object.
}
\description{
Converts a breakpoint GRanges object to a Pairs object

Converts a BEDPE Pairs containing pairs of GRanges loaded using to a breakpoint GRanges object.
}
\details{
Breakpoint-level column names will override breakend-level column names.
}
\examples{
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)
}