setRegionBoundaries - Build a RegionDefinition object that includes CDR3 and FWR4.
setRegionBoundaries takes as input a junction length and an IMGT-numbered sequence
and outputs a custom
RegionDefinition object that includes the boundary definitions of
CDR1-3 and FWR1-4 for that sequence. In contrast to the universal
that end with FWR3, the returned definition is per-sequence due to variable junction lengths.
setRegionBoundaries(juncLength, sequenceImgt, regionDefinition = NULL)
- junction length of the sequence.
- IMGT-numbered sequence.
RegionDefinitiontype to calculate the region definition for. Can be one of
IMGT_VDJ, which are template definitions that include CDR1-3 and FWR1-4. Only these two regions include all CDR1-3 and FWR1-4 regions. If this argument is set to
NULL, then an empty
RegionDefinitionwill be returned.
RegionDefinition object that includes CDR1-3 and FWR1-4 for the
regionDefinition=IMGT_VDJ_BY_REGIONS, the returned
fwr1: Positions 1 to 78.
cdr1: Positions 79 to 114.
fwr2: Positions 115 to 165.
cdr2: Positions 166 to 195.
fwr3: Positions 196 to 312.
cdr3: Positions 313 to (313 + juncLength - 6) since the junction sequence includes (on the left) the last codon from FWR3 and (on the right) the first codon from FWR4.
fwr4: Positions (313 + juncLength - 6 + 1) to the end of the sequence.
regionDefinition=IMGT_VDJ, the returned
fwr: Positions belonging to a FWR.
cdr: Positions belonging to a CDR.
In the case that the
regionDefinition argument is not one of the extended
IMGT_VDJ), the input
regionDefinition is returned as is.
# Load and subset example data data(ExampleDb, package = "alakazam") len <- ExampleDb$junction_length sequence <- ExampleDb$sequence_alignment region <- setRegionBoundaries(len, sequence, regionDefinition = IMGT_VDJ)