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

Update semibin2 to 2.1.0 #6503

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
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
129 changes: 116 additions & 13 deletions tools/semibin/generate_sequence_features.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,29 @@
<expand macro="version"/>
<command detect_errors="exit_code"><![CDATA[
#import re
@BAM_FILES@
#if $input_type_select.input_type == "bam":
@BAM_FILES@
#else:
#for $e in $input_type_select.mode.abundance:
#set $identifier = re.sub('[^\s\w\-\\.]', '_', str($e.element_identifier))
ln -s '$e' '${identifier}.txt' &&
#end for
#end if
@FASTA_FILES@

SemiBin2
#if $mode.select == 'single' or $mode.select == 'co'
#if $input_type_select.mode.select == 'single' or $input_type_select.mode.select == 'co'
generate_sequence_features_single
#else
generate_sequence_features_multi
--separator '$separator'
#end if
--input-fasta 'contigs.fasta'
#if $input_type_select.input_type == "bam"
--input-bam *.bam
#else:
-a *.txt
#end if
--output 'output'
--threads \${GALAXY_SLOTS:-1}
@MIN_LEN@
Expand All @@ -30,7 +41,21 @@ SemiBin2
#end if
]]></command>
<inputs>
<expand macro="mode_fasta_bam"/>
<conditional name="input_type_select">
<param name="input_type" type="select" label="Use BAM or strobealign abundance information?">
<option value="bam">BAM file</option>
<option value="txt">strobealign-aemb files</option>
</param>
<when value="bam">
<expand macro="mode_fasta_bam"/>
</when>
<when value="txt">
<expand macro="mode_fasta_strobealign"/>
</when>
</conditional>



<expand macro="min_len"/>
<expand macro="ml-threshold"/>

Expand All @@ -46,10 +71,13 @@ SemiBin2
</outputs>
<tests>
<test expect_num_outputs="4">
<conditional name="mode">
<param name="select" value="single"/>
<param name="input_fasta" ftype="fasta" value="input_single.fasta"/>
<param name="input_bam" ftype="bam" value="input_single.bam"/>
<conditional name="input_type_select">
<param name="input_type" value="bam"/>
<conditional name="mode">
<param name="select" value="single"/>
<param name="input_fasta" ftype="fasta" value="input_single.fasta"/>
<param name="input_bam" ftype="bam" value="input_single.bam"/>
</conditional>
</conditional>
<conditional name="min_len">
<param name="method" value="automatic"/>
Expand Down Expand Up @@ -139,13 +167,17 @@ SemiBin2
</output_collection>
</test>
<test expect_num_outputs="7">
<conditional name="mode">
<param name="select" value="multi"/>
<conditional name="multi_fasta">
<param name="select" value="concatenated"/>
<param name="input_fasta" ftype="fasta" value="input_multi.fasta.gz"/>
<conditional name="input_type_select">
<param name="input_type" value="bam"/>
<conditional name="mode">
<param name="select" value="multi"/>
<conditional name="multi_fasta">
<param name="select" value="concatenated"/>
<param name="input_fasta" ftype="fasta" value="input_multi.fasta.gz"/>
</conditional>
<param name="input_fasta" ftype="fasta" value="input_single.fasta"/>
<param name="input_bam" ftype="bam" value="input_multi_sorted1.bam,input_multi_sorted2.bam,input_multi_sorted3.bam,input_multi_sorted4.bam,input_multi_sorted5.bam,input_multi_sorted6.bam,input_multi_sorted7.bam,input_multi_sorted8.bam,input_multi_sorted9.bam,input_multi_sorted10.bam"/>
</conditional>
<param name="input_bam" ftype="bam" value="input_multi_sorted1.bam,input_multi_sorted2.bam,input_multi_sorted3.bam,input_multi_sorted4.bam,input_multi_sorted5.bam,input_multi_sorted6.bam,input_multi_sorted7.bam,input_multi_sorted8.bam,input_multi_sorted9.bam,input_multi_sorted10.bam"/>
</conditional>
<conditional name="min_len">
<param name="method" value="automatic"/>
Expand Down Expand Up @@ -225,6 +257,77 @@ SemiBin2
</element>
</output_collection>
</test>

<test expect_num_outputs="5">
<conditional name="input_type_select">
<param name="input_type" value="txt"/>
<conditional name="mode">
<param name="select" value="multi"/>
<conditional name="multi_fasta">
<param name="select" value="concatenated"/>
<param name="input_fasta" ftype="fasta" value="input_multi.fasta.gz"/>
</conditional>
<param name="input_fasta" ftype="fasta" value="input_single.fasta"/>
<param name="abundance" ftype="txt" value="strobealign_1.txt,strobealign_2.txt,strobealign_3.txt,strobealign_4.txt,strobealign_5.txt"/>
</conditional>
</conditional>
<conditional name="min_len">
<param name="method" value="automatic"/>
</conditional>
<param name="ml_threshold" value="4000"/>
<param name="extra_output" value="coverage,contigs"/>
<output_collection name="multi_data" count="10">
<element name="S1" ftype="csv">
<assert_contents>
<has_n_lines n="21"/>
<has_text text="g1k_0"/>
</assert_contents>
</element>
</output_collection>
<output_collection name="multi_data_split" count="10">
<element name="S1" ftype="csv">
<assert_contents>
<has_n_lines n="41"/>
<has_text text="g1k_0_1"/>
</assert_contents>
</element>
</output_collection>
<output_collection name="multi_cov_sample" count="10">
<element name="S1" ftype="csv">
<assert_contents>
<has_n_lines n="21"/>
<has_text text="g1k_0"/>
</assert_contents>
</element>
</output_collection>
<output_collection name="multi_split_cov_txt" count="10">
<element name="S1" ftype="csv">
<assert_contents>
<has_n_lines n="41"/>
<has_text text="g1k_5_1"/>
</assert_contents>
</element>
<element name="S9" ftype="csv">
<assert_contents>
<has_n_lines n="401"/>
<has_text text="g1k_5_1"/>
</assert_contents>
</element>
</output_collection>
<output_collection name="multi_contigs" count="10">
<element name="S1" ftype="fasta">
<assert_contents>
<has_text text=">g1k_0"/>
</assert_contents>
</element>
<element name="S9" ftype="fasta">
<assert_contents>
<has_text text=">g1k_0"/>
</assert_contents>
</element>
</output_collection>
</test>

<test expect_num_outputs="2">
<conditional name="mode">
<param name="select" value="multi"/>
Expand Down
Loading
Loading