-
Notifications
You must be signed in to change notification settings - Fork 441
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add seqkit sort to existing seqkit suite (#5909)
* add seqkit sort * tiny changes --------- Co-authored-by: Björn Grüning <[email protected]>
- Loading branch information
Showing
7 changed files
with
81 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
<tool id="seqkit_sort" name="SeqKit sort" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@"> | ||
<description>FASTA or FASTQ files</description> | ||
<macros> | ||
<import>macros.xml</import> | ||
</macros> | ||
<expand macro="bio_tools"/> | ||
<expand macro="requirements"/> | ||
<command detect_errors="exit_code"><![CDATA[ | ||
#set $input_fn='input.' + str($input.ext) | ||
#set $output_fn='seqkitsort_output.' + str($output.ext) | ||
ln -s '$input' '$input_fn' | ||
&& | ||
seqkit sort | ||
'$input_fn' | ||
$reverse | ||
$sort_by | ||
-o '$output_fn' | ||
--threads \${GALAXY_SLOTS:-4} | ||
]]></command> | ||
<inputs> | ||
<param name="input" type="data" format="fasta,fasta.gz,fastqsanger,fastqsanger.gz" label="Input file"/> | ||
<param name="sort_by" type="select" label="Sort by:"> | ||
<option value="" selected="true">Sequence ID</option> | ||
<option value="--by-bases">Non-gap bases</option> | ||
<option value="--by-length">Sequence length</option> | ||
<option value="--by-name">Full name (instead of just ID)</option> | ||
<option value="--by-seq">Sequence</option> | ||
</param> | ||
<param argument="--reverse" type="boolean" truevalue="--reverse" falsevalue="" checked="false" label="Reverse the result?"/> | ||
</inputs> | ||
<outputs> | ||
<data name="output" format_source="input" from_work_dir="seqkitsort_output.*" label="${input.name} sorted (${tool.name})"/> | ||
</outputs> | ||
<tests> | ||
<!-- 1. fastq.gz --> | ||
<test expect_num_outputs="1"> | ||
<param name="input" value="input1.fastq.gz" ftype="fastqsanger.gz"/> | ||
<output name="output" file="sort_output1.fastq.gz" ftype="fastqsanger.gz"/> | ||
</test> | ||
<!-- 2. fasta.gz --> | ||
<test expect_num_outputs="1"> | ||
<param name="input" value="input1.fasta.gz" ftype="fasta.gz"/> | ||
<output name="output" file="sort_output2.fasta.gz" ftype="fasta.gz"/> | ||
</test> | ||
<!-- 3. by-bases, forward, fasta --> | ||
<test expect_num_outputs="1"> | ||
<param name="input" value="input1.fasta.gz" ftype="fasta.gz"/> | ||
<param name="sort_by" value="--by-bases"/> | ||
<output name="output" file="sort_output3.fasta.gz" ftype="fasta.gz"/> | ||
</test> | ||
<!-- 4. by-length, rev, fasta --> | ||
<test expect_num_outputs="1"> | ||
<param name="input" value="input1.fasta.gz" ftype="fasta.gz"/> | ||
<param name="reverse" value="true"/> | ||
<param name="sort_by" value="--by-length"/> | ||
<output name="output" file="sort_output4.fasta.gz" ftype="fasta.gz"/> | ||
</test> | ||
<!-- 5. by-name, forward, fastq --> | ||
<test expect_num_outputs="1"> | ||
<param name="input" value="input1.fastq.gz" ftype="fastqsanger.gz"/> | ||
<param name="sort_by" value="--by-name"/> | ||
<output name="output" file="sort_output5.fastq.gz" ftype="fastqsanger.gz"/> | ||
</test> | ||
<!-- 6. by-seq, rev, fastq --> | ||
<test expect_num_outputs="1"> | ||
<param name="input" value="input1.fastq.gz" ftype="fastqsanger.gz"/> | ||
<param name="reverse" value="true"/> | ||
<param name="sort_by" value="--by-seq"/> | ||
<output name="output" file="sort_output6.fastq.gz" ftype="fastqsanger.gz"/> | ||
</test> | ||
</tests> | ||
<help> | ||
**What it does** | ||
|
||
Sort sequences (FASTA, FASTQ) by id, name, sequence, or length. | ||
|
||
</help> | ||
<expand macro="citations"/> | ||
</tool> |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.