Skip to content

Commit

Permalink
reformatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Richard Christopher Burhans authored and Richard Christopher Burhans committed Apr 16, 2024
1 parent 8a84931 commit 44b09d6
Show file tree
Hide file tree
Showing 8 changed files with 71 additions and 50 deletions.
4 changes: 2 additions & 2 deletions tools/segalign/output_options.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<macros>
<xml name="output_options">
<section name="output_options" expanded="false" title="Output Options">
<yield />
<param argument="--markend" type="boolean" value="false" label="Write a marker line just before completion" />
<yield/>
<param argument="--markend" type="boolean" value="false" label="Write a marker line just before completion"/>
</section>
</xml>
</macros>
24 changes: 19 additions & 5 deletions tools/segalign/scoring_options.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,25 @@
<macros>
<xml name="scoring_options">
<section name="scoring_options" expanded="false" title="Scoring Options">
<param argument="--scoring" type="data" value="false" optional="true" format="txt" label="Scoring file in LASTZ format" />
<!--
ambiguous can be: {"n", "n,int,int", "iupac", "iupac,int,int"}
ints are ambiguous_reward and ambiguous_penalty
-->
<param argument="--scoring" type="data" value="false" optional="true" format="txt" label="Scoring file in LASTZ format"/>
<param name="ambiguous_selector" type="select" label="Ambiguous Nucleotides">
<option value="x" selected="true">None</option>
<option value="n">N</option>
<option value="iupac">IUPAC</option>
</param>
<conditional name="ambiguous_params">
<param name="set_ambiguous_params_selector" type="select" label="Set Ambiguous Nucleotide Scoring Parameters">
<option value="false" selected="true">No</option>
<option value="true">Yes</option>
</param>
<when value="false">
<!-- Do nothing -->
</when>
<when value="true">
<param name="ambiguous_reward" type="integer" value="0" label="Ambiguous Nucleotide Reward"/>
<param name="ambiguous_penalty" type="integer" value="0" label="Ambiguous Nucleotide Penalty"/>
</when>
</conditional>
</section>
</xml>
</macros>
12 changes: 6 additions & 6 deletions tools/segalign/seeding_options.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
<!-- Do nothing -->
</when>
<when value="custom">
<param name="custom_seed" type="text" value="" optional="false" label="Custom seed pattern">
<validator type="empty_field"/>
<!--
<param name="custom_seed" type="text" value="" optional="false" label="Custom seed pattern">
<validator type="empty_field"/>
<!--
<validator type="regex" message="Arbitrary pattern of 1s, 0s, and Ts">^[01T]+$</validator>
<sanitizer invalid_char="">
<valid initial="none">
Expand All @@ -26,11 +26,11 @@
</valid>
</sanitizer>
-->
</param>
</param>
</when>
</conditional>
<param argument="--step" type="integer" value="1" label="Offset between the starting positions of successive target words considered for generating seed table" />
<param argument="--notransition" type="boolean" checked="false" label="Don't allow one transition in a seed hit" />
<param argument="--step" type="integer" value="1" label="Offset between the starting positions of successive target words considered for generating seed table"/>
<param argument="--notransition" type="boolean" checked="false" label="Don't allow one transition in a seed hit"/>
</section>
</xml>
</macros>
56 changes: 31 additions & 25 deletions tools/segalign/segalign.xml
Original file line number Diff line number Diff line change
Expand Up @@ -67,29 +67,29 @@ OMP_THREAD_LIMIT=\${GALAXY_SLOTS:-2}
--seed '$mode.seeding_options.seed.seed_selector'
#end if
--step '$mode.seeding_options.step'
#if str($mode.seeding_options.notransition) == 'true'
#if str($mode.seeding_options.notransition) == "true"
--notransition
#end if
## Ungapped Extension Options ------------------------------------------
--xdrop '$mode.ungapped_extension_options.xdrop'
--hspthresh '$mode.ungapped_extension_options.hspthresh'
#if str($mode.ungapped_extension_options.noentropy) == 'true'
#if str($mode.ungapped_extension_options.noentropy) == "true"
--noentropy
#end if
## Gapped Extension Options --------------------------------------------
#if $segalign_mode != "segalign_repeat_masker"
#if str($mode.gapped_extension_options.nogapped) == 'true'
#if str($mode.gapped_extension_options.nogapped) == "true"
--nogapped
#end if
--ydrop '$mode.gapped_extension_options.ydrop'
#if str($mode.gapped_extension_options.gappedthresh) != ""
--gappedthresh '$mode.gapped_extension_options.gappedthresh'
#end if
#if str($mode.gapped_extension_options.notrivial) == 'true'
#if str($mode.gapped_extension_options.notrivial) == "true"
--notrivial
#end if
#end if
Expand Down Expand Up @@ -129,7 +129,7 @@ OMP_THREAD_LIMIT=\${GALAXY_SLOTS:-2}
--M '$mode.output_options.M'
--output '$segalign_repeat_masker_output'
#end if
#if str($mode.output_options.markend) == 'true'
#if str($mode.output_options.markend) == "true"
--markend
#end if
Expand All @@ -139,7 +139,7 @@ OMP_THREAD_LIMIT=\${GALAXY_SLOTS:-2}
--lastz_interval_size '$mode.system_options.lastz_interval_size'
--seq_block_size '$mode.system_options.seq_block_size'
--num_gpu '$mode.system_options.num_gpu'
#if str($mode.system_options.debug) == 'true'
#if str($mode.system_options.debug) == "true"
--debug
#end if
Expand All @@ -158,43 +158,43 @@ OMP_THREAD_LIMIT=\${GALAXY_SLOTS:-2}
<option value="segalign_repeat_masker">SegAlign repeat masker</option>
</param>
<when value="segalign">
<param name="target" type="data" format="fasta" label="Target sequence file in FASTA format" />
<param name="query" type="data" format="fasta" label="Query sequence file in FASTA format" />
<expand macro="sequence_options" />
<param name="target" type="data" format="fasta" label="Target sequence file in FASTA format"/>
<param name="query" type="data" format="fasta" label="Query sequence file in FASTA format"/>
<expand macro="sequence_options"/>
<expand macro="scoring_options"/>
<expand macro="seeding_options" />
<expand macro="seeding_options"/>
<expand macro="ungapped_extension_options"/>
<expand macro="gapped_extension_options"/>
<expand macro="output_options">
<expand macro="segalign_output_options"/>
</expand>
<expand macro="system_options" />
<expand macro="system_options"/>
<section name="diagonal_partition_options" title="Diagonal Partition Options">
<param argument="--diagonal_partition" type="boolean" value="false" label="Enable diagonal partition optimization" />
<param argument="--max_segments" type="integer" value="20000" label="Max segments" />
<param argument="--diagonal_partition" type="boolean" value="false" label="Enable diagonal partition optimization"/>
<param argument="--max_segments" type="integer" value="20000" label="Max segments"/>
</section>
</when>
<when value="segalign_repeat_masker">
<param name="seq_file" type="data" format="fasta" label="Sequence file in FASTA format" />
<param name="seq_file" type="data" format="fasta" label="Sequence file in FASTA format"/>
<expand macro="sequence_options">
<param argument="--neighbor_proportion" type="float" value="0.2" label="Proportion of neighbouring intervals to align the query interval to" />
<param argument="--neighbor_proportion" type="float" value="0.2" label="Proportion of neighbouring intervals to align the query interval to"/>
</expand>
<expand macro="scoring_options"/>
<expand macro="seeding_options" />
<expand macro="seeding_options"/>
<expand macro="ungapped_extension_options"/>
<expand macro="output_options">
<param argument="--M" type="integer" value="1" max="255" label="report any position that is covered by at least this many alignments; the maximum allowed depth is 255" />
<param argument="--M" type="integer" value="1" max="255" label="report any position that is covered by at least this many alignments; the maximum allowed depth is 255"/>
</expand>
<expand macro="system_options" />
<expand macro="system_options"/>
</when>
</conditional>
</inputs>
<outputs>
<data name="segalign_output" format="tabular" label="SegAlign on ${on_string}">
<change_format>
<when input="mode.output_options.format.format_selector" value="bam" format="bam" />
<when input="mode.output_options.format.format_selector" value="maf" format="maf" />
<when input="mode.output_options.format.format_selector" value="differences" format="interval" />
<when input="mode.output_options.format.format_selector" value="bam" format="bam"/>
<when input="mode.output_options.format.format_selector" value="maf" format="maf"/>
<when input="mode.output_options.format.format_selector" value="differences" format="interval"/>
</change_format>
<filter>mode['mode_selector'] == 'segalign' and mode['diagonal_partition_options']['diagonal_partition'] is False</filter>
</data>
Expand All @@ -206,10 +206,16 @@ OMP_THREAD_LIMIT=\${GALAXY_SLOTS:-2}
</data>
</outputs>
<tests>
<test>
<param name="target" value="hg38.chr20.chunk.fa.gz" type="fasta" />
<param name="query" value="mm39.chr2.chunk.fa.gz" type="fasta" />
<output name="segalign_output" decompress="true" file="segalign-output.maf.gz" ftype="maf" />
<test expect_num_outputs="1">
<param name="mode_selector" value="segalign"/>
<param name="mode_selector" value="segalign_repeat_masker"/>
<param name="query" value="mm39.chr2.chunk.fa.gz" ftype="fasta"/>
<output name="segalign_output" decompress="true" file="segalign-output.maf.gz" ftype="maf"/>
</test>
<test expect_num_outputs="1">
<param name="mode_selector" value="segalign_repeat_masker"/>
<param name="seq_file" value="hg38.chr20.chunk.fa.gz" ftype="fasta"/>
<output name="segalign_repeat_masker_output" decompress="true" file="segalign-repeat-masker-output.tab.gz" ftype="maf"/>
</test>
</tests>
<help><![CDATA[
Expand Down
7 changes: 4 additions & 3 deletions tools/segalign/segalign_output_options.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,10 @@
<option value="shingle">shingle: A measurement of the shingle overlap between the target and the query</option>
<option value="number">number: The alignment number, counted as alignments are written to output (1-base)</option>
<option value="znumber">znumber: The alignment number, counted as alignments are written to output (0-base)</option>
<sanitizer invalid_char="">
<valid initial="string.letters,string.digits"><add value="%" /> </valid>
<sanitizer invalid_char="">
<valid initial="string.letters,string.digits">
<add value="%"/>
</valid>
</sanitizer>
</param>
</when>
Expand All @@ -89,4 +91,3 @@
</conditional>
</xml>
</macros>

2 changes: 1 addition & 1 deletion tools/segalign/sequence_options.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<option value="minus">minus</option>
<option value="both" selected="true">both</option>
</param>
<yield />
<yield/>
</section>
</xml>
</macros>
10 changes: 5 additions & 5 deletions tools/segalign/system_options.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<macros>
<xml name="system_options">
<section name="system_options" title="System Options">
<param argument="--wga_chunk_size" type="integer" value="250000" label="Chunk sizes for GPU calls for Xdrop - ⚠ change only if you are a developer" />
<param argument="--lastz_interval_size" type="integer" value="10000000" label="LASTZ interval for Ydrop - ⚠ change only if you are a developer" />
<param argument="--seq_block_size" type="integer" value="500000000" label="LASTZ interval for Ydrop - ⚠ change only if you are a developer" />
<param argument="--num_gpu" type="integer" value="-1" label="Specify number of GPUs to use - -1 if all the GPUs should be used" />
<param argument="--debug" type="boolean" value="false" label="Print debug messages" />
<param argument="--wga_chunk_size" type="integer" value="250000" label="Chunk sizes for GPU calls for Xdrop - ⚠ change only if you are a developer"/>
<param argument="--lastz_interval_size" type="integer" value="10000000" label="LASTZ interval for Ydrop - ⚠ change only if you are a developer"/>
<param argument="--seq_block_size" type="integer" value="500000000" label="LASTZ interval for Ydrop - ⚠ change only if you are a developer"/>
<param argument="--num_gpu" type="integer" value="-1" label="Specify number of GPUs to use - -1 if all the GPUs should be used"/>
<param argument="--debug" type="boolean" value="false" label="Print debug messages"/>
</section>
</xml>
</macros>
6 changes: 3 additions & 3 deletions tools/segalign/ungapped_extension_options.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<macros>
<xml name="ungapped_extension_options">
<section name="ungapped_extension_options" expanded="false" title="Ungapped Extension Options">
<param argument="--xdrop" type="integer" value="910" label="X-drop value for gap-free extension" />
<param argument="--hspthresh" type="integer" value="3000" label="Segment score threshold for high scoring pairs" />
<param argument="--noentropy" type="boolean" checked="false" label="Don't adjust low score segment pair scores using entropy factor after filtering stage" />
<param argument="--xdrop" type="integer" value="910" label="X-drop value for gap-free extension"/>
<param argument="--hspthresh" type="integer" value="3000" label="Segment score threshold for high scoring pairs"/>
<param argument="--noentropy" type="boolean" checked="false" label="Don't adjust low score segment pair scores using entropy factor after filtering stage"/>
</section>
</xml>
</macros>

0 comments on commit 44b09d6

Please sign in to comment.