Mercurial > repos > peterjc > fasta_filter_by_id
comparison tools/fasta_tools/fasta_filter_by_id.xml @ 0:2e5f8ad1a096
Migrated tool version 0.0.2 from old tool shed archive to new tool shed repository
author | peterjc |
---|---|
date | Tue, 07 Jun 2011 17:22:24 -0400 |
parents | |
children | 5cd569750e85 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:2e5f8ad1a096 |
---|---|
1 <tool id="fasta_filter_by_id" name="Filter sequences by ID" version="0.0.2"> | |
2 <description>from a tabular file</description> | |
3 <command interpreter="python"> | |
4 fasta_filter_by_id.py $input_tabular $columns $input_fasta | |
5 #if $output_choice_cond.output_choice=="both" | |
6 $output_pos $output_neg | |
7 #elif $output_choice_cond.output_choice=="pos" | |
8 $output_pos - | |
9 #elif $output_choice_cond.output_choice=="neg" | |
10 - $output_neg | |
11 #end if | |
12 </command> | |
13 <inputs> | |
14 <param name="input_fasta" type="data" format="fasta" label="FASTA file to filter on the identifiers"/> | |
15 <param name="input_tabular" type="data" format="tabular" label="Tabular file containing FASTA identifiers"/> | |
16 <param name="columns" type="data_column" data_ref="input_tabular" multiple="True" numerical="False" label="Column(s) containing FASTA identifiers" help="Multi-select list - hold the appropriate key while clicking to select multiple columns"> | |
17 <validator type="no_options" message="Pick at least one column"/> | |
18 </param> | |
19 <conditional name="output_choice_cond"> | |
20 <param name="output_choice" type="select" label="Output positive matches, negative matches, or both?"> | |
21 <option value="both">Both positive matches (ID on list) and negative matches (ID not on list), as two FASTA files</option> | |
22 <option value="pos">Just positive matches (ID on list), as a single FASTA file</option> | |
23 <option value="neg">Just negative matches (ID not on list), as a single FASTA file</option> | |
24 </param> | |
25 <!-- Seems need these dummy entries here, compare this to indels/indel_sam2interval.xml --> | |
26 <when value="both" /> | |
27 <when value="pos" /> | |
28 <when value="neg" /> | |
29 </conditional> | |
30 </inputs> | |
31 <outputs> | |
32 <data name="output_pos" format="fasta" label="With matched ID"> | |
33 <filter>output_choice_cond["output_choice"] != "neg"</filter> | |
34 </data> | |
35 <data name="output_neg" format="fasta" label="Without matched ID"> | |
36 <filter>output_choice_cond["output_choice"] != "pos"</filter> | |
37 </data> | |
38 </outputs> | |
39 <tests> | |
40 <!-- Can't get these unit tests to run, may be a Galaxy problem | |
41 <test> | |
42 <param name="input_fasta" value="four_human_proteins.fasta" ftype="fasta" /> | |
43 <param name="input_tabular" value="blastp_four_human_vs_rhodopsin.tabular" ftype="tabular" /> | |
44 <param name="columns" value="1" /> | |
45 <param name="output_choice" value="both" /> | |
46 <output name="output_pos" file="four_human_proteins_filter_a.fasta" ftype="fasta" /> | |
47 <output name="output_neg" file="four_human_proteins_filter_b.fasta" ftype="fasta" /> | |
48 </test> | |
49 <test> | |
50 <param name="input_fasta" value="four_human_proteins.fasta" ftype="fasta" /> | |
51 <param name="input_tabular" value="blastp_four_human_vs_rhodopsin.tabular" ftype="tabular" /> | |
52 <param name="columns" value="1" /> | |
53 <param name="output_choice" value="pos" /> | |
54 <output name="output_pos" file="four_human_proteins_filter_a.fasta" ftype="fasta" /> | |
55 </test> | |
56 <test> | |
57 <param name="input_fasta" value="four_human_proteins.fasta" ftype="fasta" /> | |
58 <param name="input_tabular" value="blastp_four_human_vs_rhodopsin.tabular" ftype="tabular" /> | |
59 <param name="columns" value="1" /> | |
60 <param name="output_choice" value="neg" /> | |
61 <output name="output_neg" file="four_human_proteins_filter_b.fasta" ftype="fasta" /> | |
62 </test> | |
63 --> | |
64 </tests> | |
65 <help> | |
66 | |
67 **What it does** | |
68 | |
69 By default it divides a FASTA file in two, those sequences with or without an | |
70 ID present in the tabular file column(s) specified. You can opt to have a | |
71 single output file of just the matching records, or just the non-matching ones. | |
72 | |
73 Note that the order of sequences in the original FASTA file is preserved. | |
74 Also, if any sequences share an identifier, duplicates are not removed. | |
75 | |
76 </help> | |
77 </tool> |