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

Updating tools/polypolish from version 0.5.0 to 0.6.0 #5749

Merged
merged 2 commits into from
Nov 12, 2024
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
79 changes: 37 additions & 42 deletions tools/polypolish/macro.xml
Original file line number Diff line number Diff line change
@@ -1,48 +1,43 @@

<macros>
<token name="@TOOL_VERSION@">0.5.0</token>
<token name="@VERSION_SUFFIX@">2</token>
<token name="@PROFILE@">21.05</token>

<token name="@THREADS@"><![CDATA[
<token name="@TOOL_VERSION@">0.6.0</token>
<token name="@VERSION_SUFFIX@">0</token>
<token name="@PROFILE@">21.05</token>
<token name="@THREADS@"><![CDATA[
##compute the number of ADDITIONAL threads to be used by samtools (-@)
addthreads=\${GALAXY_SLOTS:-1} && (( addthreads-- )) &&
]]></token>

<xml name="version_command">
<version_command><![CDATA[polypolish -V]]></version_command>
</xml>
<xml name="xrefs">
<xrefs>
<xref type='bio.tools'>Polypolish</xref>
</xrefs>
</xml>
<xml name="requirements">
<requirements>
<requirement type="package" version="@TOOL_VERSION@">polypolish</requirement>
<requirement type="package" version="1.19">samtools</requirement>
</requirements>
</xml>
<xml name="citations">
<citations>
<citation type="doi">10.1371/journal.pcbi.1009802</citation>
</citations>
</xml>
<!-- Filter option of polypolish -->
<xml name="filter_option">
<conditional name="insert_filter">
<param name="filter_select" type="select" label="Filter by insert size ? [recommanded]"
help="Exclude some alignments based on their insert size. It reduce the number of excessive alignments,
particularly near the edges of repeat sequences">
<option value="filter" selected="true">Filter by insert size</option>
<option value="non_filter"> No filtering step</option>
</param>
<when value="filter">
<param argument="--low" type="float" min="0" value="0.1" label="Low percentile threshold" help="Select the lower value to remove [default: 0.1]"/>
<param argument="--high" type="float" min="0" value="99.9" label="High percentile threshold" help="Select the lower value to remove [default: 99.9]"/>
<xml name="version_command">
<version_command><![CDATA[polypolish -V]]></version_command>
</xml>
<xml name="xrefs">
<xrefs>
<xref type="bio.tools">Polypolish</xref>
</xrefs>
</xml>
<xml name="requirements">
<requirements>
<requirement type="package" version="@TOOL_VERSION@">polypolish</requirement>
<requirement type="package" version="1.19.2">samtools</requirement>
</requirements>
</xml>
<xml name="citations">
<citations>
<citation type="doi">10.1371/journal.pcbi.1009802</citation>
</citations>
</xml>
<!-- Filter option of polypolish -->
<xml name="filter_option">
<conditional name="insert_filter">
<param name="filter_select" type="select" label="Filter by insert size ? [recommanded]" help="Exclude some alignments based on their insert size. It reduce the number of excessive alignments, particularly near the edges of repeat sequences">
<option value="filter" selected="true">Filter by insert size</option>
<option value="non_filter"> No filtering step</option>
</param>
<when value="filter">
<param argument="--low" type="float" min="0" value="0.1" label="Low percentile threshold" help="Select the lower value to remove [default: 0.1]"/>
<param argument="--high" type="float" min="0" value="99.9" label="High percentile threshold" help="Select the lower value to remove [default: 99.9]"/>
</when>
<when value="non_filter">
</when>
<when value="non_filter">
</when>
</conditional>
</xml>
</conditional>
</xml>
</macros>
69 changes: 32 additions & 37 deletions tools/polypolish/polypolish.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
<macros>
<import>macro.xml</import>
</macros>
<expand macro='xrefs'/>
<expand macro="requirements" />
<expand macro="version_command" />
<expand macro="xrefs"/>
<expand macro="requirements"/>
<expand macro="version_command"/>
<command detect_errors="aggressive"><![CDATA[
ln -s '$input.fasta_file' input_data &&
#*======================================
Expand Down Expand Up @@ -116,8 +116,7 @@
</command>
<inputs>
<section name="input" title="Input sequences" expanded="True">
<param name="fasta_file" type="data" format="fasta" label="Select a draft genome for polishing"
help="Fasta sequence to be cleaned using short-reads data"/>
<param name="fasta_file" type="data" format="fasta" label="Select a draft genome for polishing" help="Fasta sequence to be cleaned using short-reads data"/>
<conditional name="sam_data_type">
<param name="sam_selector" type="select" label="Select aligned data to polish" help="Choose number of aligned sam/bam files. Need aligned file with all possible locations in aligner option">
<option value="single">Single SAM/BAM file</option>
Expand All @@ -143,14 +142,10 @@
</conditional>
</section>
<section name="options" title="Options" expanded="False">
<param argument="--min_depth" type="integer" min="0" value="5" label="Minimal depth"
help="A base must occur at least this many times in the pileup to be considered valid [default: 5]"/>
<param argument="--fraction_invalid" type="float" min="0" value="0.2" max="1" label="Minimal invalid fraction"
help="A base must make up less than this fraction of the read depth to be considered invalid [default: 0.2]"/>
<param argument="--max_errors" type="integer" min="0" value="10" label="Number of mismatch/indels to ignore alignments"
help="Ignore alignments with more than this many mismatches and indels [default: 10]"/>
<param argument="--fraction_valid" type="float" min="0" value="0.5" max="1" label="Minimal valid fraction"
help="A base must make up at least this fraction of the read depth to be considered valid [default: 0.5"/>
<param argument="--min_depth" type="integer" min="0" value="5" label="Minimal depth" help="A base must occur at least this many times in the pileup to be considered valid [default: 5]"/>
<param argument="--fraction_invalid" type="float" min="0" value="0.2" max="1" label="Minimal invalid fraction" help="A base must make up less than this fraction of the read depth to be considered invalid [default: 0.2]"/>
<param argument="--max_errors" type="integer" min="0" value="10" label="Number of mismatch/indels to ignore alignments" help="Ignore alignments with more than this many mismatches and indels [default: 10]"/>
<param argument="--fraction_valid" type="float" min="0" value="0.5" max="1" label="Minimal valid fraction" help="A base must make up at least this fraction of the read depth to be considered valid [default: 0.5"/>
<param name="keep_logfile" type="boolean" truevalue="true" falsevalue="false" label="Keep log file"/>
<param argument="--debug" type="boolean" truevalue="true" falsevalue="false" label="Keep per base information file"/>
</section>
Expand Down Expand Up @@ -369,29 +364,29 @@
<section name="input">
<param name="fasta_file" value="contigs.fa"/>
<conditional name="sam_data_type">
<param name="sam_selector" value="multiple_paired"/>
<param name="paired_collection">
<collection type="list:paired">
<element name="paired_1">
<collection type="paired">
<element name="forward" value="aligned_test_file/alignement_R1.bam" ftype="unsorted.bam"/>
<element name="reverse" value="aligned_test_file/alignement_R2.bam" ftype="unsorted.bam"/>
</collection>
</element>
<element name="paired_2">
<collection type="paired">
<element name="forward" value="aligned_test_file/alignement_R1_bis.bam" ftype="unsorted.bam"/>
<element name="reverse" value="aligned_test_file/alignement_R2_bis.bam" ftype="unsorted.bam"/>
</collection>
</element>
<element name="paired_3">
<collection type="paired">
<element name="forward" value="aligned_test_file/alignement_R1_ter.bam" ftype="unsorted.bam"/>
<element name="reverse" value="aligned_test_file/alignement_R2_ter.bam" ftype="unsorted.bam"/>
</collection>
</element>
</collection>
</param>
<param name="sam_selector" value="multiple_paired"/>
<param name="paired_collection">
<collection type="list:paired">
<element name="paired_1">
<collection type="paired">
<element name="forward" value="aligned_test_file/alignement_R1.bam" ftype="unsorted.bam"/>
<element name="reverse" value="aligned_test_file/alignement_R2.bam" ftype="unsorted.bam"/>
</collection>
</element>
<element name="paired_2">
<collection type="paired">
<element name="forward" value="aligned_test_file/alignement_R1_bis.bam" ftype="unsorted.bam"/>
<element name="reverse" value="aligned_test_file/alignement_R2_bis.bam" ftype="unsorted.bam"/>
</collection>
</element>
<element name="paired_3">
<collection type="paired">
<element name="forward" value="aligned_test_file/alignement_R1_ter.bam" ftype="unsorted.bam"/>
<element name="reverse" value="aligned_test_file/alignement_R2_ter.bam" ftype="unsorted.bam"/>
</collection>
</element>
</collection>
</param>
</conditional>
</section>
<section name="options">
Expand Down Expand Up @@ -429,7 +424,7 @@
<output name="debug_file" value="debug_file_test_2.tsv"/>
</test>
</tests>
<help><![CDATA[
<help><![CDATA[
**What it does**
Polypolish is a tool for polishing genome assemblies with short reads.
Polypolish uses SAM/BAM files where each read has been aligned to all possible locations (not just a single best location).
Expand Down
Loading