Skip to content

Commit 6de23fe

Browse files
authored
Merge pull request #2956 from bgruening/odgi
add initial odgi tools
2 parents eff85ef + 0b07b71 commit 6de23fe

8 files changed

Lines changed: 209 additions & 0 deletions

File tree

tools/odgi/.shed.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
owner: iuc
2+
long_description: |
3+
Representing large genomic variation graphs with minimal memory overhead requires a careful encoding of the graph entities.
4+
odgi follows the dynamic GBWT in developing a byte-packed version of the graph and paths through it.
5+
remote_repository_url: https://github.com/galaxyproject/tools-iuc/tree/master/tools/odgi/
6+
homepage_url: https://github.com/vgteam/odgi
7+
type: unrestricted
8+
categories:
9+
- Sequence Analysis
10+
auto_tool_repositories:
11+
name_template: "{{ tool_id }}"
12+
description_template: "Wrapper for the odgi tool: {{ tool_name }}"
13+
suite:
14+
name: "suite_odgi"
15+
description: "odgi - optimized dynamic genome/graph implementation"
16+
type: repository_suite_definition

tools/odgi/build.xml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<tool id="odgi_build" name="odgi build" version="@TOOL_VERSION@">
2+
<description>construct a dynamic succinct variation graph</description>
3+
<macros>
4+
<import>macros.xml</import>
5+
</macros>
6+
<expand macro="requirements"/>
7+
<command detect_errors="exit_code"><![CDATA[
8+
odgi build
9+
-g '$gfa'
10+
-o '$odgi_output'
11+
$sort
12+
#if $to_gfa:
13+
--to-gfa > '$gfa_output'
14+
#end if
15+
]]></command>
16+
<inputs>
17+
<param argument="--gfa" type="data" format="gfa1" label="Construct the graph from this GFA input file" />
18+
<param argument="--sort" type="boolean" truevalue="--sort" falsevalue="" checked="false"
19+
label="Topological sort the graph"
20+
help="Apply generalized topological sort to the graph and set node ids to order." />
21+
<param argument="--to-gfa" type="boolean" truevalue="--to-gfa" falsevalue="" checked="false"
22+
label="Output additional GFA file"
23+
help="" />
24+
</inputs>
25+
<outputs>
26+
<data name="odgi_output" format="odgi" />
27+
<data name="gfa_output" format="gfa1">
28+
<filter>to_gfa</filter>
29+
</data>
30+
</outputs>
31+
<tests>
32+
<test>
33+
<param name="gfa" value="t.gfa" />
34+
<param name="sort" value="true" />
35+
<param name="to_gfa" value="true" />
36+
<output name="odgi_output" file="note5_out.og" />
37+
<output name="gfa_output" file="note5.gfa" />
38+
</test>
39+
</tests>
40+
<help><![CDATA[
41+
optimized dynamic genome/graph implementation (odgi)
42+
----------------------------------------------------
43+
44+
Construct a dynamic succinct variation graph (build)
45+
]]></help>
46+
<expand macro="citations">
47+
</expand>
48+
</tool>

tools/odgi/macros.xml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0"?>
2+
<macros>
3+
<xml name="requirements">
4+
<requirements>
5+
<requirement type="package" version="@TOOL_VERSION@">odgi</requirement>
6+
</requirements>
7+
</xml>
8+
<token name="@TOOL_VERSION@">0.3</token>
9+
<xml name="citations">
10+
<citations>
11+
<yield />
12+
</citations>
13+
</xml>
14+
</macros>

tools/odgi/test-data/note5.gfa

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
H VN:Z:1.0
2+
S 1 CAAATAAG
3+
L 1 + 2 + 0M
4+
L 1 + 3 + 0M
5+
S 2 A
6+
L 2 + 4 + 0M
7+
L 2 + 5 + 0M
8+
S 3 G
9+
L 3 + 4 + 0M
10+
L 3 + 5 + 0M
11+
S 4 T
12+
L 4 + 6 + 0M
13+
S 5 C
14+
L 5 + 6 + 0M
15+
S 6 TTG
16+
L 6 + 7 + 0M
17+
L 6 + 8 + 0M
18+
S 7 A
19+
L 7 + 9 + 0M
20+
S 8 G
21+
L 8 + 9 + 0M
22+
S 9 AAATTTTCTGGAGTTCTAT
23+
L 9 + 10 + 0M
24+
L 9 + 11 + 0M
25+
S 10 A
26+
L 10 + 12 + 0M
27+
S 11 T
28+
L 11 + 12 + 0M
29+
S 12 ATAT
30+
L 12 + 13 + 0M
31+
L 12 + 14 + 0M
32+
S 13 A
33+
L 13 + 15 + 0M
34+
S 14 T
35+
L 14 + 15 + 0M
36+
S 15 CCAACTCTCTG
37+
P x 1+,3+,5+,6+,8+,9+,11+,12+,14+,15+ *,*,*,*,*,*,*,*,*

tools/odgi/test-data/note5.png

139 Bytes
Loading

tools/odgi/test-data/note5_out.og

1.81 KB
Binary file not shown.

tools/odgi/test-data/t.gfa

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
H VN:Z:1.0
2+
S 1 CAAATAAG
3+
S 2 A
4+
S 3 G
5+
S 4 T
6+
S 5 C
7+
S 6 TTG
8+
S 7 A
9+
S 8 G
10+
S 9 AAATTTTCTGGAGTTCTAT
11+
S 10 A
12+
S 11 T
13+
S 12 ATAT
14+
S 13 A
15+
S 14 T
16+
S 15 CCAACTCTCTG
17+
P x 1+,3+,5+,6+,8+,9+,11+,12+,14+,15+ 8M,1M,1M,3M,1M,19M,1M,4M,1M,11M
18+
L 1 + 2 + 0M
19+
L 1 + 3 + 0M
20+
L 2 + 4 + 0M
21+
L 2 + 5 + 0M
22+
L 3 + 4 + 0M
23+
L 3 + 5 + 0M
24+
L 4 + 6 + 0M
25+
L 5 + 6 + 0M
26+
L 6 + 7 + 0M
27+
L 6 + 8 + 0M
28+
L 7 + 9 + 0M
29+
L 8 + 9 + 0M
30+
L 9 + 10 + 0M
31+
L 9 + 11 + 0M
32+
L 10 + 12 + 0M
33+
L 11 + 12 + 0M
34+
L 12 + 13 + 0M
35+
L 12 + 14 + 0M
36+
L 13 + 15 + 0M
37+
L 14 + 15 + 0M

tools/odgi/vis.xml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
<tool id="odgi_viz" name="odgi viz" version="@TOOL_VERSION@">
2+
<description>variation graph visualizations</description>
3+
<macros>
4+
<import>macros.xml</import>
5+
</macros>
6+
<expand macro="requirements"/>
7+
<command detect_errors="exit_code"><![CDATA[
8+
odgi viz
9+
-i '$input'
10+
--out='$output'
11+
-x $width
12+
-y $height
13+
#if str($path_height)
14+
--path-height=$path_height
15+
#end if
16+
#if str($path_x_padding)
17+
--path-x-padding=$path_x_padding
18+
#end if
19+
$path_per_row
20+
#if str($link_path_pieces):
21+
--link-path-pieces=$link_path_pieces
22+
#end if
23+
--threads=\${GALAXY_SLOTS:-1}
24+
]]></command>
25+
<inputs>
26+
<param name="input" type="data" format="odgi" label="odgi input file" />
27+
28+
<param argument="--width" type="integer" min="0" value="4000" label="Width in pixels of output image" />
29+
<param argument="--height" type="integer" min="0" value="500" label="Height in pixels of output image" />
30+
31+
<param argument="--path-height" type="integer" min="0" optional="true" label="Path display height" />
32+
<param argument="--path-x-padding" type="integer" min="0" optional="true" label="Path x padding" />
33+
<param argument="--path-per-row" type="boolean" truevalue="--path-per-row" falsevalue=""
34+
label="Display a single path per row rather than packing them" />
35+
36+
<param argument="--link-path-pieces" type="float" optional="true"
37+
label="Show thin links of this relative width to connect path pieces" />
38+
</inputs>
39+
<outputs>
40+
<data name="output" format="png" />
41+
</outputs>
42+
<tests>
43+
<test>
44+
<param name="input" value="note5_out.og" />
45+
<param name="width" value="4000" />
46+
<param name="height" value="500" />
47+
<output name="output" file="note5.png" ftype="png" />
48+
</test>
49+
</tests>
50+
<help><![CDATA[
51+
optimized dynamic genome/graph implementation (odgi)
52+
----------------------------------------------------
53+
54+
variation graph visualizations (viz)
55+
]]></help>
56+
<expand macro="citations" />
57+
</tool>

0 commit comments

Comments
 (0)