Skip to content

feature request: odgi ranges #618

@adadiehl

Description

@adadiehl

Based on odgi position. Given a graph position (e.g., -g [[node_id][,offset[,(+|-)]**]**]), range of graph node IDs (e.g., -g >6050>6060), or BED file with ranges relative to any path in the graph, return chromosome, start, and end position(s) in standard BED format in the frame of the path given with -r. Include additional option -n to exclude start and end nodes of a node range, to be used, e.g., to obtain BED coordinates of bubbles, excluding bordering invariant nodes constituting the VCF ID field in vg deconstruct output.

# Single node example: return chrom, start, and end of sequence associated with the given node:
odgi ranges -i graph.og -g 6040,0,+ -r HG005#1#chr1
# chrom start end
HG005#1#chr1 11651  11850

# Range of nodes, without -n: return chrom, start, and end of sequence spanning all nodes in the range, traversing all nodes in the given reference path:
odgi ranges -i graph.og -g >6040>6050 -r HG005#1#chr1
# chrom start end
HG005#1#chr1 11651 14711

# Range of nodes, with -n: same as range without -n, but exclude start and end nodes, returning only the range of nodes in between:
odgi ranges -i graph.og -g >6040>6050 -r HG005#1#chr1 -n
# chrom start end
HG005#1#chr1 11851 14350

# Ranges given in BED file: lift over BED coordinates from the input path to the path given with -r:
odgi ranges -i graph.og -b <input-ranges.bed> -r HG005#1#chr1
#chrom start end
HG005#1#chr1 11851 14350
...
HG005#1#chr1 211901 214609

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions