Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option --no-sequence to the tool gfastats wrapper #1573

Merged
merged 2 commits into from
Feb 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions tools/gfastats/gfastats.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
#end if
#end if
#if $mode_condition.output_condition.out_format in ['gfa','gfa.gz']
$mode_condition.output_condition.no_sequence
#if $mode_condition.output_condition.terminal_overlaps_condition.terminal_overlaps_select == 'yes':
--discover-terminal-overlaps $mode_condition.output_condition.terminal_overlaps_condition.terminal_overlaps_length
#end if
Expand All @@ -63,6 +64,7 @@
#else
--agp-to-path $mode_condition.agp_to_path
$mode_condition.discover_paths
$mode_condition.no_sequence
-o dataset.gfa
#end if
--threads \${GALAXY_SLOTS:-8}
Expand Down Expand Up @@ -133,9 +135,11 @@
<when value="fastq.gz"/>
<when value="gfa">
<expand macro="terminal_overlaps_macro"/>
<expand macro="no_sequence_macro"/>
</when>
<when value="gfa.gz">
<expand macro="terminal_overlaps_macro"/>
<expand macro="no_sequence_macro"/>
</when>
</conditional>
<param argument="--discover-paths" type="boolean" truevalue="--discover-paths" falsevalue="" checked="false" label="Generates the initial set of paths" help="In the graph space, an assembly
Expand Down Expand Up @@ -194,6 +198,7 @@
<param argument="--agp-to-path" type="data" format="agp" label="Input AGP file" help="Integrate the AGP information into the assembly graph as paths. The scaffolding information is converted into paths through the graph" />
<param argument="--discover-paths" type="boolean" truevalue="--discover-paths" falsevalue="" checked="false" label="Generates the initial set of paths" help="In the graph space an assembly
is a collection of segment and edges/gaps between these segments. A path defines a potential walk through the segments and edges/gaps that corresponds to a hypothesis of the actual linear sequence" />
<expand macro="no_sequence_macro"/>
</when>
</conditional>
</inputs>
Expand Down Expand Up @@ -390,6 +395,30 @@
</conditional>
<output name="stats" value="test_12_stats.tabular" ftype="tabular"/>
</test>
<!--Test 13 -->
<test expect_num_outputs="1">
<param name="input_file" value="dataset_04.gfa"/>
<conditional name="mode_condition">
<param name="selector" value="scaffolding"/>
<param name="agp_to_path" value="dataset_05.agp"/>
<param name="discover_paths" value="true"/>
<param name="no_sequence" value="true"/>
</conditional>
<output name="output" value="test_13.gfa" ftype="gfa1"/>
</test>
<!--Test 14 -->
<test expect_num_outputs="1">
<param name="input_file" value="dataset_01_a.fasta.gz"/>
<conditional name="mode_condition">
<param name="selector" value="manipulation"/>
<conditional name="output_condition">
<param name="out_format" value="gfa"/>
<param name="no_sequence" value="true"/>
</conditional>
<param name="sort" value="ascending"/>
</conditional>
<output name="output" value="test_14.gfa" ftype="gfa1"/>
</test>
</tests>
<help><![CDATA[

Expand Down
5 changes: 4 additions & 1 deletion tools/gfastats/macros.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<macros>
<token name="@TOOL_VERSION@">1.3.9</token>
<token name="@SUFFIX_VERSION@">1</token>
<token name="@SUFFIX_VERSION@">2</token>
<xml name="requirements">
<requirements>
<requirement type="package" version="@TOOL_VERSION@">gfastats</requirement>
Expand Down Expand Up @@ -44,4 +44,7 @@
</when>
</conditional>
</xml>
<xml name="no_sequence_macro">
<param argument="--no-sequence" type="boolean" truevalue="--no-sequence" falsevalue="" checked="false" label="Do not include sequences in the GFA output" help="Select Yes for a lighter GFA file."/>
</xml>
</macros>
2 changes: 2 additions & 0 deletions tools/gfastats/test-data/test_13.gfa
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
H VN:Z:1.2
S edge_1 * LN:i:419576 dp:i:14
10 changes: 10 additions & 0 deletions tools/gfastats/test-data/test_14.gfa
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
H VN:Z:1.2
S seq_00001~59..230276.2 * LN:i:5006
S seq_00001~59..230276.4 * LN:i:996
S seq_00001~59..230276.6 * LN:i:634
S seq_00001~59..230276.8 * LN:i:5185
J seq_00001~59..230276.2 + seq_00001~59..230276.2 + 62
J seq_00001~59..230276.2 + seq_00001~59..230276.4 + 13
J seq_00001~59..230276.4 + seq_00001~59..230276.6 + 25
J seq_00001~59..230276.6 + seq_00001~59..230276.8 + 19
P seq_00001~59..230276 ;seq_00001~59..230276.2+;seq_00001~59..230276.4+;seq_00001~59..230276.6+;seq_00001~59..230276.8+ *