Mercurial > repos > iuc > seqkit_split2
changeset 1:911de3a36b31 draft default tip
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/seqkit commit 66b393a7118c81d86d0fd80780d2bd551c18f3f0
| author | iuc |
|---|---|
| date | Wed, 08 Oct 2025 20:26:20 +0000 |
| parents | c19015f577a5 |
| children | |
| files | seqkit_split2.xml |
| diffstat | 1 files changed, 39 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/seqkit_split2.xml Fri Sep 26 16:48:57 2025 +0000 +++ b/seqkit_split2.xml Wed Oct 08 20:26:20 2025 +0000 @@ -1,4 +1,4 @@ -<tool id="seqkit_split2" name="Seqkit Split2" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@"> +<tool id="seqkit_split2" name="Seqkit Split2" version="@TOOL_VERSION@+galaxy1" profile="@PROFILE@"> <description>Split sequences into files by part size, number of parts, or length</description> <macros> <import>macros.xml</import> @@ -66,14 +66,23 @@ #end if #if str($split_type.split_selector) == 'by_part': -p $split_type.by_part + #if $paired: + --by-part-prefix "seqkit_split2_R{read}_" + #end if #else if str($split_type.split_selector) == 'by_size': -s $split_type.by_size + #if $paired: + --by-size-prefix string "seqkit_split2_R{read}_" + #end if #else if str($split_type.split_selector) == 'by_length': -l $split_type.by_length #end if -o seqkit_split2 -O out - -j "\${GALAXY_SLOTS:-4}" + -j "\${GALAXY_SLOTS:-4}" + #if $paired: + && (find out/ -type f -name "seqkit_split2_*.*" | while read -r file; do mv "\$file" "\$(echo \$file | sed -E 's/(seqkit_split2)_(R1|R2)_([0-9]+)(\..+)/\1_\3_\2\4/' | sed -E 's/_R1/_forward/; s/_R2/_reverse/')"; done) + #end if ]]></command> <inputs> <conditional name="input_file_type"> @@ -110,6 +119,11 @@ <outputs> <collection name="outputs_files" type="list" label="${tool.name} on ${on_string}: Splitted files"> <discover_datasets pattern="(?P<designation>seqkit_split2\.part_\d+)\.(?P<ext>.+)" directory="out"/> + <filter>input_file_type['type'] == 'single' </filter> + </collection> + <collection name="outputs_paired_files" type="list:paired" label="${tool.name} on ${on_string}: Paired-End Splitted files"> + <filter>input_file_type['type'] == 'paired_collection' </filter> + <discover_datasets pattern="(?P<identifier_0>.+)_(?P<identifier_1>forward|reverse)\.(?P<ext>.+)" directory="out"/> </collection> </outputs> <tests> @@ -152,16 +166,30 @@ <param name="split_selector" value="by_part"/> <param name="by_part" value="2"/> </conditional> - <output_collection name="outputs_files" type="list" count="2"> - <element name="seqkit_split2.part_001" ftype="fastqsanger.gz"> - <assert_contents> - <has_n_lines n="4958"/> - </assert_contents> + <output_collection name="outputs_paired_files" type="list:paired" count="2"> + <element name="seqkit_split2_001"> + <element name="forward" ftype="fastqsanger.gz"> + <assert_contents> + <has_n_lines n="4958"/> + </assert_contents> + </element> + <element name="reverse" ftype="fastqsanger.gz"> + <assert_contents> + <has_n_lines n="3792"/> + </assert_contents> + </element> </element> - <element name="seqkit_split2.part_002" ftype="fastqsanger.gz"> - <assert_contents> - <has_n_lines n="4949"/> - </assert_contents> + <element name="seqkit_split2_002"> + <element name="forward" ftype="fastqsanger.gz"> + <assert_contents> + <has_n_lines n="4949"/> + </assert_contents> + </element> + <element name="reverse" ftype="fastqsanger.gz"> + <assert_contents> + <has_n_lines n="3657"/> + </assert_contents> + </element> </element> </output_collection> </test>
