Skip to content

Commit

Permalink
2024/10/27-19:38:16 (Linux VDI0092.zit.bam.de x86_64)
Browse files Browse the repository at this point in the history
  • Loading branch information
pbenner committed Oct 27, 2024
1 parent 7c0d81f commit 5590dc5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/granges_merge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ impl GRanges {
/// Merges a collection of `GRanges` objects into a single `GRanges` object.
///
/// This function iterates through a slice of `GRanges`, collects start and end points for each range,
/// and merges overlapping or contiguous ranges based on sequence names. The resulting merged ranges are returned.
/// and merges overlapping or contiguous ranges. The resulting merged ranges are returned.
///
/// # Arguments
/// - `granges`: A slice of `GRanges` objects to be merged.
Expand All @@ -103,9 +103,9 @@ impl GRanges {
/// let strand = vec![];
///
/// let granges = GRanges::new(seqnames, from, to, strand);
/// let merged = GRanges::merge(&[granges]);
/// let merged = GRanges::merge(&[&granges]);
/// ```
pub fn merge(granges: &[GRanges]) -> GRanges {
pub fn merge(granges: &[&GRanges]) -> GRanges {

let mut r = GRanges::default();
let mut rmap: HashMap<String, EndPointList> = HashMap::new();
Expand Down Expand Up @@ -155,7 +155,7 @@ mod tests {

let granges = GRanges::new(seqnames, from, to, strand);

let r = GRanges::merge(&[granges]);
let r = GRanges::merge(&[&granges]);

assert!(r.num_rows() == 2);

Expand Down

0 comments on commit 5590dc5

Please sign in to comment.