Constructor
new GroupedGRanges(ranges, optionsopt)
- Source:
Parameters:
Name | Type | Attributes | Default | Description | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ranges |
Array | GRanges | An array of GRanges objects, where each element represents a group of genomic ranges. All objects should have compatible columns in their elementMetadata. Alternatively, a single GRanges containing a concatenation of ranges from all groups.
In this case, |
|||||||||||||||||||||||||||
options |
Object |
<optional> |
{}
|
Optional parameters. Properties
|
Extends
Classes
Methods
(static) empty(numberOfGroupsopt) → {GroupedGRanges}
- Source:
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
numberOfGroups |
number |
<optional> |
0
|
Numbe of empty groups to create. |
Returns:
A GroupedGRanges object of length equal to numberOfGroups
,
where each group is of zero length.
- Type
- GroupedGRanges
$setElementMetadata(elementMetadatanullable) → {Vector}
- Source:
- Overrides:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
elementMetadata |
DataFrame |
<nullable> |
Arbitrary metadata for each vector element.
This should have number of rows equal to the vector length.
Alternatively |
Returns:
A reference to this Vector object after setting the element metadata to value
.
- Type
- Vector
$setGroup(i, ranges) → {GroupedGRanges}
- Source:
See comments for $setGroup
.
Parameters:
Name | Type | Description |
---|---|---|
i |
number | Index of the group of interest. |
ranges |
GRanges | Genomic ranges for group |
Returns:
A reference to this GroupedGRanges object after setting group i
.
- Type
- GroupedGRanges
$setMetadata(value) → {Annotated}
- Source:
- Overrides:
Parameters:
Name | Type | Description |
---|---|---|
value |
Object | Object containing the metadata. |
Returns:
A reference to this Annotated object.
- Type
- Annotated
$setNames(namesnullable) → {Vector}
- Source:
- Overrides:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
names |
Array |
<nullable> |
Array of strings containing a name for each range.
This should have length equal to the number of ranges.
Alternatively |
Returns:
A reference to this Vector object after setting the element metadata to value
.
- Type
- Vector
$setRanges(ranges) → {GroupedGRanges}
- Source:
Parameters:
Name | Type | Description |
---|---|---|
ranges |
GRanges | Genomic ranges of length equal to the concatenated set of ranges returned by |
Returns:
A reference to this GroupedGRanges object after modifying the internal ranges.
- Type
- GroupedGRanges
buildOverlapIndex(optionsopt) → {GroupedGRangesOverlapIndex}
- Source:
Parameters:
Name | Type | Attributes | Default | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
<optional> |
{}
|
Optional parameters. Properties
|
Returns:
A pre-built index for computing overlaps with other GRanges instances.
elementMetadata() → {DataFrame}
- Source:
- Overrides:
Returns:
A DataFrame with one row corresponding to each vector element, containing arbitrary per-element metadata.
- Type
- DataFrame
group(i, optionsopt) → {GRanges}
- Source:
Parameters:
Name | Type | Attributes | Default | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
i |
number | Index of the group of interest. |
||||||||||||
options |
Object |
<optional> |
{}
|
Optional parameters. Properties
|
Returns:
The genomic ranges for group i
.
- Type
- GRanges
metadata() → {Map}
- Source:
- Overrides:
Returns:
Map containing arbitrary metadata.
- Type
- Map
names() → (nullable) {Array}
- Source:
- Overrides:
Returns:
Array of strings containing the name of each range, or null
if no names are available.
- Type
- Array
numberOfGroups() → {number}
- Source:
Returns:
Number of groups in this object.
- Type
- number
rangeLengths() → {Int32Array}
- Source:
Returns:
The length of each group's ranges along the concatenated set of ranges returned by ranges
.
- Type
- Int32Array
ranges() → {GRanges}
- Source:
Returns:
The concatenated set of ranges across all groups.
- Type
- GRanges
rangeStarts() → {Int32Array}
- Source:
Returns:
The start indices for each group's ranges along the concatenated set of ranges returned by ranges
.
- Type
- Int32Array
setElementMetadata(elementMetadatanullable, optionsopt) → {Vector}
- Source:
- Overrides:
Parameters:
Name | Type | Attributes | Default | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
elementMetadata |
DataFrame |
<nullable> |
Arbitrary metadata for each vector element.
This should have number of rows equal to the vector length.
Alternatively |
|||||||||||
options |
Object |
<optional> |
{}
|
Optional parameters. Properties
|
Returns:
The Vector object after setting the element metadata to value
.
If inPlace = true
, this is a reference to the current instance, otherwise a new instance is created and returned.
- Type
- Vector
setGroup(i, ranges, optionsopt) → {GroupedGRanges}
- Source:
Multiple consecutive calls to $setGroup
are not executed immediately.
Rather, the operations are staged and executed in batch once the modified GroupedGRanges is used in other methods.
This enables efficient setting of individual groups inside a single concatenated GRanges.
Parameters:
Name | Type | Attributes | Default | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
i |
number | Index of the group of interest. |
||||||||||||
ranges |
GRanges | Genomic ranges for group |
||||||||||||
options |
Object |
<optional> |
{}
|
Optional parameters. Properties
|
Returns:
The GroupedGRanges object after setting group i
.
If inPlace = true
, this is a reference to the current instance, otherwise a new instance is created and returned.
- Type
- GroupedGRanges
setMetadata(value, optionsopt) → {Annotated}
- Source:
- Overrides:
Parameters:
Name | Type | Attributes | Default | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
value |
Object | Map | Object containing the metadata. |
||||||||||||
options |
Object |
<optional> |
{}
|
Optional parameters. Properties
|
Returns:
The Annotated object after replacing the metadata.
If inPlace = true
, this is a reference to the current instance, otherwise a new instance is created and returned.
- Type
- Annotated
setNames(namesnullable, optionsopt) → {Vector}
- Source:
- Overrides:
Parameters:
Name | Type | Attributes | Default | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
names |
Array |
<nullable> |
Array of strings containing a name for each range.
This should have length equal to the number of ranges.
Alternatively |
|||||||||||
options |
Object |
<optional> |
{}
|
Optional parameters. Properties
|
Returns:
The Vector object after setting the names to value
.
If inPlace = true
, this is a reference to the current instance, otherwise a new instance is created and returned.
- Type
- Vector
setRanges(ranges, optionsopt) → {GroupedGRanges}
- Source:
Parameters:
Name | Type | Attributes | Default | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ranges |
GRanges | Genomic ranges of length equal to the concatenated set of ranges returned by |
||||||||||||
options |
Object |
<optional> |
{}
|
Optional parameters. Properties
|
Returns:
The GroupedGRanges object after modifying the internal ranges.
If inPlace = true
, this is a reference to the current instance, otherwise a new instance is created and returned.
- Type
- GroupedGRanges